Skip to content

Commit

Permalink
add more ext
Browse files Browse the repository at this point in the history
  • Loading branch information
searscr committed Sep 30, 2023
1 parent e92b77c commit 7d03dfc
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion launcher/scripts/off_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
2 changes: 1 addition & 1 deletion launcher/scripts/refracted_beam.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
10 changes: 5 additions & 5 deletions launcher/scripts/template_reduction.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand All @@ -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)
Expand All @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion reduction/lr_reduction/template.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion reduction/lr_reduction/workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion scripts/autoreduce/sf_calculator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7d03dfc

Please sign in to comment.