HolyLab / Imagine

A graphical interface for recording with OCPI microscopes.
1 stars 1 forks source link

"Stack is overrun" message is inaccurate #2

Closed Cody-G closed 7 years ago

Cody-G commented 8 years ago

Ideally, a 3D timeseries acquisition should work fine under the following conditions:

  1. The piezo positioner is fast enough to keep up with the movement range requested. This constraint applies both on the imaging scan and during the reset phase, while the positioner moves back to its starting position and the camera is idle. Recently I've made changes to the GUI that should handle this, preventing users from entering unrealistic requests by enforcing a maximum speed for the positioner. This may need additional refinement, but it seems to work pretty well.
  2. The "idle time between stacks" setting in the camera tab is equal or greater than the "time for moving back" setting in the positioner tab.

Currently, Imagine sometimes emits a "Stack is overrun. Idle time is too short" message even when both conditions are met. If one adds enough idle time, the message goes away. It seems that in some cases the warning message is inaccurate (Upon examination the stack was acquired correctly). In other cases, the stack actually acquires incorrectly, often with part of the stack being acquired during the reset phase.

I will add more information describing the problem as I find it.

Cody-G commented 8 years ago

I think a big part of this stems from the fact that we redo all allocations and instrument configurations before each stack. Much of the work doesn't need to be re-done. Just reducing camera configuration time will probably make a big difference.

Cody-G commented 7 years ago

I think I have a solution for this, waiting for PCO to fix an (unrelated) problem before I merge

Cody-G commented 7 years ago

This is fixed in #30 with one additional caveat to the two conditions I listed above. The "Idle time between stacks" setting must also respect the maximum speed at which the computer can complete its inter-stack tasks (the most costly of which is stopping and starting the camera). Thus the minimum inter-stack interval on OCPI2 is now 0.09 seconds in dual-camera mode and slightly faster with a single camera. I suspect it will be nearly the same on OCPI1. Currently we're not doing any checking on this number, but at least the overrun statement is accurate now.

Cody-G commented 7 years ago

Our overrun-related warnings are improved since I filed this issue but still not perfect. However as we're now switching over to hardware timing this will soon be obsolete anyway so I'm closing.