Differential Atmospheric Refraction¶
The effects of atmospheric refraction can be readily seen in any spectrograph or IFU. Atmospheric refraction will displace a source, or its spectrum, by an amount that is dependent on the source wavelength and the angular distance of the source from the zenith. This effect is due to the stratified density structure of our atmosphere, and the displacement will be toward the zenith and will be largest for shorter wavelengths.
This module uses an analytical approach to compute the expected differential refraction as a function of wavelength, zenith angle, and the refractive index of air which, in turn, depends on temperature, pressure, and water vapour pressure.
The routines require:
the ambient atmospheric parameters: temperature, pressure, and humidity
the instrument rotation angle on the sky
the parallactic angle of the instrument
the world-coordinate system (WCS)
With this input, the differential atmospheric refraction is calculated (optionally also with error propagation), and provides an output of the X and Y-axis shifts as a function of the input wavelengths. The resulting shift corrections can be applied directly to the pixel table.
The algorithm is based on Filippenko (1982, PASP, 94, 715) and uses the Owens formula which converts relative humidity to water vapour pressure.
In PyHDRL this is hdrl.func.Dar.
Compute¶
Constructor arguments that are HDRL values are passed as
(data, error) tuples, or None for (0, 0). wcs is a
cpl.drs.WCS, or None. Wavelengths are in Angstroms.
compute() takes the reference wavelength lambdaRef as a
(data, error) tuple (or None) and lambdaIn as a
cpl.core.Vector (one wavelength per plane). It returns a
hdrl.func.DarResult with xShift, yShift, xShiftErr
and yShiftErr (each a cpl.core.Vector).
dar = hdrl.func.Dar(airmass, parang, posang, temp, rhum, pres, wcs)
result = dar.compute(lambdaRef, lambdaIn)
x_shift = result.xShift
y_shift = result.yShift