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

Remove intermediate workspaces from polaris_algs

parent 46401b9b
No related branches found
No related tags found
No related merge requests found
......@@ -91,7 +91,8 @@ class FitIncidentSpectrum(PythonAlgorithm):
rebinned = Rebin(
InputWorkspace=self._input_ws,
Params=self._binning_for_fit,
PreserveEvents=True)
PreserveEvents=True,
StoreInADS=False)
x_fit = np.array(rebinned.readX(self._incident_index))
y_fit = np.array(rebinned.readY(self._incident_index))
rebin_norm = x.size/x_fit.size
......
......@@ -197,9 +197,9 @@ def _generate_grouped_ts_pdf(run_number, focused_ws, q_lims, cal_file_name, samp
q_min[i] = pdf_x_array[np.amin(np.where(pdf_x_array >= q_min[i]))]
q_max[i] = pdf_x_array[np.amax(np.where(pdf_x_array <= q_max[i]))]
bin_width = min(pdf_x_array[1] - pdf_x_array[0], bin_width)
mantid.MatchSpectra(InputWorkspace=focused_data_combined,
OutputWorkspace=focused_data_combined,
ReferenceSpectrum=1)
#mantid.MatchSpectra(InputWorkspace=focused_data_combined,
# OutputWorkspace=focused_data_combined,
# ReferenceSpectrum=1)
focused_data_combined = mantid.CropWorkspaceRagged(InputWorkspace=focused_data_combined, XMin=q_min, XMax=q_max)
focused_data_combined = mantid.Rebin(InputWorkspace=focused_data_combined,
Params=[min(q_min), bin_width, max(q_max)])
......@@ -211,8 +211,12 @@ def _generate_grouped_ts_pdf(run_number, focused_ws, q_lims, cal_file_name, samp
PDFType="G(r)",
Filter=True)
common.remove_intermediate_workspace('cal_workspace_group')
common.remove_intermediate_workspace(correction_ws)
common.remove_intermediate_workspace(fit_spectra)
common.remove_intermediate_workspace(monitor)
common.remove_intermediate_workspace(placzek)
common.remove_intermediate_workspace(raw_ws)
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