Suppose I have a workspace where the X values don’t quite match between spectra, and I want to crop based on Xmin, Xmax:
CropWorkspace includes only those data points in the range, perhaps with padding if the spectra would be of different lengths. Bins where all X values are out of range will be removed. Preferably, the workspace should be no longer (in number of bins) than the longest good portion of any spectrum, with spectra being shifted with respect to each other (in terms of bin numbers) if necessary.
Padding bins should be set to E=Inf or masked or some similar value such that a weighted average, integral, etc of the spectrum ignores them.
The workspace is not cropped. The X values are copied across in their entirety including those below Xmin or above Xmax. The Y and E values outside the range are all set to zero.
Try this (as shown it crops a Point workspace but is easily modified to generate a histogram workspace which shows the same behaviour):
In this example the cropped workspace ought to include only the points at x=2 and x=3.
Using the “Muon Nightly Build” from the Download page (3.11.20180103.1049) on Windows 7: may affect others