calculate_bin_edges¶
- synphot.binning.calculate_bin_edges(centers)[source]¶
Calculate the edges of wavelength bins given the centers.
The algorithm calculates bin edges as the midpoints between bin centers and treats the first and last bins as symmetric about their centers.
- Parameters:
- centersarray-like or
Quantity
Sequence of bin centers. Must be 1D and have at least two values. If not a Quantity, assumed to be in Angstrom.
- centersarray-like or
- Returns:
- edges
Quantity
Array of bin edges. Will be 1D, have one more value than
centers
, and also the same unit.
- edges
- Raises:
- synphot.exceptions.SynphotError
Invalid input.