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 than wmin.

  • endpoints (bool) – If True, bins must have at least one of their bounds within the interval to be selected. If False, bins must have both bounds in the interval to be selected.

Returns

callable() – A callable which returns True iff a bin is in the specified interval.

Raises

ValueError – If wmin > wmax.