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

Fix viewer images bug #93

Merged
merged 3 commits into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/view/acquisition_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,13 +155,12 @@ def start_acquisition(self) -> None:
self.update_tiles()

if self.instrument_view.grab_frames_worker.is_running: # stop livestream if running
self.instrument_view.dismantle_live()
self.instrument_view.grab_frames_worker.quit()

# write correct daq values if different from livestream
for daq_name, daq in self.instrument.daqs.items():
if daq_name in self.config['acquisition_view'].get('data_acquisition_tasks', {}).keys():
daq.tasks = self.config['acquisition_view']['data_acquisition_tasks'][daq_name]['tasks']
# Tasks should be added and written in acquisition?

# anchor grid in volume widget
for anchor, widget in zip(self.volume_plan.anchor_widgets, self.volume_plan.grid_offset_widgets):
Expand Down Expand Up @@ -204,6 +203,11 @@ def acquisition_ended(self) -> None:
getattr(self, f'{operation}_dock').setDisabled(False)
self.stop_button.setEnabled(False)

# write correct daq values if different from acquisition task
for daq_name, daq in self.instrument.daqs.items():
if daq_name in self.config['instrument_view'].get('livestream_tasks', {}).keys():
daq.tasks = self.config['instrument_view']['livestream_tasks'][daq_name]['tasks']

# unanchor grid in volume widget
# anchor grid in volume widget
for anchor, widget in zip(self.volume_plan.anchor_widgets, self.volume_plan.grid_offset_widgets):
Expand Down
2 changes: 1 addition & 1 deletion src/view/instrument_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -454,10 +454,10 @@ def setup_channel_widget(self) -> None:
laser_button_group = QButtonGroup(widget)
for channel, specs in self.channels.items():
button = QRadioButton(str(channel))
button.setChecked(True) # Arbitrarily set last button checked
button.toggled.connect(lambda value, ch=channel: self.change_channel(value, ch))
laser_button_group.addButton(button)
widget_layout.addWidget(button)
button.setChecked(True) # Arbitrarily set last button checked
widget.setLayout(widget_layout)
widget.setSizePolicy(QSizePolicy.Maximum, QSizePolicy.Minimum)
self.viewer.window.add_dock_widget(widget, area='bottom', name='Channels')
Expand Down