Skip to content
Snippets Groups Projects
Commit 2d8c9da9 authored by Joe Ramsay's avatar Joe Ramsay
Browse files

Revert "Re #22526 Add save_gda parameter to GEM object"

This reverts commit 83b653be.
The previous commit was put in as a solution for a starter exercise
for the next isis_powder developer - it is not actually part of this
work
parent 83b653be
No related branches found
No related tags found
Loading
......@@ -77,10 +77,6 @@ class Gem(AbstractInst):
maud_calib_filename = filename_stub + ".maud"
out_file_names["maud_calib_filename"] = maud_calib_filename
if self._inst_settings.save_gda:
gda_filename = filename_stub + ".gda"
out_file_names["gda_filename"] = gda_filename
return out_file_names
def _output_focused_ws(self, processed_spectra, run_details, output_mode=None):
......@@ -102,26 +98,17 @@ class Gem(AbstractInst):
if "angles_filename" in output_paths:
gem_algs.save_angles(d_spacing_group, output_paths["angles_filename"])
save_gda = "gda_filename" in output_paths
save_maud_calib = "maud_calib_filename" in output_paths
if save_gda or save_maud_calib:
if "maud_calib_filename" in output_paths:
gsas_calib_file_path = os.path.join(self._inst_settings.calibration_dir,
self._inst_settings.gsas_calib_filename)
if not os.path.exists(gsas_calib_file_path):
raise RuntimeWarning("Could not save MAUD calibration file, as GSAS calibration file was not found. "
"It should be present at " + gsas_calib_file_path)
else:
if save_gda:
gem_algs.save_gda(d_spacing_group=d_spacing_group,
output_path=output_paths["gda_filename"],
gsas_calib_filename=gsas_calib_file_path,
grouping_scheme=self._inst_settings.maud_grouping_scheme)
if save_maud_calib:
gem_algs.save_maud_calib(d_spacing_group=d_spacing_group,
output_path=output_paths["maud_calib_filename"],
gsas_calib_filename=gsas_calib_file_path,
grouping_scheme=self._inst_settings.maud_grouping_scheme)
gem_algs.save_maud_calib(d_spacing_group=d_spacing_group,
output_path=output_paths["maud_calib_filename"],
gsas_calib_filename=gsas_calib_file_path,
grouping_scheme=self._inst_settings.maud_grouping_scheme)
return d_spacing_group, tof_group
......
......@@ -101,7 +101,6 @@ def get_mode_specific_variables(is_texture_mode):
"vanadium_cropping_values": texture_vanadium_cropping_values,
"grouping_file_name": "offsets_xie_test_2.cal",
"save_angles": True,
"save_gda": True,
"save_maud": True,
"save_maud_calib": True}
else:
......@@ -109,7 +108,6 @@ def get_mode_specific_variables(is_texture_mode):
"vanadium_cropping_values": vanadium_cropping_values,
"grouping_file_name": "GEM_Instrument_grouping.cal",
"save_angles": False,
"save_gda": False,
"save_maud": False,
"save_maud_calib": False}
......
......@@ -63,11 +63,3 @@ def save_maud_calib(d_spacing_group, output_path, gsas_calib_filename, grouping_
GSASParamFile=gsas_calib_filename,
GroupingScheme=grouping_scheme,
OutputFilename=output_path)
def save_gda(d_spacing_group, output_path, gsas_calib_filename, grouping_scheme):
cropped = mantid.CropWorkspace(InputWorkspace=d_spacing_group, XMax=10, StoreInADS=False)
mantid.SaveGDA(InputWorkspace=cropped,
GSASParamFile=gsas_calib_filename,
GroupingScheme=grouping_scheme,
Filename=output_path)
......@@ -25,7 +25,6 @@ attr_mapping = \
ParamMapEntry(ext_name="sample_empty", int_name="sample_empty", optional=True),
ParamMapEntry(ext_name="sample_empty_scale", int_name="sample_empty_scale"),
ParamMapEntry(ext_name="save_angles", int_name="save_angles"),
ParamMapEntry(ext_name="save_gda", int_name="save_gda"),
ParamMapEntry(ext_name="save_maud_calib", int_name="save_maud_calib"),
ParamMapEntry(ext_name="save_maud", int_name="save_maud"),
ParamMapEntry(ext_name="spline_coefficient", int_name="spline_coeff"),
......
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