-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix bug for camera not pausing in scopeless mode #122
Conversation
Update: Tested with hamamatsu in the light sheet computer. No apparent problems so far. |
sashimi/processes/camera.py
Outdated
@@ -21,8 +21,8 @@ | |||
|
|||
class CameraMode(Enum): | |||
PREVIEW = 1 | |||
TRIGGERED = 2 | |||
EXPERIMENT_RUNNING = 3 | |||
#TRIGGERED = 2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If @vilim does not object I would entirely remove those
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There should be no modes that are not used, and no commented lines
sashimi/processes/camera.py
Outdated
#if self.parameters.camera_mode == CameraMode.PAUSED: | ||
self.pause_loop() | ||
#else: | ||
self.camera.start_acquisition() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe the logger should also get a "Stopped acquisition" message after the camera_loop
is left, and self.camera.stop_acquisition() should be called. Actually, the camera start/stop and the logging should probably go in the camera_loop()
and the pause_loop()
methods, after breaking from the respective while loops!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also please remove the commented lines and write a small comment why the pause_loop is enough (basically inside of it the if
you removed above is implemented.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, after these few changes it can be merged!
sashimi/processes/camera.py
Outdated
@@ -21,8 +21,8 @@ | |||
|
|||
class CameraMode(Enum): | |||
PREVIEW = 1 | |||
TRIGGERED = 2 | |||
EXPERIMENT_RUNNING = 3 | |||
#TRIGGERED = 2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There should be no modes that are not used, and no commented lines
sashimi/processes/camera.py
Outdated
#if self.parameters.camera_mode == CameraMode.PAUSED: | ||
self.pause_loop() | ||
#else: | ||
self.camera.start_acquisition() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also please remove the commented lines and write a small comment why the pause_loop is enough (basically inside of it the if
you removed above is implemented.
I now have removed the unnecessary |
Changed the toggling between
camera_loop
andpause_loop
inCameraProcess
to avoid camera getting stuck in camera loop for the mock camera. Issue with--scopeless
was that the Camera was just enteringpause_loop
at initialisation of the GUI and afterwards was incamera_loop
without a return. Code needs to be tested with hamamatsu camera to verify changes didn't crash anything. There are multipleCameraMode
that are created but never checked such asTRIGGERED
,EXPERIMENT_RUNNING
. Could this potentially be simplified?