TheDeanLab / navigate

navigate - open source light-sheet microscope controls
https://thedeanlab.github.io/navigate/
Other
18 stars 5 forks source link

add new feature to set camera parameters #920

Closed annie-xd-wang closed 1 month ago

annie-xd-wang commented 2 months ago

The new feature can set sensor mode, readout direction, and the number of pixels for the rolling shutter.

AdvancedImagingUTSW commented 2 months ago

I tested the code with this custom acquisition:

[{"name": ZStackAcquisition,},{"name": SetCameraParameters,"args": ("Light-Sheet","Bottom-to-Top",54,),},{"name": ZStackAcquisition,},]

Unfortunately, it was accompanied by a camera timeout. model_debug here:

2024-06-17 17:16:54,196 - model - DEBUG - common_features: *** Zstack move stage: (z: 10701.4), (f: -3139.1)
2024-06-17 17:16:54,231 - model - INFO - model: Navigate Model - Sent through pipe8
2024-06-17 17:16:54,495 - model - DEBUG - feature_container: running signal node: ZStackAcquisition
2024-06-17 17:16:54,496 - model - INFO - model: Navigate Model - Running data process, get frames [9]
2024-06-17 17:16:54,505 - model - DEBUG - feature_container: running signal node: SetCameraParameters
2024-06-17 17:16:54,537 - model - INFO - model: Navigate Model - Sent through pipe9
2024-06-17 17:16:55,399 - model - DEBUG - HamamatsuAPI: error message: -2147483386
2024-06-17 17:16:55,399 - model - INFO - model: Navigate Model - Running data process, get frames []
2024-06-17 17:16:55,399 - model - INFO - model: Navigate Model - Waiting 20
2024-06-17 17:16:55,400 - model - INFO - model: Navigate Model - Data thread stopped.
2024-06-17 17:16:55,400 - model - INFO - model: Navigate Model - Received frames in total: 10

It appears that the camera did switch modes, but it was not able to immediately begin imaging with the new settings thereafter...

annie-xd-wang commented 1 month ago

I've tested it on CT-ASLM-V2, and this new feature is now working.

AdvancedImagingUTSW commented 1 month ago

This will allow you to automatically switch camera parameters. For example, when switching from the mesoscale to the nanoscale modules on the multiscale microscope, the light-sheet readout direction could be adjusted. Or perhaps, in an automated routine, if the detected fluorescence is too dim, you could iteratively increase the exposure time.