colour.phenomenons.rayleigh Module

Rayleigh Optical Depth - Scattering in the Atmosphere

Implements rayleigh scattering / optical depth in the atmosphere computation:

References

[1]On Rayleigh Optical Depth Calculations, DOI: https://doi.org/10.1175/1520-0426(1999)016%3C1854:ORODC%3E2.0.CO;2
[2]http://en.wikipedia.org/wiki/Rayleigh_scattering
colour.phenomenons.rayleigh.STANDARD_AIR_TEMPERATURE = 288.15

Standard air temperature \(T[K]\) in kelvin degrees (\(15\circ C\)).

STANDARD_AIR_TEMPERATURE : numeric

colour.phenomenons.rayleigh.STANDARD_CO2_CONCENTRATION = 300

Standard air \(CO_2\) concentration in parts per million (ppm).

STANDARD_CO2_CONCENTRATION : numeric

colour.phenomenons.rayleigh.AVERAGE_PRESSURE_MEAN_SEA_LEVEL = 101325

Standard air average pressure \(Hg\) at mean sea-level in pascal (Pa).

AVERAGE_PRESSURE_MEAN_SEA_LEVEL : numeric

colour.phenomenons.rayleigh.DEFAULT_LATITUDE = 0

Default latitude in degrees (equator).

DEFAULT_LATITUDE : numeric

colour.phenomenons.rayleigh.DEFAULT_ALTITUDE = 0

Default altitude in meters (sea level).

DEFAULT_ALTITUDE : numeric

colour.phenomenons.rayleigh.air_refraction_index_penndorf1957(wavelength, *args)[source]

Returns the air refraction index \(n_s\) from given wavelength \(\lambda\) in micrometers (\(\mu m\)) using Penndorf (1957) method.

Parameters:
  • wavelength (numeric) – Wavelength \(\lambda\) in micrometers (\(\mu m\)).
  • *args (*) – Arguments.
Returns:

Air refraction index \(n_s\).

Return type:

numeric

Examples

>>> air_refraction_index_penndorf1957(0.555)  
1.0002777...
colour.phenomenons.rayleigh.air_refraction_index_edlen1966(wavelength, *args)[source]

Returns the air refraction index \(n_s\) from given wavelength \(\lambda\) in micrometers (\(\mu m\)) using Edlen (1966) method.

Parameters:
  • wavelength (numeric) – Wavelength \(\lambda\) in micrometers (\(\mu m\)).
  • *args (*) – Arguments.
Returns:

Air refraction index \(n_s\).

Return type:

numeric

Examples

>>> air_refraction_index_edlen1966(0.555)  
1.0002777...
colour.phenomenons.rayleigh.air_refraction_index_peck1972(wavelength, *args)[source]

Returns the air refraction index \(n_s\) from given wavelength \(\lambda\) in micrometers (\(\mu m\)) using Peck and Reeder (1972) method.

Parameters:
  • wavelength (numeric) – Wavelength \(\lambda\) in micrometers (\(\mu m\)).
  • *args (*) – Arguments.
Returns:

Air refraction index \(n_s\).

Return type:

numeric

Examples

>>> air_refraction_index_peck1972(0.555)  
1.0002777...
colour.phenomenons.rayleigh.air_refraction_index_bodhaine1999(wavelength, CO2_concentration=300)[source]

Returns the air refraction index \(n_s\) from given wavelength \(\lambda\) in micrometers (\(\mu m\)) using Bodhaine, Wood, Dutton and Slusser (1999) method.

Parameters:
  • wavelength (numeric) – Wavelength \(\lambda\) in micrometers (\(\mu m\)).
  • CO2_concentration (numeric) – \(CO_2\) concentration in parts per million (ppm).
Returns:

Air refraction index \(n_s\).

Return type:

numeric

Examples

>>> air_refraction_index_bodhaine1999(0.555)  
1.0002777...
colour.phenomenons.rayleigh.N2_depolarisation(wavelength)[source]

Returns the depolarisation of nitrogen \(N_2\) as function of wavelength \(\lambda\) in micrometers (\(\mu m\)).

Parameters:wavelength (numeric) – Wavelength \(\lambda\) in micrometers (\(\mu m\)).
Returns:Nitrogen \(N_2\) depolarisation.
Return type:numeric

Examples

>>> N2_depolarisation(0.555)  
1.0350291...
colour.phenomenons.rayleigh.O2_depolarisation(wavelength)[source]

Returns the depolarisation of oxygen \(O_2\) as function of wavelength \(\lambda\) in micrometers (\(\mu m\)).

Parameters:wavelength (numeric) – Wavelength \(\lambda\) in micrometers (\(\mu m\)).
Returns:Oxygen \(O_2\) depolarisation.
Return type:numeric

Examples

