Viewing contents of file '../idllib/ghrs/pro/airtovac.pro'
pro airtovac,wave
;+
; NAME:
; AIRTOVAC
; PURPOSE:
; Convert air wavelengths to vacuum wavelengths, i.e.
; correct for the index of refraction of air under standard
; conditions. Wavelength values below 2000 A will not be
; altered. Accurate to about 0.005 A
; CALLING SEQUENCE:
; AIRTOVAC,WAVE
; INPUT/OUTPUT:
; WAVE - Wavelength in Angstroms, scalar or vector
; WAVE should be input as air wavelength(s), it will be
; returned as vacuum wavelength(s). WAVE is always converted to
; double precision upon return.
; EXAMPLE:
; If the air wavelength is W = 6056.125 (a Krypton line), then
; AIRTOVAC,W yields an vacuum wavelength of W = 6057.804
; (The correct value is 6057.802)
; METHOD:
; An approximation to the 4th power of inverse wavenumber is used
; See IUE Image Processing Manual Page 6-15.
; REVISION HISTORY
; Written, D. Lindler 1982
; Documentation W. Landsman Feb. 1989
;-
; Compute conversion factor
;
if n_params(0) eq 0 then begin
print,string(7B),'Calling Sequence - AIRTOVAC,WAVE'
print,'WAVE is the air wavelength in Angstroms'
return
endif
wave2 = double(wave)*wave
fact=1.0 + 2.735182e-4 + 131.4182/wave2 + 2.76249e8/(wave2*wave2)
fact= fact*(wave ge 2000.) + 1.0*(wave lt 2000.0)
;
wave=wave*fact ;Convert Wavelength
return
end