WCS Utilities

The wcs_utils module has functions for converting spectral values between air and vacuum, as well as a function for calculating the refractive index of air, which is used in the air to vacuum conversions. There are multiple methods available for the refractive index calculation, most of which agree with each other to a high level of precision. However, the Griesen (2006) equation seems to have a small offset from the others of about 0.07 Angstrom (at the wavelengths shown in the plot below) and thus in specutils 1.17.0 we have changed from using that method as the default to using the Morton (2000) equation by default, which is consistent with the IAU standard.

Results of air to vac conversion at optical wavelengths.

The downside of all methods but Griesen (2006) is that they have mathematical singularities in the far UV, and thus are only valid at wavelengths longer than 200 nm. The specutils conversion functions will raise an error if these methods are used for wavelengths shorter than this limit.

Demonstration of singularities in the equations for refractive index.

For additional context and discussion, see https://github.com/astropy/specutils/issues/1162.

Reference/API

Functions

air_to_vac(wavelength[, scheme, method, ...])

Converts air to vacuum wavelengths using different methods.

air_to_vac_deriv(wavelength[, method])

Calculates the derivative d(wave_vacuum) / d(wave_air) using different methods.

gwcs_from_array(array)

Create a new WCS from provided tabular data.

gwcs_slice(self, item)

This is a bit of a hack in order to fix the slicing of the WCS in the spectral dispersion direction.

refraction_index(wavelength[, method, co2])

Calculates the index of refraction of dry air at standard temperature and pressure, at different wavelengths, using different methods.

vac_to_air(wavelength[, method, co2])

Converts vacuum to air wavelengths using different methods.