Skip to content
Snippets Groups Projects
Commit 3a12a43f authored by Harriet Brown's avatar Harriet Brown
Browse files

Add try catch for bad inputs on rebin algorithm

This commit adds a try except statement around the Rebin algorithm in polaris_algs that catches a failing rebin call and return instead the default pdf_output

Re #27554
parent 9d73e17c
No related branches found
No related tags found
No related merge requests found
...@@ -116,7 +116,10 @@ def generate_ts_pdf(run_number, focus_file_path, merge_banks=False, q_lims=None, ...@@ -116,7 +116,10 @@ def generate_ts_pdf(run_number, focus_file_path, merge_banks=False, q_lims=None,
PreserveEvents=True) PreserveEvents=True)
common.remove_intermediate_workspace('self_scattering_correction') common.remove_intermediate_workspace('self_scattering_correction')
if output_binning is not None: if output_binning is not None:
pdf_output = mantid.Rebin(InputWorkspace=pdf_output, Params=output_binning) try:
pdf_output = mantid.Rebin(InputWorkspace=pdf_output, Params=output_binning)
except RuntimeError:
return pdf_output
return pdf_output return pdf_output
......
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