diff options
author | Joe Hunkeler <jhunkeler@gmail.com> | 2015-08-11 16:51:37 -0400 |
---|---|---|
committer | Joe Hunkeler <jhunkeler@gmail.com> | 2015-08-11 16:51:37 -0400 |
commit | 40e5a5811c6ffce9b0974e93cdd927cbcf60c157 (patch) | |
tree | 4464880c571602d54f6ae114729bf62a89518057 /noao/astutil/asttools/astlvac.x | |
download | iraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz |
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'noao/astutil/asttools/astlvac.x')
-rw-r--r-- | noao/astutil/asttools/astlvac.x | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/noao/astutil/asttools/astlvac.x b/noao/astutil/asttools/astlvac.x new file mode 100644 index 00000000..3ef4d895 --- /dev/null +++ b/noao/astutil/asttools/astlvac.x @@ -0,0 +1,29 @@ +# AST_LVAC -- Convert air wavelength to vacuum wavelength. +# +# Convert LAMBDA(air) to LAMBDA(vacuum) using the formulae +# +# (n-1)*1e8 = 8342.13 + 2406030/(130-s**2) + 15997/(38.9-s**2) +# +# where s = 1/lambda(air) (for lambda in MICRONS) +# +# lambda(vac) = n * lambda(air) +# +# NOTE: lambda is given in ANGSTROMS for this program. +# + +procedure ast_lvac (lair, lvac, npts) + +double lair[npts] #I Air wavelength (Angstroms) +double lvac[npts] #O Vacuum wavelength (Angstroms) +int npts #I Number of points + +int i +double s2, n + +begin + do i = 1, npts { + s2 = 1D8 * (1. / lair[i]) ** 2 + n = 1 + ((8342.13 + 2406030 / (130-s2) + 15997 / (38.9-s2)) / 1D8) + lvac[i] = n * lair[i] + } +end |