ess.sans.normalization.process_wavelength_bands#
- ess.sans.normalization.process_wavelength_bands(wavelength_bands, wavelength_bins)[source]#
Perform some checks and potential reshaping on the wavelength bands.
The wavelength bands must be either one- or two-dimensional. If the wavelength bands are defined as a one-dimensional array, convert them to a two-dimensional array with start and end wavelengths.
The final bands must have a size of 2 in the wavelength dimension, defining a start and an end wavelength.
The band edges are snapped onto
wavelength_bins, moving each edge by at most half a bin width._reduce()selects a band from event data by re-binning onto the band edges but from dense data by slicing whole bins, and only bands aligned with the bins make the two select the same wavelength range. Unaligned bands leave the I(Q) numerator and denominator covering different ranges, biasing each band by several percent when bands are only a few bins wide. Seeess.sans.types.ProcessedWavelengthBands.- Raises:
ValueError – If the bands are not two wavelength values per band, fall outside
wavelength_bins, are not ordered, or are narrower than a wavelength bin.- Return type: