docs: def calculate_bin_widths(edges):
      """
      Calculate the widths of wavelengths bins given their edges.
  
      Parameters
      ----------
      edges : array_like
          Sequence of bin edges. Must be 1D and have at least two values.
  
      Returns
      -------
      widths : ndarray
          Array of bin widths. Will be 1D and have one less value than ``edges``.
  
      """
      edges = np.asanyarray(edges)
  
      if edges.ndim != 1:
          raise ValueError('edges input array must be 1D.')
  
      if edges.size < 2:
          raise ValueError('edges input must have at least two values.')
  
      return edges[1:] - edges[:-1]