Optical Models

class pyrism.models.VolScatt(iza, vza, raa, angle_unit='DEG')[source]

Bases: pyrism.core._core.Kernel

Compute volume scattering functions and interception coefficients for given solar zenith, viewing zenith, azimuth and leaf inclination angle ([Cam86], [Cam90], [VMB98]).

Parameters:
  • vza, raa (iza,) – Incidence (iza) and scattering (vza) zenith angle, as well as relative azimuth (raa) angle.
  • angle_unit ({'DEG', 'RAD'}, optional) –
    • ‘DEG’: All input angles (iza, vza, raa) are in [DEG] (default).
    • ’RAD’: All input angles (iza, vza, raa) are in [RAD].
Returns:

  • All returns are attributes!
  • iza (ndarray) – Sun or incidence zenith angle in [RAD].
  • vza (ndarray) – View or scattering zenith angle in [RAD].
  • raa (ndarray) – Relative azimuth angle in [RAD].
  • izaDeg (ndarray) – Sun or incidence zenith angle in [DEG].
  • vzaDeg (ndarray) – View or scattering zenith angle in [DEG].
  • raaDeg (ndarray) – Relative azimuth angle in [DEG].
  • phi (ndarray) – Relative azimuth angle in a range between 0 and 2pi.
  • chi_s (int, float or array_like) – Interception function in the solar path.
  • chi_o (int, float or array_like) – Interception function in the view path.

Note

Hot spot direction is vza == iza and raa = 0.0

coef(lidf_type='verhoef', n_elements=18, **kwargs)[source]

Calculate the extinction and volume scattering coefficients ([Cam86], [Cam90], [VMB98]).

Parameters:
  • lidf_type ({'verhoef', 'campbell'}) – Define with which method the LIDF is calculated
  • n_elements (int, optional) – Total number of equally spaced inclination angles. Default is 18.
  • kwargs (dict) –
    Possible **kwargs from campbell method:
    • a : Mean leaf angle (degrees) use 57 for a spherical LIDF.
    Possible **kwargs from verhoef method:
    • a : Parameter a controls the average leaf inclination.
    • b : Parameter b influences the shape of the distribution (bimodality), but has no effect on the
      average leaf inclination.
Returns:

  • All returns are attributes!
  • self.ks (int, float or array_like) – Volume scattering coeffient in incidence path.
  • self.ko (int, float or array_like) – Volume scattering coeffient in scattering path.
  • self.Fs (int, float or array_like) – Function to be multiplied by leaf reflectance to obtain the volume scattering.
  • self.Ft (int, float or array_like) – Function to be multiplied by leaf transmittance to obtain the volume scattering.
  • self.Fst (int, float or array_like) – Sum of Fs and Ft.

volume(lza)[source]

Compute volume scattering functions and interception coefficients for given solar zenith, viewing zenith, azimuth and leaf inclination angle ([VMB98], [Cam90]).

Returns:
  • All returns are attributes!
  • chi_s (float) – Interception function in the solar path.
  • chi_o (float) – Interception function in the view path.
  • frho (float) – Function to be multiplied by leaf reflectance to obtain the volume scattering.
  • ftau (float) – Function to be multiplied by leaf transmittance to obtain the volume scattering.
class pyrism.models.LIDF[source]

Calculate several leaf area inclination density function based on [Cam90], [VMB98] or [NK89].

See also

LIDF.campell, LIDF.verhoef, LIDF.nilson

Note

This class contains only static methods.

static campbell(n_elements=18)[source]

Calculate the Leaf Inclination Distribution Function based on the mean angle of ellipsoidal LIDF distribution. :param a: Mean leaf angle (degrees) use 57 for a spherical LIDF. :type a: float :param n_elements: Total number of equally spaced inclination angles . :type n_elements: int

Returns:lidf – Leaf Inclination Distribution Function for 18 equally spaced angles.
Return type:list
static nilson(lza, mla=None, eccentricity=0.5, scaling_factor=0.5, distribution='random')[source]

Leaf Angle Distributions (LAD) from Nilson and Kuusk.

Note

If mla is None, the default values are alculated by following distributions:
  • ‘erectophile’: 0
  • ‘planophile’: pi/2
  • ‘plagiophile’: pi/4
  • ‘erectophile’: 0
  • ‘random’ : This determines the output to 1
  • ‘uniform’ : This determines the output to 0.5
Parameters:
  • lza (int, float or ndarray) – Leaf zenith angle (lza).
  • mla (int or float, optional) – Modal leaf angle in [Deg], Default is None (See Note).
  • eccentricity (int or float (default = 0.5), optional) – Zero eccentricity is a spherical leaf angle distribution. An eccentricity of 1 is a ‘needle’.
  • scaling_factor (int or float (default = 0.5), optional) – Scaling factor (reflectance if lza = 0)
  • distribution ({'erectophile', 'planophile', 'plagiophile', 'random', 'uniform'}, optional) – Default distribution which set the mla. Default is ‘random’
