Skip to content

Commit

Permalink
Refs #8819 Throw more verbose error during reduction.
Browse files Browse the repository at this point in the history
  • Loading branch information
Samuel Jackson committed Feb 10, 2014
1 parent d85ec79 commit f275a83
Showing 1 changed file with 4 additions and 1 deletion.
Expand Up @@ -147,8 +147,11 @@ def _load_single_file(self, filename, output_ws):
else:
## Extract Monitor Spectrum
ExtractSingleSpectrum(InputWorkspace=ws,OutputWorkspace= ws+'_mon',WorkspaceIndex= self._monitor_index)
## Crop the workspace to remove uninteresting detectors

if self._detector_range_start < 0 or self._detector_range_end > mtd[ws].getNumberHistograms():
raise ValueError("Range %d - %d is not a valid detector range." % (self._detector_range_start, self._detector_range_end))

## Crop the workspace to remove uninteresting detectors
CropWorkspace(InputWorkspace=ws,OutputWorkspace= ws,
StartWorkspaceIndex=self._detector_range_start,
EndWorkspaceIndex=self._detector_range_end)
Expand Down

0 comments on commit f275a83

Please sign in to comment.