eradiate.ckd.bin_filter_interval#
- eradiate.ckd.bin_filter_interval(wmin, wmax, endpoints=True)[source]#
Select bins in a wavelength interval.
- Parameters:
wmin (
pint.Quantity
) – Lower bound of the spectral interval defining the filter.wmax (
pint.Quantity
) – Upper bound of the spectral interval defining the filter. Must be equal to or greater thanwmin
.endpoints (
bool
) – IfTrue
, bins must have at least one of their bounds within the interval to be selected. IfFalse
, bins must have both bounds in the interval to be selected.
- Returns:
callable()
– A callable which returnsTrue
iff a bin is in the specified interval.- Raises:
ValueError – If
wmin > wmax
.