>>> O2_depolarisation(0.555)  
1.1020225...
colour.phenomenons.rayleigh.F_air_penndorf1957(*args)[source]

Returns \((6+3_p)/(6-7_p)\), the depolarisation term \(F(air)\) or King Factor using Penndorf (1957) method.

Parameters:*args (*) – Arguments.
Returns:Air depolarisation.
Return type:numeric

Notes

  • The argument wavelength is only provided for consistency with the other air depolarisation methods but is actually not used as this definition is essentially a constant in its current implementation.

Examples

>>> F_air_penndorf1957(0.555)
1.0608
colour.phenomenons.rayleigh.F_air_young1981(*args)[source]

Returns \((6+3_p)/(6-7_p)\), the depolarisation term \(F(air)\) or King Factor using Young (1981) method.

Parameters:*args (*) – Arguments.
Returns:Air depolarisation.
Return type:numeric

Notes

  • The argument wavelength is only provided for consistency with the other air depolarisation methods but is actually not used as this definition is essentially a constant in its current implementation.

Examples

>>> F_air_young1981(0.555)
1.048
colour.phenomenons.rayleigh.F_air_bates1984(wavelength)[source]

Returns \((6+3_p)/(6-7_p)\), the depolarisation term \(F(air)\) or King Factor as function of wavelength \(\lambda\) in micrometers (\(\mu m\)) using Bates (1984) method.

Parameters:wavelength (numeric) – Wavelength \(\lambda\) in micrometers (\(\mu m\)).
Returns:Air depolarisation.
Return type:numeric

Examples

>>> F_air_bates1984(0.555)  
1.0481535...
colour.phenomenons.rayleigh.F_air_bodhaine1999(wavelength, CO2_concentration=300)[source]

Returns \((6+3_p)/(6-7_p)\), the depolarisation term \(F(air)\) or King Factor as function of wavelength \(\lambda\) in micrometers (\(\mu m\)) and \(CO_2\) concentration in parts per million (ppm) using Bodhaine, Wood, Dutton and Slusser (1999) method.

Parameters:
  • wavelength (numeric) – Wavelength \(\lambda\) in micrometers (\(\mu m\)).
  • CO2_concentration (numeric, optional) – \(CO_2\) concentration in parts per million (ppm).
Returns:

Air depolarisation.

Return type:

numeric

Examples

>>> F_air_bodhaine1999(0.555)  
1.1246916...
colour.phenomenons.rayleigh.molecular_density(temperature=288.15, avogadro_constant=6.02214179e+23)[source]

Returns the molecular density \(N_s\) (molecules \(cm^{-3}\)) as function of air temperature \(T[K]\) in kelvin degrees.

Parameters:
  • temperature (numeric, optional) – Air temperature \(T[K]\) in kelvin degrees.
  • avogadro_constant (numeric, optional) – Avogadro‘s number (molecules \(mol^{-1}\)).
Returns:

Molecular density \(N_s\) (molecules \(cm^{-3}\)).

Return type:

numeric

Notes

  • The Avogadro‘s number used in this implementation is the one given by by the Committee on Data for Science and Technology (CODATA): \(6.02214179x10^{23}\), which is different from the reference [1] value \(6.0221367x10^{23}\).

Examples

>>> molecular_density(288.15)  
2.5469021...e+19
>>> molecular_density(288.15, 6.0221367e23)  
2.5468999...e+19
colour.phenomenons.rayleigh.mean_molecular_weights(CO2_concentration=300)[source]

Returns the mean molecular weights \(m_a\) for dry air as function of \(CO_2\) concentration in parts per million (ppm).

Parameters:CO2_concentration (numeric, optional) – \(CO_2\) concentration in parts per million (ppm).
Returns:Mean molecular weights \(m_a\) for dry air.
Return type:numeric

Examples

>>> mean_molecular_weights()  
28.9640166...
colour.phenomenons.rayleigh.gravity_list1968(latitude=0, altitude=0)[source]

Returns the gravity \(g\) in \(cm/s_2\) (gal) representative of the mass-weighted column of air molecules above the site of given latitude and altitude using List (1968) method.

Parameters:
  • latitude (numeric, optional) – Latitude of the site in degrees.
  • altitude (numeric, optional) – Altitude of the site in meters.
Returns:

Gravity \(g\) in \(cm/s_2\) (gal).

Return type:

numeric

Examples

>>> gravity_list1968()  
978.0356070...
>>> gravity_list1968(0, 1500)  
977.5726106...

Gravity \(g\) for Paris:

>>> gravity_list1968(48.8567, 35)  
980.9524178...
colour.phenomenons.rayleigh.scattering_cross_section(wavelength, CO2_concentration=300, temperature=288.15, avogadro_constant=6.02214179e+23, n_s=<function air_refraction_index_bodhaine1999 at 0x1032006e0>, F_air=<function F_air_bodhaine1999 at 0x1032009b0>)[source]

