Skip to content

Add support for free-running mode with Hamamatsu cameras#1085

Merged
AdvancedImagingUTSW merged 4 commits into
TheDeanLab:developfrom
annie-xd-wang:camera-free-run-mode
Apr 5, 2025
Merged

Add support for free-running mode with Hamamatsu cameras#1085
AdvancedImagingUTSW merged 4 commits into
TheDeanLab:developfrom
annie-xd-wang:camera-free-run-mode

Conversation

@annie-xd-wang
Copy link
Copy Markdown
Collaborator

This PR adds support for running Hamamatsu cameras in free-running mode. Below is a screenshot of the updated GUI.
Freerun setting

@annie-xd-wang
Copy link
Copy Markdown
Collaborator Author

The GUI has been updated as below. Choose "Internal" trigger mode will run the camera in Free-running mode.
Screenshot 2025-04-04 at 1 55 39 PM

@AdvancedImagingUTSW AdvancedImagingUTSW requested review from AdvancedImagingUTSW and Copilot and removed request for Copilot April 5, 2025 10:51
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (3)

test/controller/sub_controllers/test_camera_settings.py:71

  • The removal of assertions for trigger_source, trigger_active, and readout_speed means that these settings are no longer verified in this test. Please ensure that the new behavior is adequately covered by other tests or add new tests verifying the proper configuration of trigger modes.
 -        assert (self.camera_settings.trigger_source == camera_config_dict["trigger_source"])

src/navigate/model/devices/camera/hamamatsu.py:205

  • The init method calls set_trigger_mode without specifying a trigger_source, which defaults to "External" even if free-running mode (internal) is intended. Consider passing the appropriate trigger_source value from the configuration to ensure the desired camera mode is set.
def set_trigger_mode(self, trigger_source="External"):

src/navigate/view/main_window_content/camera_tab.py:186

  • [nitpick] This condition limits variable retrieval to LabelInput widgets. If other widget types are used or added in the future, consider expanding the handling logic or documenting why only LabelInput instances are processed.
if isinstance(widget, LabelInput):

result = self.set_binning(binning)
return result

def set_trigger_mode(self, trigger_source:str="External") -> None:
Copy link

Copilot AI Apr 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The set_trigger_mode method is currently a stub with a pass statement. Consider raising a NotImplementedError or providing a basic implementation to ensure that calls to this method do not fail silently.

Copilot uses AI. Check for mistakes.
@AdvancedImagingUTSW AdvancedImagingUTSW merged commit 8da1485 into TheDeanLab:develop Apr 5, 2025
1 check passed
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.

3 participants