build_lbda

Contents

build_lbda#

build_lbda(spectral_range, spectral_resolution=None, wsol=None, dsol=None, npx_resolution=2)[source]#

Build the wavelength coordinates.

This computes the mid-bin wavelengths (lbda) and the bin edge wavelengths (lbda_edges), either from a constant resolving power (if wsol is None, see lbda_from_resolution_power) or from a wavelength/dispersion solution.

Parameters:
  • spectral_range (tuple of float) – Spectral domain (wmin, wmax), in Angstrom.

  • spectral_resolution (float, optional) – Resolving power R. Used (and required) only if wsol is None. Default is None.

  • wsol (callable, optional) – Wavelength solution (pixel -> wavelength in Angstrom). Default is None.

  • dsol (callable, optional) – Dispersion solution (wavelength in Angstrom -> pixel). Required if wsol is given. Default is None.

  • npx_resolution (float, optional) – Number of pixels per spectral resolution element. Only used if wsol is None. Default is 2.

Returns: