colour.phenomenons.rayleigh Module¶
Rayleigh Optical Depth - Scattering in the Atmosphere¶
Implements rayleigh scattering / optical depth in the atmosphere computation:
References
[1] | Bodhaine, B. A., Wood, N. B., Dutton, E. G., & Slusser, J. R. (1999). On Rayleigh optical depth calculations. Journal of Atmospheric …, 16(11 PART 2), 1854–1861. doi:10.1175/1520-0426(1999)016%3C1854:ORODC%3E2.0.CO;2 |
[2] | Wikipedia. (n.d.). Rayleigh scattering. Retrieved September 23, 2014, from 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 or array_like) – Wavelength \(\lambda\) in micrometers (\(\mu m\)).
- *args (list, optional) – Arguments.
Returns: Air refraction index \(n_s\).
Return type: numeric or ndarray
See also
air_refraction_index_Edlen1966()
,air_refraction_index_Peck1972()
,air_refraction_index_Bodhaine1999()
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 or array_like) – Wavelength \(\lambda\) in micrometers (\(\mu m\)).
- *args (list, optional) – Arguments.
Returns: Air refraction index \(n_s\).
Return type: numeric or ndarray
See also
air_refraction_index_Penndorf1957()
,air_refraction_index_Peck1972()
,air_refraction_index_Bodhaine1999()
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 or array_like) – Wavelength \(\lambda\) in micrometers (\(\mu m\)).
- *args (list, optional) – Arguments.
Returns: Air refraction index \(n_s\).
Return type: numeric or ndarray
See also
air_refraction_index_Penndorf1957()
,air_refraction_index_Edlen1966()
,air_refraction_index_Bodhaine1999()
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 or array_like) – Wavelength \(\lambda\) in micrometers (\(\mu m\)).
- CO2_concentration (numeric or array_like) – \(CO_2\) concentration in parts per million (ppm).
Returns: Air refraction index \(n_s\).
Return type: numeric or ndarray
See also
air_refraction_index_Penndorf1957()
,air_refraction_index_Edlen1966()
,air_refraction_index_Peck1972()
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 or array_like) – Wavelength \(\lambda\) in micrometers (\(\mu m\)). Returns: Nitrogen \(N_2\) depolarisation. Return type: numeric or ndarray 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 or array_like) – Wavelength \(\lambda\) in micrometers (\(\mu m\)). Returns: Oxygen \(O_2\) depolarisation. Return type: numeric or ndarray Examples
>>> O2_depolarisation(0.555) 1.1020225...
-
colour.phenomenons.rayleigh.
F_air_Penndorf1957
(wavelength, *args)[source]¶ Returns \((6+3_p)/(6-7_p)\), the depolarisation term \(F(air)\) or King Factor using Penndorf (1957) method.
Parameters: - wavelength (numeric or array_like) – Wavelength \(\lambda\) in micrometers (\(\mu m\)).
- *args (list, optional) – Arguments.
Returns: Air depolarisation.
Return type: numeric or ndarray
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) array(1.0608)
-
colour.phenomenons.rayleigh.
F_air_Young1981
(wavelength, *args)[source]¶ Returns \((6+3_p)/(6-7_p)\), the depolarisation term \(F(air)\) or King Factor using Young (1981) method.
Parameters: - wavelength (numeric or array_like) – Wavelength \(\lambda\) in micrometers (\(\mu m\)).
- *args (list, optional) – Arguments.
Returns: Air depolarisation.
Return type: numeric or ndarray
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) array(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 or array_like) – Wavelength \(\lambda\) in micrometers (\(\mu m\)). Returns: Air depolarisation. Return type: numeric or ndarray 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 or array_like) – Wavelength \(\lambda\) in micrometers (\(\mu m\)).
- CO2_concentration (numeric or array_like, optional) – \(CO_2\) concentration in parts per million (ppm).
Returns: Air depolarisation.
Return type: numeric or ndarray
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 or array_like, optional) – Air temperature \(T[K]\) in kelvin degrees.
- avogadro_constant (numeric or array_like, optional) – Avogadro‘s number (molecules \(mol^{-1}\)).
Returns: Molecular density \(N_s\) (molecules \(cm^{-3}\)).
Return type: numeric or ndarray
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 or array_like, optional) – \(CO_2\) concentration in parts per million (ppm). Returns: Mean molecular weights \(m_a\) for dry air. Return type: numeric or ndarray 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 or array_like, optional) – Latitude of the site in degrees.
- altitude (numeric or array_like, optional) – Altitude of the site in meters.
Returns: Gravity \(g\) in \(cm/s_2\) (gal).
Return type: numeric or ndarray
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>, F_air=<function F_air_Bodhaine1999>)[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 or array_like) – Wavelength \(\lambda\) in centimeters (cm).
- CO2_concentration (numeric or array_like, optional) – \(CO_2\) concentration in parts per million (ppm).
- temperature (numeric or array_like, optional) – Air temperature \(T[K]\) in kelvin degrees.
- avogadro_constant (numeric or array_like, 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 or ndarray
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>, F_air=<function F_air_Bodhaine1999>)[source]¶ Returns the rayleigh optical depth \(T_r(\lambda)\) as function of wavelength \(\lambda\) in centimeters (cm).
Parameters: - wavelength (numeric or array_like) – Wavelength \(\lambda\) in centimeters (cm).
- CO2_concentration (numeric or array_like, optional) – \(CO_2\) concentration in parts per million (ppm).
- temperature (numeric or array_like, optional) – Air temperature \(T[K]\) in kelvin degrees.
- pressure (numeric or array_like) – Surface pressure \(P\) of the measurement site.
- latitude (numeric or array_like, optional) – Latitude of the site in degrees.
- altitude (numeric or array_like, optional) – Altitude of the site in meters.
- avogadro_constant (numeric or array_like, 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 or ndarray
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>, F_air=<function F_air_Bodhaine1999>)¶ Returns the rayleigh optical depth \(T_r(\lambda)\) as function of wavelength \(\lambda\) in centimeters (cm).
Parameters: - wavelength (numeric or array_like) – Wavelength \(\lambda\) in centimeters (cm).
- CO2_concentration (numeric or array_like, optional) – \(CO_2\) concentration in parts per million (ppm).
- temperature (numeric or array_like, optional) – Air temperature \(T[K]\) in kelvin degrees.
- pressure (numeric or array_like) – Surface pressure \(P\) of the measurement site.
- latitude (numeric or array_like, optional) – Latitude of the site in degrees.
- altitude (numeric or array_like, optional) – Altitude of the site in meters.
- avogadro_constant (numeric or array_like, 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 or ndarray
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...