Newer
Older
@checklist.add_check(depends=['hatchOpen','sceneMirrorPosition'], affects_calibration=False, description='hatch is closed')
"""
Check that the hatch is open on sky views
"""
return ((frame.hatchOpen != 1) & (~frame.sceneMirrorPosition.isin([ord('H'), ord('A')])))
@checklist.add_check(depends=['hatchOpen','sceneMirrorPosition'], affects_calibration=True, description='hatch moving during calibration view, mirror might have safed')
"""
Check that the mirror doesn't safe during a calibration view and contaminate other records
"""
hatch_closing = (frame.hatchOpen == -3)
return hatch_closing & frame.sceneMirrorPosition.isin([ord('H'), ord('A')])
@checklist.add_check(depends=['sceneMirrorPosition'], affects_calibration=True, description='mirror position not in mirror.beg')
if 'mirror.beg' not in parameters:
return frame.sceneMirrorPosition * 0
mirror_beg = read_mirror(parameters['mirror.beg'])
angles = { s[2] for s in mirror_beg}
return frame.sceneMirrorPosition.round(2).isin(angles)