diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2015-07-08 20:46:52 -0400 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2015-07-08 20:46:52 -0400 |
commit | fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 (patch) | |
tree | bdda434976bc09c864f2e4fa6f16ba1952b1e555 /noao/astutil/asttools/astlvac.x | |
download | iraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz |
Initial commit
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 |