I realized that when using the Kinetix in bulb mode camera.get_cycle_time and camera.get_exposure_time do not return the real values, which kind of makes sense I guess since they are not set in the software. I noticed this because I thought to use those values to calculate my timings for hardware triggering on the RedPitaya. Does it make sense to return something else, like for example length of the hardware trigger in this case? Not sure if this needs to be fixed on the python-microscope level or my experiment script level. Please see the code that I am running below. Thanks!
LIGHT_TO_EXPOSURE = [
# light-name, exposure-in-msec
("laser3", 500),
("laser6", 200),
("laser7", 300),
]
camera = PVCamera()
camera.set_trigger(microscope.TriggerType.HIGH,
microscope.TriggerMode.BULB)
camera_buffer = Queue()
camera.set_client(camera_buffer)
camera.enable()
actions = []
running_time = 0.0
for light_name, emitting_time in LIGHT_TO_EXPOSURE:
mask = CAMERA_EXECUTOR_LINE | LIGHT_TO_EXECUTOR_LINE[light_name]
action = (running_time, (mask, [0, 0]))
actions.append(action)
# Turn off the laser
running_time += emitting_time
action = (running_time, (0, [0, 0]))
actions.append(action)
# Wait until camera stops exposing
running_time += (camera.get_cycle_time() - camera.get_exposure_time()) * 1000 #-> **returns not real value here**
## Prepare for next acquisition
actions.append((running_time, (0, [0, 0]))) # wait before start next repetition
executor.PrepareActions(actions, N_TIMEPOINTS)
I realized that when using the Kinetix in bulb mode camera.get_cycle_time and camera.get_exposure_time do not return the real values, which kind of makes sense I guess since they are not set in the software. I noticed this because I thought to use those values to calculate my timings for hardware triggering on the RedPitaya. Does it make sense to return something else, like for example length of the hardware trigger in this case? Not sure if this needs to be fixed on the python-microscope level or my experiment script level. Please see the code that I am running below. Thanks!