From 7d03dfc6d24d00b4b5049ba6a94a4e7ba184c79f Mon Sep 17 00:00:00 2001 From: Carson Sears Date: Sat, 30 Sep 2023 08:39:06 -0500 Subject: [PATCH] add more ext --- launcher/scripts/off_spec.py | 2 +- launcher/scripts/refracted_beam.py | 2 +- launcher/scripts/template_reduction.py | 10 +++++----- reduction/lr_reduction/template.py | 2 +- reduction/lr_reduction/workflow.py | 2 +- scripts/autoreduce/sf_calculator.py | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/launcher/scripts/off_spec.py b/launcher/scripts/off_spec.py index e5e6119..02b63e5 100644 --- a/launcher/scripts/off_spec.py +++ b/launcher/scripts/off_spec.py @@ -22,7 +22,7 @@ class PixelData(): det_distance = DEFAULT_4B_SAMPLE_DET_DISTANCE def __init__(self, run_number): - self.ws = api.LoadEventNexus("REF_L_%s" % run_number, OutputWorkspace='r%s' % run_number) + self.ws = api.LoadEventNexus("REF_L_%s.nxs.h5" % run_number, OutputWorkspace='r%s' % run_number) self.run_number = run_number self.get_parameters() diff --git a/launcher/scripts/refracted_beam.py b/launcher/scripts/refracted_beam.py index 2f379a0..95dd881 100644 --- a/launcher/scripts/refracted_beam.py +++ b/launcher/scripts/refracted_beam.py @@ -401,7 +401,7 @@ def process_run(run_number, output_dir, material='Si'): """ Process file and extract offset and pixel size """ - ws_sc = api.LoadEventNexus("REF_L_%s" % run_number) + ws_sc = api.LoadEventNexus("REF_L_%s.nxs.h5" % run_number) refr = Refracted(ws_sc, material=material, offset=0.0, pixel_size=0.0007) diff --git a/launcher/scripts/template_reduction.py b/launcher/scripts/template_reduction.py index 9eef69c..a85a853 100644 --- a/launcher/scripts/template_reduction.py +++ b/launcher/scripts/template_reduction.py @@ -96,10 +96,10 @@ def reduce_30Hz(meas_run_30Hz, ref_run_30Hz, ref_data_60Hz, template_30Hz, scan_ template_data = read_template(template_30Hz, scan_index) # Reduce the quartz at 30Hz - ref_ws_30Hz = api.LoadEventNexus("REF_L_%s" % ref_run_30Hz) + ref_ws_30Hz = api.LoadEventNexus("REF_L_%s.nxs.h5" % ref_run_30Hz) # Reduce the sample data at 30Hz - meas_ws_30Hz = api.LoadEventNexus("REF_L_%s" % meas_run_30Hz) + meas_ws_30Hz = api.LoadEventNexus("REF_L_%s.nxs.h5" % meas_run_30Hz) # Load the 60Hz reference data data_60Hz = np.loadtxt(ref_data_60Hz).T @@ -209,7 +209,7 @@ def reduce_30Hz_from_ws(meas_ws_30Hz, ref_ws_30Hz, data_60Hz, template_data, sca def reduce_30Hz_slices(meas_run_30Hz, ref_run_30Hz, ref_data_60Hz, template_30Hz, time_interval, output_dir, scan_index=1, create_plot=True, template_reference=None): - meas_ws_30Hz = api.LoadEventNexus("REF_L_%s" % meas_run_30Hz) + meas_ws_30Hz = api.LoadEventNexus("REF_L_%s.nxs.h5" % meas_run_30Hz) return reduce_30Hz_slices_ws(meas_ws_30Hz, ref_run_30Hz, ref_data_60Hz, template_30Hz, time_interval, output_dir, scan_index=scan_index, create_plot=create_plot, @@ -218,7 +218,7 @@ def reduce_30Hz_slices(meas_run_30Hz, ref_run_30Hz, ref_data_60Hz, template_30Hz def reduce_60Hz_slices(meas_run, template_file, time_interval, output_dir, scan_index=1, create_plot=True): - meas_ws = api.LoadEventNexus("REF_L_%s" % meas_run) + meas_ws = api.LoadEventNexus("REF_L_%s.nxs.h5" % meas_run) return reduce_60Hz_slices_ws(meas_ws, template_file, time_interval, output_dir, scan_index=scan_index, create_plot=create_plot) @@ -244,7 +244,7 @@ def reduce_30Hz_slices_ws(meas_ws_30Hz, ref_run_30Hz, ref_data_60Hz, template_30 if os.path.isfile(ref_run_30Hz): ref_ws_30Hz = api.LoadEventNexus(ref_run_30Hz) else: - ref_ws_30Hz = api.LoadEventNexus("REF_L_%s" % ref_run_30Hz) + ref_ws_30Hz = api.LoadEventNexus("REF_L_%s.nxs.h5" % ref_run_30Hz) # Reduce the sample data at 30Hz print("Reading sample data at 30Hz") diff --git a/reduction/lr_reduction/template.py b/reduction/lr_reduction/template.py index 46de6ee..4ab3035 100644 --- a/reduction/lr_reduction/template.py +++ b/reduction/lr_reduction/template.py @@ -158,7 +158,7 @@ def process_from_template_ws(ws_sc, template_data, q_summing=False, # Load normalization run normalize = normalize and template_data.apply_normalization if ws_db is None and normalize: - ws_db = api.LoadEventNexus("REF_L_%s" % template_data.norm_file) + ws_db = api.LoadEventNexus("REF_L_%s.nxs.h5" % template_data.norm_file) # If we run in theta-theta geometry, we'll need thi thi_value = ws_sc.getRun()['thi'].value[0] diff --git a/reduction/lr_reduction/workflow.py b/reduction/lr_reduction/workflow.py index c7dbfd7..fde4f68 100644 --- a/reduction/lr_reduction/workflow.py +++ b/reduction/lr_reduction/workflow.py @@ -132,7 +132,7 @@ def reduce_fixed_two_theta(ws, template_file, output_dir, average_overlap=False, template_data = template.read_template(template_file, sequence_number) # Load normalization run - ws_db = mtd_api.LoadEventNexus("REF_L_%s" % template_data.norm_file) + ws_db = mtd_api.LoadEventNexus("REF_L_%s.nxs.h5" % template_data.norm_file) tthd_value = ws.getRun()['tthd'].value[0] # Look for parameters that might have been determined earlier for this measurement diff --git a/scripts/autoreduce/sf_calculator.py b/scripts/autoreduce/sf_calculator.py index 24bdcf7..f6f6cf6 100644 --- a/scripts/autoreduce/sf_calculator.py +++ b/scripts/autoreduce/sf_calculator.py @@ -110,7 +110,7 @@ def execute(self): # Load the data for run in run_list: - workspace = LoadEventNexus(Filename="REF_L_%s" % run, OutputWorkspace="__data_file_%s" % run) + workspace = LoadEventNexus(Filename="REF_L_%s.nxs.h5" % run, OutputWorkspace="__data_file_%s" % run) lr_data.append(workspace) sort_by_runs = True