Skip to content
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

Live stream images should come from Instrument #2

Open
1 task
adamkglaser opened this issue Jun 21, 2024 · 0 comments
Open
1 task

Live stream images should come from Instrument #2

adamkglaser opened this issue Jun 21, 2024 · 0 comments
Assignees

Comments

@adamkglaser
Copy link
Collaborator

Is your feature request related to a problem? Please describe.
Currently, the live streaming logic is happening here

@thread_worker
def grab_frames(self, camera_name, frames=float("inf")):
"""Grab frames from camera and create multiscale array
:param frames: how many frames to take
:param camera_name: name of camera"""
i = 0
while i < frames: # while loop since frames can == inf
with self.camera_locks[camera_name]:
frame = self.instrument.cameras[camera_name].grab_frame()
# TODO: Do we want to import from exaspim what to use?
multiscale = [frame]
for binning in range(2,6): # TODO: variable or get from somewhere?
downsampled_frame = DownSample2D(binning=binning).run(frame)
multiscale.append(downsampled_frame)
yield multiscale, camera_name # wait until unlocking camera to be able to quit napari thread
i += 1
.

Describe the solution you'd like
This should ideally be moved into the instrument and out of the view.

Acceptance Criteria

  • Moved from view to instrument and unit tested to be working
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

No branches or pull requests

2 participants