Skip to content

Commit

Permalink
monitor of OBs and 0, 180 projections are done. this refs #84
Browse files Browse the repository at this point in the history
  • Loading branch information
JeanBilheux committed Aug 27, 2024
1 parent 72b265e commit 45b5487
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
1 change: 1 addition & 0 deletions src/hyperctui/pre_processing_monitor/event_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ def update_ob_monitor_table(self,

# we go row by row to see if we need to change the status of the row
range_row_to_update = np.arange(starting_working_row, starting_working_row + len(list_new_ob_folders))
list_new_ob_folders.sort()

for _new_file_index, _row in enumerate(range_row_to_update):

Expand Down
27 changes: 15 additions & 12 deletions src/hyperctui/pre_processing_monitor/monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,12 @@ def preview_summary(self, state=0, row=-1, data_type='ob'):
preview_file.show()

def refresh_button_clicked(self):
logging.info("Updating monitor table!")
logging.info("Updating monitor table (OBs, 0degree and 180degrees projections)!")
o_event = MonitorEventHandler(parent=self,
grand_parent=self.parent)
o_event.checking_status_of_expected_obs()

if not self.all_obs_found:
o_event.checking_status_of_expected_obs()

if self.all_obs_found:

Expand All @@ -94,16 +96,17 @@ def refresh_button_clicked(self):
self.ui.final_ob_folder_label.setVisible(False)
self.ui.final_ob_folder_status.setVisible(False)

o_event.checking_status_of_expected_projections()
if self.all_projections_found:

logging.info(f"-> all projections found!")
if not self.parent.session_dict[SessionKeys.all_tabs_visible]:
self.parent.session_dict[SessionKeys.all_tabs_visible] = True
o_widgets = UtilityWidgets(parent=self.parent)
o_widgets.make_tabs_visible(is_visible=True)
self.parent.initialize_crop()
self.parent.initialize_center_of_rotation()
logging.info("Checking status of 0 and 180 degrees projections")
o_event.checking_status_of_expected_projections()
if self.all_projections_found:

logging.info(f"-> all projections found!")
if not self.parent.session_dict[SessionKeys.all_tabs_visible]:
self.parent.session_dict[SessionKeys.all_tabs_visible] = True
o_widgets = UtilityWidgets(parent=self.parent)
o_widgets.make_tabs_visible(is_visible=True)
self.parent.initialize_crop()
self.parent.initialize_center_of_rotation()

def closeEvent(self, c):
self.parent.monitor_ui = None
Expand Down

0 comments on commit 45b5487

Please sign in to comment.