build_lbda_from_config

build_lbda_from_config#

build_lbda_from_config(config)[source]#

Build wavelength coordinates from a configuration dictionary.

Parameters:

config (dict) –

Spectrograph configuration dictionary. The following keys are used:

  • "spectral_range": (wmin, wmax) in Angstrom.

  • "dispersion_law": ecsv file with wavelength and offset (in pix) columns. If given, it defines the wavelength solution.

  • "dispersion_scale": scaling applied to the dispersion law (default 1).

  • "spectral_resolution": resolving power, used if no "dispersion_law" is given.

  • "dispersion_resolution": number of pixels per resolution element (default 2.1).

Returns:

Raises:

ValueError – If neither "spectral_resolution" nor "dispersion_law" is set.