Returns:

LAD – LAD integrated over a sphere (0 - pi/2)

Return type:

int, float or array_like

static verhoef(b, n_elements=18)[source]

Calculate the Leaf Inclination Distribution Function based on the Verhoef’s bimodal LIDF distribution.

Parameters:
  • b (a,) – Parameter a controls the average leaf inclination. Parameter b influences the shape of the distribution (bimodality), but has no effect on the average leaf inclination.
  • n_elements (int) – Total number of equally spaced inclination angles.
Returns:

LAD – Leaf Inclination Distribution Function at equally spaced angles.

Return type:

list

Note

The parameters must be chosen such that |a| + |b| < 1. Some possible distributions are [a, b]:

  • Planophile: [1, 0].
  • Erectophile: [-1, 0].
  • Plagiophile: [0,-1].
  • Extremophile: [0,1].
  • Spherical: [-0.35,-0.15].
  • Uniform: [0,0].
class pyrism.models.PROSPECT(N, Cab, Cxc, Cbr, Cw, Cm, Can=0, alpha=40, version='5')[source]

PROSPECT D and 5 (including carotenoids and brown pigments) version b (october, 20th 2009) ([JB90], [FFranccoisA+08], [Bar])

Parameters:
  • N (int or float) – Leaf structure parameter.
  • Cab (int or float) – Chlorophyll a+b content.
  • Cxc (int or float) – Carotenoids content.
  • Cbr (int or float) – Brown pigments content in arbitrary units.
  • Cw (int or float) – Equivalent water thickness.
  • Cm (int or float) – Dry matter content
  • alpha (int) – Mean leaf angle (degrees) use 57 for a spherical LIDF. Default is 40.
  • version ({'5', 'D'}) – PROSPECT version. Default is ‘5’.
Returns:

  • All returns are attributes!
  • L8.Bx.kx (namedtuple (with dot access)) – Landsat 8 average kx (ks, kt, ke) values for Bx band (B2 until B7):
  • ASTER.Bx.kx (namedtuple (with dot access)) – ASTER average kx (ks, kt, ke) values for Bx band (B1 until B9):
  • l (array_like) – Continuous Wavelength from 400 until 2500 nm.
  • kt (array_like) – Continuous Transmission from 400 until 2500 nm.
  • ks (array_like) – Continuous Scattering from 400 until 2500 nm.
  • ke (array_like) – Continuous Extinction from 400 until 2500 nm.
  • ka (array_like) – Continuous Absorption from 400 until 2500 nm.
  • om (array_like) – Continuous Omega value in terms of Radar from 400 until 2500 nm.

cleanup(name)[source]

Do cleanup for an attribute

indices()[source]
select(mins=None, maxs=None, function='mean')[source]

Returns the means of the coefficients in range between min and max.

Parameters:
  • mins (int) – Lower bound of the wavelength (400 - 2500)
  • maxs (int) – Upper bound of the wavelength (400 - 2500)
  • function ({'mean'}, optional) – Specify how the bands are calculated.
Returns:

Band – Reflectance in the selected range.

Return type:

array_like

class pyrism.models.LSM(reflectance, moisture)[source]

In optical wavelengths the Lambertian Linear Model (LSM) is used. If you want to calculate the RO Model in optical terms you will calculate the surface reflexion previous.

Equation: Total Soil Reflectance = Reflectance*(Moisture*soil_spectrum1+(1-Moisture)*soil_spectrum2)

By default, soil_spectrum1 is a dry soil, and soil_spectrum2 is a wet soil, so in that case, ‘moisture’ is a surface soil moisture parameter. reflectance is a soil brightness term. You can provide one or the two soil spectra if you want. The calculation is between 400 and 2500 nm with 1nm spacing.

Parameters:
  • reflectance (int or float) – Surface (Lambertian) reflectance in optical wavelength.
  • moisture (int or float) – Surface moisture content between 0 and 1.
Returns:

  • All returns are attributes!
  • self.L8 (namedtuple (with dot access)) – Landsat 8 average kx (ks, kt, ke) values for Bx band (B2 until B7)
  • self.ASTER (namedtuple (with dot access)) – ASTER average kx (ks, kt, ke) values for Bx band (B1 until B9)
  • self.ref (dict (with dot access)) – Continuous surface reflectance values from 400 until 2500 nm
  • self.l (dict (with dot access)) – Continuous Wavelength values from 400 until 2500 nm

cleanup(name)[source]

Do cleanup for an attribute

select(mins, maxs, function='mean')[source]

Returns the means of the coefficients in range between min and max.

