labscript-suite / labscript-devices

A modular and extensible plugin architecture to control experiment hardware using the 𝘭𝘒𝘣𝘴𝘀𝘳π˜ͺ𝘱𝘡 𝘴𝘢π˜ͺ𝘡𝘦.
http://labscriptsuite.org
Other
5 stars 58 forks source link

IMAQdxCamera manual_mode_camera_attributes should not be limited to those in Basler_camera_imaqdx_attributes #68

Open ispielma opened 3 years ago

ispielma commented 3 years ago

Consider the call:

IMAQdxCamera(name='MOT_x', parent_device=MOT_Camera_Trigger, connection='trigger', trigger_edge_type='rising', orientation = 'MOT_x', serial_number=0x3053162459, camera_attributes=Basler_camera_imaqdx_attributes, manual_mode_camera_attributes=Basler_manual_mode_imaqdx_attributes, stop_acquisition_timeout=10, exception_on_failed_shot=False)

right now everything in Basler_manual_mode_imaqdx_attributes must also be in Basler_camera_imaqdx_attributes. This is a bug because some options are only allowed based on other settings. For example:

Basler_manual_mode_imaqdx_attributes = { 'CameraAttributes::AcquisitionTrigger::AcquisitionMode': 'Continuous', 'CameraAttributes::AcquisitionTrigger::TriggerMode': 'Off', 'CameraAttributes::AcquisitionTrigger::ExposureMode': 'Timed',

'CameraAttributes::AcquisitionTrigger::ExposeTimeRaw': 8000,

}

The option 'CameraAttributes::AcquisitionTrigger::ExposeTimeRaw' can only be set if 'CameraAttributes::AcquisitionTrigger::ExposureMode' is set to time 'Timed', but for my shot use 'Trigger Width'. This implies that the key 'CameraAttributes::AcquisitionTrigger::ExposeTimeRaw' cannot be present at all in Basler_camera_imaqdx_attributes, leading to the reported bug.