micro-manager / LightSheetManager

BSD 3-Clause "New" or "Revised" License
0 stars 3 forks source link

LightSheetManager AcqEngJ backend #8

Closed henrypinkard closed 1 year ago

henrypinkard commented 1 year ago

@jondaniels @bls337 Working on a PR for an initial version of this right now. The immediate goal would be to recreate the most important features for diSPIM control, but with the more performant/reliable/debuggable backend provided by AcqEngJ.

I've gone through the main function that performs acquisition in the diSPIM plugin, and I want to make sure I understand what its doing correctly:

jondaniels commented 1 year ago

Here is my take, @bls337 may have clarifications or completely different ideas ;-)

henrypinkard commented 1 year ago

Thanks! This is really helpful and I think I should able to put together a skeleton of how this should work in AcqEngJ which we can build on from there.

  • Is there a (software) trigger for each channel always, or sometimes? It depends on the channel mode. In "interleave" mode all the channels are done with one software trigger.

Can you set a bit more about interleave mode? What exactly is interleaved? Is it performing successive scans of the same volume in different channels, or something different?

jondaniels commented 1 year ago
  • Is there a (software) trigger for each channel always, or sometimes? It depends on the channel mode. In "interleave" mode all the channels are done with one software trigger.

Can you set a bit more about interleave mode? What exactly is interleaved? Is it performing successive scans of the same volume in different channels, or something different

Interleaved rotates through the channels within the same timepoint/position. In essence this does change the acquisition order contrary to my former claim.

For example if you acquiring a single volume of 5 images with 2 channels with interleaved, there would only be one motion but the lasers A and B would fire ABABABABAB instead of one motion with AAAAA and then another with BBBBB. The enum is MultiChannelMode which becomes field channelMode of the acqusitionSettings structure. Triggering different lasers sequentially is handled by the Tiger controller; in the above example the Tiger would have been told to acquire 10 images in the volume and the Tiger would have changed the lasers as configured by setupHardwareChannelSwitching() in the ControllerUtils class.

henrypinkard commented 1 year ago

Thanks! I just completed the first steps of this integration in #9

This adds in the high performance saving in NDTiff with optional display in NDViewer, and it does the beginnings of translating the LSM AcquisitionSettings into AcquisitionEvents and AcquisitonHooks that interact with AcqEngJ. This is using the same system as pycro-manager, so the pycro-manager documentation gives an idea of how the system works. The basic idea is shown in the figure below.

The code is full of TODOs. I think it will be helpful to go through it together at our next meeting

acquisition_figure