diff --git a/scripts/Diffraction/isis_powder/polaris.py b/scripts/Diffraction/isis_powder/polaris.py index 89b7c365a5a77d7c1c6c4df7f7d09e77278ec2c5..f0985a4eb9ebc89fbe9bdc9fc5c54c1bbe78f374 100644 --- a/scripts/Diffraction/isis_powder/polaris.py +++ b/scripts/Diffraction/isis_powder/polaris.py @@ -51,6 +51,8 @@ class Polaris(AbstractInst): def create_total_scattering_pdf(self, **kwargs): if 'q_lims' not in kwargs: kwargs['q_lims'] = None + if 'output_binning' not in kwargs: + kwargs['output_binning'] = None self._inst_settings.update_attributes(kwargs=kwargs) # Generate pdf run_details = self._get_run_details(self._inst_settings.run_number) @@ -61,7 +63,8 @@ class Polaris(AbstractInst): merge_banks=self._inst_settings.merge_banks, q_lims=self._inst_settings.q_lims, cal_file_name=cal_file_name, - sample_details=self._sample_details) + sample_details=self._sample_details, + output_binning=self._inst_settings.output_binning) return pdf_output def set_sample_details(self, **kwargs): diff --git a/scripts/Diffraction/isis_powder/polaris_routines/polaris_algs.py b/scripts/Diffraction/isis_powder/polaris_routines/polaris_algs.py index 8cf5287de594446ed236ea15dec0dd359d5139cb..e76b1ed7f5225739a4a1ab0ec003cb73e98d44b8 100644 --- a/scripts/Diffraction/isis_powder/polaris_routines/polaris_algs.py +++ b/scripts/Diffraction/isis_powder/polaris_routines/polaris_algs.py @@ -80,7 +80,7 @@ def save_unsplined_vanadium(vanadium_ws, output_path): def generate_ts_pdf(run_number, focus_file_path, merge_banks=False, q_lims=None, cal_file_name=None, - sample_details=None): + sample_details=None, output_binning=None): focused_ws = _obtain_focused_run(run_number, focus_file_path) focused_ws = mantid.ConvertUnits(InputWorkspace=focused_ws, Target="MomentumTransfer", EMode='Elastic') @@ -115,6 +115,8 @@ def generate_ts_pdf(run_number, focus_file_path, merge_banks=False, q_lims=None, pdf_output = mantid.RebinToWorkspace(WorkspaceToRebin=pdf_output, WorkspaceToMatch=pdf_output[4], PreserveEvents=True) common.remove_intermediate_workspace('self_scattering_correction') + if output_binning is not None: + pdf_output = mantid.Rebin(InputWorkspace=pdf_output, Params=output_binning) return pdf_output diff --git a/scripts/Diffraction/isis_powder/polaris_routines/polaris_param_mapping.py b/scripts/Diffraction/isis_powder/polaris_routines/polaris_param_mapping.py index 911791606e04cbf712e75ba7d5304b5ec9c9bdb9..5d5742027d6f70c26009c6c18669e9e0ad7c2ba9 100644 --- a/scripts/Diffraction/isis_powder/polaris_routines/polaris_param_mapping.py +++ b/scripts/Diffraction/isis_powder/polaris_routines/polaris_param_mapping.py @@ -35,6 +35,7 @@ attr_mapping = [ ParamMapEntry(ext_name="sample_empty_scale", int_name="sample_empty_scale"), ParamMapEntry(ext_name="suffix", int_name="suffix", optional=True), ParamMapEntry(ext_name="spline_coefficient", int_name="spline_coeff"), + ParamMapEntry(ext_name="output_binning", int_name="output_binning"), ParamMapEntry(ext_name="output_directory", int_name="output_dir"), ParamMapEntry(ext_name="user_name", int_name="user_name"), ParamMapEntry(ext_name="vanadium_cropping_values", int_name="van_crop_values"),