From ccde6bc821de58919ddffbaa753699ced9ba96bb Mon Sep 17 00:00:00 2001 From: Yuanpeng Zhang Date: Wed, 8 Jan 2025 19:52:50 -0500 Subject: [PATCH] change pystog location --- addie/post_process_m/event_handler.py | 3 ++- addie/processing/mantid/launch_reduction.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/addie/post_process_m/event_handler.py b/addie/post_process_m/event_handler.py index 1d7b7fd7..aad7db21 100644 --- a/addie/post_process_m/event_handler.py +++ b/addie/post_process_m/event_handler.py @@ -23,6 +23,7 @@ 'Sat', 'Sun' ] +pystog_cli = "/SNS/users/y8z/miniconda/envs/pystog/bin/pystog_cli" def open_workspaces(main_window): @@ -1090,7 +1091,7 @@ def execute_stog(main_window): os.chdir(path) with open('pystog_input.json', 'w') as pystog_file: json.dump(json_format, pystog_file, indent=2) - subprocess.check_call(["pystog_cli", "--json", "pystog_input.json"]) + subprocess.check_call([pystog_cli, "--json", "pystog_input.json"]) os.chdir(cwd) print("[Info] PyStoG successfully executed") diff --git a/addie/processing/mantid/launch_reduction.py b/addie/processing/mantid/launch_reduction.py index 86f93258..b2727aff 100755 --- a/addie/processing/mantid/launch_reduction.py +++ b/addie/processing/mantid/launch_reduction.py @@ -28,6 +28,7 @@ 'Sat', 'Sun' ] +pystog_cli = "/SNS/users/y8z/miniconda/envs/pystog/bin/pystog_cli" def extractor(nexus_file: str, wks_name: str, out_dir: str, dir_name=None): @@ -568,7 +569,7 @@ def run_mantid(parent): json.dump(pystog_config, f, indent=2) cwd = os.getcwd() os.chdir(p_out_dir) - subprocess.run(["pystog_cli", "--json", f"{sam_title}_pystog.json"]) + subprocess.run([pystog_cli, "--json", f"{sam_title}_pystog.json"]) if os.path.exists("ft.dat"): os.remove("ft.dat") os.chdir(cwd)