scipp.collapse#
- scipp.collapse(scipp_obj, keep)#
Slice down the input object until only the supplied keep dimension is left (effectively ‘collapsing’ all but one dimension), and return a dict of 1D slices. A common use for this is plotting spectra from detectors where most pixels contain noise, but one specific channel contains a strong signal. The plot function accepts a dict of data arrays.