Args:
min:(int) Lower bound of the wavelength (400 - 2500)
max:(int) Upper bound of the wavelength (400 - 2500)
class pyrism.models.SAIL(iza, vza, raa, ks, kt, lai, hotspot, rho_surface, lidf_type='campbell', a=57, b=0, normalize=False, nbar=0.0, angle_unit='DEG')[source]

Bases: pyrism.core._core.Kernel

Run the SAIL radiative transfer model (See Note) ([GomezD18]).

Parameters:
  • vza, raa (iza,) – Incidence (iza) and scattering (vza) zenith angle, as well as relative azimuth (raa) angle.
  • kt (ks,) – Continuous leaf reflection (ks) and leaf transmission (kt) values from from 400 until 2500 nm. One can use the output from PROSPECT class instance.
  • lai (float) – Leaf area index.
  • hotspot (float) – The hotspot parameter.
  • rho_surface (array_like) – Continuous surface reflectance values from from 400 until 2500 nm. One can use the output from LSM class instance.
  • lidf_type ({'verhoef', 'campbell'}, optional) – Define with which method the LIDF is calculated. Default is ‘campbell’
  • b (a,) –
    Parameter a and b depends on which lidf_type is applied:
    • If lidf_type is ‘verhoef’: Parameter a controls the average leaf inclination. Parameter b influences the shape of the distribution (bimodality), but has no effect on the average leaf inclination. The default values are for a uniform leaf distribution a = 0, b = 0.
    • If lidf_type is ‘campbell’: Parameter a is the mean leaf angle (degrees) use 57 for a spherical LIDF. The default value represents a spherical leaf distribution a = 57.
  • normalize (boolean, optional) – Set to ‘True’ to make kernels 0 at nadir view illumination. Since all implemented kernels are normalized the default value is False.
  • nbar (float, optional) – The sun or incidence zenith angle at which the isotropic term is set to if normalize is True. The default value is 0.0.
  • angle_unit ({'DEG', 'RAD'}, optional) –
    • ‘DEG’: All input angles (iza, vza, raa) are in [DEG] (default).
    • ’RAD’: All input angles (iza, vza, raa) are in [RAD].
Returns:

Return type:

For more attributes see also pyrism.core.Kernel and pyrism.core.SailResult.

Note

If the input parameter for ks and kt are the output from the class PROSPECT, SAIL will calculate the PROSAIL model.

References

[Bar]Frederic Baret. The specific absorption coefficient corresponding to brown pigment. emmah, inra avignon.
[Cam86](1, 2) G. S. Campbell. Extinction coefficients for radiation in plant canopies calculated using an ellipsoidal inclination angle distribution. Agricultural and Forest Meteorology, 36(4):317–321, 1986. doi:10.1016/0168-1923(86)90010-9.
[Cam90](1, 2, 3, 4) G.S Campbell. Derivation of an angle density function for canopies with ellipsoidal leaf angle distributions. Agricultural and Forest Meteorology, 49(3):173–176, 1990. doi:10.1016/0168-1923(90)90030-A.
[FFranccoisA+08]Jean-Baptiste Feret, Christophe François, Gregory P. Asner, Anatoly A. Gitelson, Roberta E. Martin, Luc P.R. Bidel, Susan L. Ustin, Guerric Le Maire, and Stéphane Jacquemoud. Prospect-4 and 5: advances in the leaf optical properties model separating photosynthetic pigments. Remote Sensing of Environment, 112(6):3030–3043, 2008. doi:10.1016/j.rse.2008.02.012.
[GomezD18]José Gómez-Dans. Prosail implementation for python. 2018. URL: https://github.com/jgomezdans/prosail.
[JB90]S. Jacquemoud and F. Baret. Prospect: a model of leaf optical properties spectra. Remote Sensing of Environment, 34(2):75–91, 1990. doi:10.1016/0034-4257(90)90100-Z.
[NK89]Tiit Nilson and Andres Kuusk. A reflectance model for the homogeneous plant canopy and its inversion. Remote Sensing of Environment, 27(2):157–167, 1989. doi:10.1016/0034-4257(89)90015-1.
[UL15a]Fawwaz T. Ulaby and David G. Long. Microwave Radar and Radiometric Remote Sensing. Artech House, Norwood, 2015. ISBN 978-0-472-11935-6. URL: http://gbv.eblib.com/patron/FullRecord.aspx?p=4537961.
[UL15b]Fawwaz T. Ulaby and David G. Long. Microwave radar and radiometric remote sensing: remote sensing computer codes. 2015. URL: http://mrs.eecs.umich.edu/microwave_remote_sensing_computer_codes.html.
[VMB98](1, 2, 3, 4) W. Verhoef, M. Molenaar, and N.J.J Bunnik. Theory of radiative transfer models applied in optical remote sensing of vegetation canopies. Landbouwuniversiteit Wageningen (LUW), Wageningen, 1998. ISBN 9054858044.