instamatic-dev / instamatic

Python program for automated electron diffraction data collection
https://instamatic.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
56 stars 25 forks source link

Large overhead for acquisition times using MerlinEM for cRED #84

Open aurorateien opened 1 month ago

aurorateien commented 1 month ago

Hello,

We are using Instamatic v2.0.0 for doing cRED with MerlinEM detector and have discovered an issue related to the acquisition time of each frame. For example, for an exposure time of 0,5 s for each frame (0,01 s for defocused frames), the acquisition time is typically 0,8 s (high!), which seems a bit peculiar as the readout time for the MerlinEM 24 bit data is only 1,64 ms. The rest of the time included in the definition of the acquisition time is overhead, which typically is only a few ms. Why would these extra 300 ms be added to the acquisition time and can it be corrected for? After what I've understood, this is not an issue for other detectors.

I came across the note on using Instamatic with Merlin that said: "Changing exposure on the fly (for example, in the gui) incurs a small overhead (~300 ms). " This overhead (of 300 ms) is in fact not small when doing cRED for 3D ED data acquisition, and is seemingly added without us doing any changes on the exposure time in the GUI. If the reason for the added time in fact is overhead, is there any way to avoid it?

stefsmeets commented 1 month ago

Hi @aurorateien , in my testing with the Merlin, the overhead was negligible (<1 ms as you suggested) for both softtrigger and movie mode. Can you tell me which mode you are using or how you are collecting data?

The overhead penalty when changing exposure happens because instamatic has to send a command to change the exposure to Merlin in between collecting images. This was about 300 ms in my testing. If the exposure does not change, this does not get triggered.