Returns the scattering cross section per molecule \(\sigma\) of dry air as function of wavelength \(\lambda\) in centimeters (cm) using given \(CO_2\) concentration in parts per million (ppm) and temperature \(T[K]\) in kelvin degrees following Van de Hulst (1957) method.

Parameters:
  • wavelength (numeric) – Wavelength \(\lambda\) in centimeters (cm).
  • CO2_concentration (numeric, optional) – \(CO_2\) concentration in parts per million (ppm).
  • temperature (numeric, optional) – Air temperature \(T[K]\) in kelvin degrees.
  • avogadro_constant (numeric, optional) – Avogadro‘s number (molecules \(mol^{-1}\)).
  • n_s (object) – Air refraction index \(n_s\) computation method.
  • F_air (object) – \((6+3_p)/(6-7_p)\), the depolarisation term \(F(air)\) or King Factor computation method.
Returns:

Scattering cross section per molecule \(\sigma\) of dry air.

Return type:

numeric

Warning

Unlike most objects of colour.phenomenons.rayleigh module, colour.phenomenons.rayleigh.scattering_cross_section() expects wavelength \(\lambda\) to be expressed in centimeters (cm).

Examples

>>> scattering_cross_section(555 * 10e-8)  
4.6613309...e-27
colour.phenomenons.rayleigh.rayleigh_optical_depth(wavelength, CO2_concentration=300, temperature=288.15, pressure=101325, latitude=0, altitude=0, avogadro_constant=6.02214179e+23, n_s=<function air_refraction_index_bodhaine1999 at 0x1032006e0>, F_air=<function F_air_bodhaine1999 at 0x1032009b0>)[source]

Returns the rayleigh optical depth \(T_r(\lambda)\) as function of wavelength \(\lambda\) in centimeters (cm).

Parameters:
  • wavelength (numeric) – Wavelength \(\lambda\) in centimeters (cm).
  • CO2_concentration (numeric, optional) – \(CO_2\) concentration in parts per million (ppm).
  • temperature (numeric, optional) – Air temperature \(T[K]\) in kelvin degrees.
  • pressure (numeric) – Surface pressure \(P\) of the measurement site.
  • latitude (numeric, optional) – Latitude of the site in degrees.
  • altitude (numeric, optional) – Altitude of the site in meters.
  • avogadro_constant (numeric, optional) – Avogadro‘s number (molecules \(mol^{-1}\)).
  • n_s (object) – Air refraction index \(n_s\) computation method.
  • F_air (object) – \((6+3_p)/(6-7_p)\), the depolarisation term \(F(air)\) or King Factor computation method.
Returns:

Rayleigh optical depth \(T_r(\lambda)\).

Return type:

numeric

Warning

Unlike most objects of colour.phenomenons.rayleigh module, colour.phenomenons.rayleigh.rayleigh_optical_depth() expects wavelength \(\lambda\) to be expressed in centimeters (cm).

Examples

>>> rayleigh_optical_depth(555 * 10e-8)  
0.1004070...
colour.phenomenons.rayleigh.rayleigh_scattering(wavelength, CO2_concentration=300, temperature=288.15, pressure=101325, latitude=0, altitude=0, avogadro_constant=6.02214179e+23, n_s=<function air_refraction_index_bodhaine1999 at 0x1032006e0>, F_air=<function F_air_bodhaine1999 at 0x1032009b0>)

Returns the rayleigh optical depth \(T_r(\lambda)\) as function of wavelength \(\lambda\) in centimeters (cm).

Parameters:
  • wavelength (numeric) – Wavelength \(\lambda\) in centimeters (cm).
  • CO2_concentration (numeric, optional) – \(CO_2\) concentration in parts per million (ppm).
  • temperature (numeric, optional) – Air temperature \(T[K]\) in kelvin degrees.
  • pressure (numeric) – Surface pressure \(P\) of the measurement site.
  • latitude (numeric, optional) – Latitude of the site in degrees.
  • altitude (numeric, optional) – Altitude of the site in meters.
  • avogadro_constant (numeric, optional) – Avogadro‘s number (molecules \(mol^{-1}\)).
  • n_s (object) – Air refraction index \(n_s\) computation method.
  • F_air (object) – \((6+3_p)/(6-7_p)\), the depolarisation term \(F(air)\) or King Factor computation method.
Returns:

Rayleigh optical depth \(T_r(\lambda)\).

Return type:

numeric

Warning

Unlike most objects of colour.phenomenons.rayleigh module, colour.phenomenons.rayleigh.rayleigh_optical_depth() expects wavelength \(\lambda\) to be expressed in centimeters (cm).

Examples

>>> rayleigh_optical_depth(555 * 10e-8)  
0.1004070...