Skip to content

Commit

Permalink
Slight improvements to the docs, API docs fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
rosteen committed Oct 3, 2024
1 parent c31bfe0 commit 9fb945b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
7 changes: 4 additions & 3 deletions docs/wcs_utils.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ between air and vacuum, as well as a function for calculating the refractive ind
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 (see 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, which is
consistent with the IAU standard.
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.

.. image:: air_to_vac_offset.png
:alt: Results of air to vac conversion at optical wavelengths.
Expand All @@ -32,3 +32,4 @@ Reference/API
:skip: GWCS
:skip: Shift
:skip: Tabular1D
:skip: SpectralGWCS
13 changes: 8 additions & 5 deletions specutils/utils/wcs_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ def refraction_index(wavelength, method='Morton2000', co2=None):
UV. 'Griesen2006' gives values that are slightly inconsistent with the
other methods (~0.07 Angstrom difference at visible wavelengths), but it is
the best option in the FUV due to the mathematical singularities in the others.
See https://github.com/astropy/specutils/issues/1162 for more detail.
See https://specutils.readthedocs.io/en/latest/wcs_utils.html for more detail, or
https://github.com/astropy/specutils/issues/1162 for additional context.
co2 : number, optional
CO2 concentration in ppm. Only used for method='Ciddor1996'. If not
Expand Down Expand Up @@ -162,15 +163,17 @@ def air_to_vac(wavelength, scheme='inversion', method='Morton2000', co2=None,
How to convert from vacuum to air wavelengths. Options are:
* 'inversion' (default) - result is simply the inversion (1 / n) of the
refraction index of air. Griesen et al. (2006) report that the error
in naively inverting is less than 10^-9.
refraction index of air. Griesen et al. (2006) report that the error
in naively inverting is less than 10^-9.
* 'Piskunov' - uses an analytical solution derived by Nikolai Piskunov
and used by the Vienna Atomic Line Database (VALD).
and used by the Vienna Atomic Line Database (VALD).
* 'iteration' - uses an iterative scheme to invert the index of refraction.
method : str, optional
Only used if scheme is 'inversion' or 'iteration'. One of the methods
in refraction_index(), default is 'Morton2000'
in `~specutils.utils.wcs_utils.refraction_index`, default is 'Morton2000'
co2 : number, optional
Atmospheric CO2 concentration in ppm. Only used if scheme='inversion' and
Expand Down

0 comments on commit 9fb945b

Please sign in to comment.