diff --git a/src/hyperctui/hyperctui.py b/src/hyperctui/hyperctui.py index da868c7..114ef62 100644 --- a/src/hyperctui/hyperctui.py +++ b/src/hyperctui/hyperctui.py @@ -29,7 +29,7 @@ from hyperctui.session import DefaultValues # warnings.filterwarnings('ignore') -DEBUG = True +DEBUG = False if DEBUG: HOME_FOLDER = "/Volumes/JeanHardDrive/" # mac at home @@ -501,6 +501,7 @@ def set_window_title(self): self.ui.setWindowTitle(title) def inform_of_output_location(self): + facility = self.session_dict.get(SessionKeys.facility, 'SNS') instrument = self.session_dict[SessionKeys.instrument] ipts = self.session_dict[SessionKeys.ipts_selected] title = self.ui.run_title_formatted_label.text() @@ -519,21 +520,21 @@ def inform_of_output_location(self): if title == "N/A": title = "'title'" - output_location = os.sep.join([self.homepath, + output_location = os.sep.join([facility, instrument, ipts, "shared", "autoreduce", "mcp", ]) - ob_output_location = os.sep.join([self.homepath, + ob_output_location = os.sep.join([facility, instrument, ipts, "shared", "autoreduce", "mcp", ]) - final_ob_output_location = os.sep.join([self.homepath, + final_ob_output_location = os.sep.join([facility, instrument, ipts, "shared", diff --git a/src/hyperctui/session/__init__.py b/src/hyperctui/session/__init__.py index ed58619..664e74b 100644 --- a/src/hyperctui/session/__init__.py +++ b/src/hyperctui/session/__init__.py @@ -2,6 +2,7 @@ class SessionKeys: config_version = 'config version' + facility = 'facility' instrument = 'instrument' ipts_selected = 'ipts selected' ipts_index_selected = 'ipts index selected' diff --git a/src/hyperctui/session/new_session.py b/src/hyperctui/session/new_session.py index 54ed2c9..10ad3c0 100644 --- a/src/hyperctui/session/new_session.py +++ b/src/hyperctui/session/new_session.py @@ -47,6 +47,7 @@ def accept(self): ipts = self.ui.ipts_comboBox.currentText() ipts_index = self.ui.ipts_comboBox.currentIndex() + self.parent.session_dict[SessionKeys.facility] = 'SNS' if instrument in ['SNAP', 'VENUS'] else 'HFIR' self.parent.session_dict[SessionKeys.instrument] = instrument self.parent.session_dict[SessionKeys.ipts_selected] = ipts self.parent.session_dict[SessionKeys.ipts_index_selected] = ipts_index diff --git a/src/hyperctui/session/session_handler.py b/src/hyperctui/session/session_handler.py index ef115a3..769b0f8 100644 --- a/src/hyperctui/session/session_handler.py +++ b/src/hyperctui/session/session_handler.py @@ -42,6 +42,7 @@ def save_from_ui(self): session_dict[SessionKeys.window_height] = height instrument = session_dict[SessionKeys.instrument] + instrument = session_dict.get(SessionKeys.facility, 'SNS') ipts_selected = session_dict[SessionKeys.ipts_selected] ipts_index_selected = session_dict[SessionKeys.ipts_index_selected] @@ -57,6 +58,7 @@ def save_from_ui(self): output_projection_folder = o_get_step1.projection_folder() output_ob_folder = o_get_step1.ob_folder() + session_dict[SessionKeys.facility] = facility session_dict[SessionKeys.instrument] = instrument session_dict[SessionKeys.ipts_selected] = ipts_selected session_dict[SessionKeys.ipts_index_selected] = ipts_index_selected