calculate_bin_centers

synphot.binning.calculate_bin_centers(edges)[source]

Calculate the centers of wavelengths bins given their edges.

Parameters:
edgesarray-like or Quantity

Sequence of bin edges. Must be 1D and have at least two values. If not a Quantity, assumed to be in Angstrom.

Returns:
centersQuantity

Array of bin centers. Will be 1D, have one less value than edges, and also the same unit.

Raises:
synphot.exceptions.SynphotError

Invalid input.