Media

class batoid.Medium[source]

The Medium class is used to model a refractive medium.

Media have essentially one function: to return their refractive index given a wavelength.

getN(wavelength)[source]

Return refractive index.

Parameters:

wavelength (float) – Vacuum wavelength in meters.

Returns:

n (float) – Refractive index.

class batoid.ConstMedium(n)[source]

Bases: Medium

A Medium with wavelength-independent refractive index.

Parameters:

n (float) – The refractive index.

class batoid.TableMedium(wavelengths, ns)[source]

Bases: Medium

A Medium with refractive index defined via a lookup table.

Parameters:
  • wavelengths (array of float) – Wavelengths in meters.

  • ns (array of float) – Refractive indices.

classmethod fromTxt(filename, **kwargs)[source]

Load a text file with refractive index information in it. The file should have two columns, the first with wavelength in microns, and the second with the corresponding refractive indices.

class batoid.SellmeierMedium(*args, **kwargs)[source]

Bases: Medium

A Medium with Sellmeier dispersion formula.

The Sellmeier formula is

\[n = \sqrt{1 + \sum_{i=1}^3 \frac{B_i \lambda^2}{\lambda^2 - C_i}}\]

where \(\lambda\) is the vacuum wavelength in microns.

Parameters:

coefs (array of float) – Sellmeier coefficients (B1, B2, B3, C1, C2, C3)

class batoid.SumitaMedium(*args, **kwargs)[source]

Bases: Medium

A Medium with Sumita dispersion formula, also known as the Schott dispersion formula.

The Sumita formula is

\[n = \sqrt{A_0 + A_1 \lambda^2 + \sum_{i=2}^5 A_i \lambda^{-2 (i-1)}}\]

where \(\lambda\) is the vacuum wavelength in microns.

Parameters:

coefs (array of float) – Sumita coefficients (A0, A1, A2, A3, A4, A5)

class batoid.Air(pressure=69.328, temperature=293.15, h2o_pressure=1.067)[source]

Bases: Medium

A Medium for air.

Parameters:
  • pressure (float, optional) – Atmospheric pressure in kiloPascals. [default: 69.328]

  • temperature (float, optional) – Temperature in Kelvin. [default: 293.15]

  • h2o_pressure (float, optional) – Water vapor pressure in kiloPascals. [default: 1.067]

Notes

Uses the formulae given in Filippenko (1982), which appear to come from Edlen (1953), and Coleman, Bozman, and Meggers (1960). 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.