Skip to content

Commit

Permalink
added widgets. this refs #7 #8
Browse files Browse the repository at this point in the history
  • Loading branch information
JeanBilheux committed Aug 23, 2022
1 parent 8f46241 commit 923407e
Show file tree
Hide file tree
Showing 2 changed files with 279 additions and 173 deletions.
13 changes: 13 additions & 0 deletions rockit_autoreconstruction_ui/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,12 @@ def read_yaml(self):
except KeyError:
self.ob_use_max_number_of_files = False

# automatic edge cropping
try:
self.automatic_edge_cropping = yaml_data['edge_cropping']['automatic']
except KeyError:
self.automatic_edge_cropping = True

return Status.ok

def initialize_statusbar(self):
Expand Down Expand Up @@ -259,6 +265,9 @@ def ob_radioButton_changed(self):
_ui.setEnabled(state_ob_time)
self.ui.maximum_number_of_ob_spinBox.setEnabled(not state_ob_time)

def ring_removal_algorithm_checkBox_changed(self, state):
self.ui.ring_removal_algorithm_comboBox.setEnabled(state)

def ok_clicked(self):
ipts_number = self.ui.ipts_spinBox.value()

Expand Down Expand Up @@ -299,6 +308,7 @@ def ok_clicked(self):
ob_minutes = self.ui.ob_minutes_spinBox.value()
ob_max_number_of_files = self.ui.maximum_number_of_ob_spinBox.value()
ob_use_max_number_of_files = self.ui.maximum_number_of_ob_radioButton.isChecked()
automatic_edge_cropping = self.ui.automatic_edge_cropping_checkBox.isChecked()

yaml_data = {'DataPath':
{'ipts': ipts_number,
Expand All @@ -319,6 +329,9 @@ def ok_clicked(self):
'max_number_of_files': ob_max_number_of_files,
'use_max_number_of_files': ob_use_max_number_of_files,
},
'edge_cropping': {
'automatic': automatic_edge_cropping,
}
}
with io.open(self.autoreduce_config_file, 'w') as outfile:
yaml.dump(yaml_data, outfile, default_flow_style=False, allow_unicode=True)
Expand Down
Loading

0 comments on commit 923407e

Please sign in to comment.