Skip to content

Commit

Permalink
make sure we stop only after the number of projections requested is t…
Browse files Browse the repository at this point in the history
…here. this refs #75
  • Loading branch information
JeanBilheux committed Aug 16, 2023
1 parent 0090a45 commit 6fbb433
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/hyperctui/autonomous_reconstruction/event_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,14 +329,17 @@ def refresh_table_clicked(self):
self.checking_state_of_widgets_post_reconstruction()

def checking_state_of_widgets_post_reconstruction(self):
"""This is looking for all the projections angles requested. If they are all there, then
it will change the state of the widgets."""

list_projections_folders_acquired_so_far = \
self.parent.session_dict[SessionKeys.list_projections_folders_acquired_so_far]

if list_projections_folders_acquired_so_far is None:
return

if len(list_projections_folders_acquired_so_far) == 3:
number_of_projections_requested = self.parent.ui.evaluation_frequency_spinBox.value()
if len(list_projections_folders_acquired_so_far) == number_of_projections_requested:

# all the projections showed up, no need to click the refresh button anymore
self.parent.ui.autonomous_refresh_pushButton.setEnabled(False)
Expand Down Expand Up @@ -508,4 +511,3 @@ def update_autonomous_reconstruction_widgets(self):
self.fill_table_with_list_folders(list_folders=list_folders_acquired,
starting_row_index=0)
self.checking_state_of_widgets_post_reconstruction()

0 comments on commit 6fbb433

Please sign in to comment.