TheDeanLab / navigate

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

Speed up loading multi-positions #1030

Closed annie-xd-wang closed 2 weeks ago

conorhughmcfadden commented 2 weeks ago

I'm getting a frame timeout error when using the Photometrics camera on this PR. This is just running a normal multiposition feature list:

[{"name": PrepareNextChannel,},({"name": MoveToNextPositionInMultiPositionTable,},{"name": ZStackAcquisition,"args": (True,True,),},{"name": WaitToContinue,},{"name": LoopByCount,"args": ("experiment.MicroscopeState.multiposition_count",),},),]

The feature will run and I'll get to the final position, and the camera will hang throwing several frame timeout errors:

frame timeout. Verify timeout exceeds exposure time. If applicable, check external trigger source.

I've seen this happen occasionally with the Photometrics camera, but I did compare to develop and everything was fine, so I suspect it might be something with this PR.

Here is the model_debug when I recreated the error:

model_debug.log

annie-xd-wang commented 2 weeks ago

The parameter "multiposition_count" is removed from experiment.yml, accordingly, the parameter for LoopByCount needs to be set as "positions". Please update the feature pipeline as follows: [{"name": PrepareNextChannel,},({"name": MoveToNextPositionInMultiPositionTable,},{"name": ZStackAcquisition,"args": (True,True,),},{"name": WaitToContinue,},{"name": LoopByCount,"args": ("positions",),},),]

conorhughmcfadden commented 2 weeks ago

I'm using the correct feature syntax now with "positions" but still get the same error:

model_debug.log

I suspect the Photometrics is causing problems as I had similar issues with the AO feature when used in a feature list. The camera would just hang at the end. Does everything work alright with the Hamamatsu?

conorhughmcfadden commented 2 weeks ago

Annie's new LoopByCount fix seems to have solved the problem. I tested WaitForExternalTrigger and it works as well.