diff --git a/docs/source/techniques/ISISPowder-GEM-v1.rst b/docs/source/techniques/ISISPowder-GEM-v1.rst index d384ae6ba6fc82fe53d62582662849ae229d44c1..9f3b5298923d99623798b82b720573f1ff147998 100644 --- a/docs/source/techniques/ISISPowder-GEM-v1.rst +++ b/docs/source/techniques/ISISPowder-GEM-v1.rst @@ -124,6 +124,7 @@ The following parameters may also be optionally set: - :ref:`texture_mode_isis-powder-diffraction-ref` - :ref:`unit_to_keep_gem_isis-powder-diffraction-ref` - :ref:`save_angles_gem_isis-powder-diffraction-ref` +- :ref:`save_gda_gem_isis-powder-diffraction-ref` If :ref:`sample_empty_gem_isis-powder-diffraction-ref` is set then the following parameter is also required: @@ -719,6 +720,20 @@ On GEM this is set to the following: save_angles: False +.. _save_gda_gem_isis-powder-diffraction-ref: + +save_gda +^^^^^^^^ + +If set to **True**, this saves the focused data to the MAUD-readable +``.gda`` format, using :ref:`SaveGDA <algm-SaveGDA>`. + +On GEM this is set to the following: + +.. code-block:: python + + save_gda: False + .. _save_maud_gem_isis-powder-diffraction-ref: save_maud diff --git a/scripts/Diffraction/isis_powder/gem.py b/scripts/Diffraction/isis_powder/gem.py index 28f5b792f172c263c39cf49db474d898c7cedd17..194f6a335221150bc321bb3f32984273155a18ac 100644 --- a/scripts/Diffraction/isis_powder/gem.py +++ b/scripts/Diffraction/isis_powder/gem.py @@ -71,6 +71,10 @@ class Gem(AbstractInst): angles_filename = filename_stub + "_grouping.new" out_file_names["angles_filename"] = angles_filename + if self._inst_settings.save_gda: + gda_filename = filename_stub + ".gda" + out_file_names["gda_filename"] = gda_filename + return out_file_names @staticmethod diff --git a/scripts/Diffraction/isis_powder/gem_routines/gem_advanced_config.py b/scripts/Diffraction/isis_powder/gem_routines/gem_advanced_config.py index 808da1880168f21c076bb695d56d87916a9957d4..4aa2c66c8bc38d31b93ddc3cf4005a94d3d06074 100644 --- a/scripts/Diffraction/isis_powder/gem_routines/gem_advanced_config.py +++ b/scripts/Diffraction/isis_powder/gem_routines/gem_advanced_config.py @@ -14,6 +14,7 @@ absorption_correction_params = { gem_adv_config_params = { "raw_tof_cropping_values": (500, 20000), "save_angles": False, + "save_gda": False, "spline_coefficient": 30 } diff --git a/scripts/Diffraction/isis_powder/gem_routines/gem_param_mapping.py b/scripts/Diffraction/isis_powder/gem_routines/gem_param_mapping.py index 627384e8c27014b22478bfbadfeafdfa3161cac7..db13b33c0e59f6389cd5e74e477c3bc94203806b 100644 --- a/scripts/Diffraction/isis_powder/gem_routines/gem_param_mapping.py +++ b/scripts/Diffraction/isis_powder/gem_routines/gem_param_mapping.py @@ -23,6 +23,7 @@ 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", int_name="save_maud"), ParamMapEntry(ext_name="spline_coefficient", int_name="spline_coeff"), ParamMapEntry(ext_name="suffix", int_name="suffix", optional=True), diff --git a/scripts/Diffraction/isis_powder/routines/common_output.py b/scripts/Diffraction/isis_powder/routines/common_output.py index eb5a845ad56ccdb48fe4da0867e34987d66a22c5..a882aaa7e7a6d5bd8c9445e607b077e1463abcca 100644 --- a/scripts/Diffraction/isis_powder/routines/common_output.py +++ b/scripts/Diffraction/isis_powder/routines/common_output.py @@ -67,11 +67,18 @@ def save_focused_data(d_spacing_group, tof_group, output_paths, run_number_strin if "angles_filename" in output_paths: _save_angles(d_spacing_group, output_paths["angles_filename"]) + if "gda_filename" in output_paths: + _save_gda(tof_group, output_paths["gda_filename"]) + def _save_angles(d_spacing_group, output_path): mantid.SaveBankScatteringAngles(InputWorkspace=d_spacing_group, Filename=output_path) +def _save_gda(tof_group, output_path): + mantid.SaveGDA(InputWorkspace=tof_group, Filename=output_path) + + def _save_maud(d_spacing_group, output_path): for i, ws in enumerate(d_spacing_group): mantid.SaveFocusedXYE(InputWorkspace=ws, Filename=output_path, SplitFiles=False, StartAtBankNumber=i,