Differential Chromatic Refraction

These utilities are used for our various classes and functions that implement differential chromatic refraction (DCR).

galsim.dcr.air_refractive_index_minus_one(wave, pressure=69.328, temperature=293.15, H2O_pressure=1.067)[source]

Return the refractive index of air as function of wavelength.

Uses the formulae given in Filippenko (1982), which appear to come from Edlen (1953), and Coleman, Bozman, and Meggers (1960). The units of the original formula are non-SI, being mmHg for pressure (and water vapor pressure), and degrees C for temperature. This function accepts SI units, however, and transforms them when plugging into the formula.

The default values for temperature, pressure and water vapor pressure are expected to be appropriate for LSST at Cerro Pachon, Chile, but they are broadly reasonable for most observatories.

Parameters:
  • wave – Wavelength array in nanometers

  • pressure – Air pressure in kiloPascals.

  • temperature – Temperature in Kelvins.

  • H2O_pressure – Water vapor pressure in kiloPascals.

Returns:

the refractive index minus 1.

galsim.dcr.get_refraction(wave, zenith_angle, **kwargs)[source]

Compute the angle of refraction for a photon entering the atmosphere.

Photons refract when transitioning from space, where the refractive index n = 1.0 exactly, to air, where the refractive index is slightly greater than 1.0. This function computes the change in zenith angle for a photon with a given wavelength. Output is a positive number of radians, even though the apparent zenith angle technically decreases due to this effect.

Parameters:
  • wave – Wavelength array in nanometers

  • zenith_angleAngle from object to zenith

  • **kwargs – Keyword arguments to pass to air_refractive_index() to override default pressure, temperature, and/or H2O_pressure.

Returns:

the absolute value of change in zenith angle in radians.

galsim.dcr.zenith_parallactic_angles(obj_coord, zenith_coord=None, HA=None, latitude=None)[source]

Compute the zenith angle and parallactic angle of a celestial coordinate, given either the celestial coordinate of the zenith, or equivalently, the hour angle of the coordinate and the latitude of the observer. This is useful for the function ChromaticAtmosphere.

Parameters:
  • obj_coord – A CelestialCoord object for which the zenith and parallactic angles will be computed.

  • zenith_coord – A CelestialCoord indicating the coordinates of the zenith.

  • HA – The hour angle (as an Angle) of the coordinate for which the zenith and parallactic angles will be computed.

  • latitude – The observer’s latitude, as an Angle.

Returns:

the tuple (zenith_angle, parallactic_angle), each of which is an Angle.

galsim.dcr.parse_dcr_angles(**kwargs)[source]

Parse the various options for specifying the zenith angle and parallactic angle in ChromaticAtmosphere.

Parameters:
  • zenith_angleAngle from object to zenith [default: 0]

  • parallactic_angle – Parallactic angle, i.e. the position angle of the zenith, measured from North through East. [default: 0]

  • obj_coord – Celestial coordinates of the object being drawn as a CelestialCoord. [default: None]

  • zenith_coord – Celestial coordinates of the zenith as a CelestialCoord. [default: None]

  • HA – Hour angle of the object as an Angle. [default: None]

  • latitude – Latitude of the observer as an Angle. [default: None]

  • **kwargs – For convenience, any other kwargs are returned back for further processing.

Returns:

zenith_angle, parallactic_angle, kw, where kw is any other kwargs that aren’t relevant.