Skip to content
Snippets Groups Projects
Commit efb6c992 authored by David Fairbrother's avatar David Fairbrother
Browse files

Re #18643 Added empty can option for GEM

parent 6df30417
No related branches found
No related tags found
No related merge requests found
...@@ -42,10 +42,10 @@ def get_run_details(run_number_string, inst_settings): ...@@ -42,10 +42,10 @@ def get_run_details(run_number_string, inst_settings):
offset_file_path = os.path.join(label_calibration_folder, offset_file_name) offset_file_path = os.path.join(label_calibration_folder, offset_file_name)
splined_file_path = os.path.join(label_calibration_folder, splined_vanadium_name) splined_file_path = os.path.join(label_calibration_folder, splined_vanadium_name)
# TODO generate splined vanadium name from common
run_details = RunDetails.RunDetails(run_number=run_number) run_details = RunDetails.RunDetails(run_number=run_number)
run_details.empty_runs = empty_runs run_details.empty_runs = empty_runs
# Rarely used attribute so we will leave it as optional
run_details.sample_empty = inst_settings.sample_empty if hasattr(inst_settings, "sample_empty") else None
run_details.user_input_run_number = run_number_string run_details.user_input_run_number = run_number_string
run_details.label = label run_details.label = label
run_details.vanadium_run_numbers = vanadium_runs run_details.vanadium_run_numbers = vanadium_runs
......
...@@ -12,6 +12,7 @@ attr_mapping = [("calibration_directory", "calibration_dir"), ...@@ -12,6 +12,7 @@ attr_mapping = [("calibration_directory", "calibration_dir"),
("raw_tof_cropping_values", "raw_tof_cropping_values"), ("raw_tof_cropping_values", "raw_tof_cropping_values"),
("run_in_range", "run_in_range"), ("run_in_range", "run_in_range"),
("run_number", "run_number"), ("run_number", "run_number"),
("sample_empty", "sample_empty"),
("spline_coefficient", "spline_coeff"), ("spline_coefficient", "spline_coeff"),
("output_directory", "output_dir"), ("output_directory", "output_dir"),
("user_name", "user_name"), ("user_name", "user_name"),
......
...@@ -12,6 +12,7 @@ class RunDetails(object): ...@@ -12,6 +12,7 @@ class RunDetails(object):
self.user_input_run_number = None self.user_input_run_number = None
self.empty_runs = None self.empty_runs = None
self.sample_empty = None
self.label = None self.label = None
self.offset_file_path = None self.offset_file_path = None
......
...@@ -12,6 +12,8 @@ def create_van(instrument, run_details, absorb): ...@@ -12,6 +12,8 @@ def create_van(instrument, run_details, absorb):
input_van_ws_list = common.load_current_normalised_ws_list(run_number_string=van, instrument=instrument, input_van_ws_list = common.load_current_normalised_ws_list(run_number_string=van, instrument=instrument,
input_batching=InputBatchingEnum.Summed) input_batching=InputBatchingEnum.Summed)
input_van_ws = input_van_ws_list[0] # As we asked for a summed ws there should only be one returned input_van_ws = input_van_ws_list[0] # As we asked for a summed ws there should only be one returned
# TODO where do we subtract empty can on GEM ?
corrected_van_ws = common.subtract_sample_empty(ws_to_correct=input_van_ws, corrected_van_ws = common.subtract_sample_empty(ws_to_correct=input_van_ws,
empty_sample_ws_string=run_details.empty_runs, empty_sample_ws_string=run_details.empty_runs,
instrument=instrument) instrument=instrument)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment