Skip to content

Conversation

AdvancedImagingUTSW
Copy link
Collaborator

This pull request introduces several improvements and bug fixes across the camera device integration, acquisition logic, and user interface for the navigation system. The main themes are enhancements to the Ximea camera handling (including more robust acquisition and error recovery), improvements to multi-position acquisition logic, and UI updates for rotation controls.

Camera device and acquisition robustness:

  • Added auto-restart logic and counters to the Ximea camera class to handle repeated image acquisition timeouts, switching buffer policy to "UNSAFE" for performance, and increasing the default number of frames in image series initialization. Also, now copies image data to the buffer after acquisition. [1] [2] [3] [4] [5]
  • Commented out the default pixel size initialization in the base camera class, allowing for more flexible configuration.

Multi-position and z-stack acquisition improvements:

  • Reduced the stage distance threshold for pausing the data thread from 1000 to 200, making acquisition more responsive to stage movements.
  • Added a data queue and a new signal response function for the "Macroscale" microscope, enabling better handling of data flow and resend triggers during acquisition. [1] [2] [3]
  • Improved the logic for handling resend triggers and acquisition end conditions in signal functions, ensuring correct behavior in edge cases. [1] [2]

User interface updates:

  • Updated the rotate_angle_x, rotate_angle_y, and rotate_angle_z input widgets to allow negative angles (from -360 to 360) and fixed the label for the Z angle. [1] [2] [3]

General codebase improvements:

  • Added missing imports (numpy, queue.Queue, queue.Empty) to support new logic for camera data handling and queue-based communication. [1] [2]

Widget state handling:

  • Changed the logic in toggle_bdv_widgets to enable dependent widgets in "normal" state instead of "readonly" when the main widget is active, improving UI consistency.

Should move pixel size to the Hamamatsu Base class or investigate further.
Major changes. Need to discuss with @annie-xd-wang
@annie-xd-wang
Copy link
Collaborator

Initially, we suspected the issue was with the camera. However, after further investigation, we determined that the root cause is actually with the DAQ. The DAQ fails to send triggers in a timely manner after a certain runtime, which interrupts acquisition. A fix for this issue is included in PR: 1134. I will go ahead and close this PR.

@annie-xd-wang
Copy link
Collaborator

The GUI updates will be addressed in a follow-up PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants