Parameter Setting

Parameters for 6S can be set using the classes and methods described below.

Atmospheric Profiles

class Py6S.AtmosProfile

Stores a enumeration for the pre-specified atmospheric model types

classmethod FromLatitudeAndDate(latitude, date)

Automatically pick the atmospheric profile based on the latitude and date.

Based on the table provided at http://www.exelisvis.com/docs/FLAASH.html

classmethod PredefinedType(type)

Set 6S to use a predefined atmosphere type.

Arguments:

  • type – the predefined atmosphere type, one of the constants defined in this class

Example usage:

s.atmos_profile = AtmosProfile.PredefinedType(AtmosProfile.MidlatitudeSummer)
classmethod RadiosondeProfile(data)

Set 6S to use an atmosphere defined by a profile from a radiosonde measurements.

Arguments:

  • data – A dictionary containing five iterables (eg. lists) with the radiosonde measurements in them. The dictionary must have the following keys:
    • altitude – in km
    • pressure – in mb
    • temperature – in k
    • water – in g/m^3
    • ozone – in g/m^3

There must be 34 items in each iterable, or a ParameterExeception will be thrown.

classmethod UserWaterAndOzone(water, ozone)

Set 6S to use an atmosphere defined by an amount of water vapour and ozone.

Arguments:

  • water – The total amount of water in a vertical path through the atmosphere (in g/cm^2)
  • ozone – The total amount of ozone in a vertical path through the atmosphere (in cm-atm)

Example usage:

s.atmos_profile = AtmosProfile.UserWaterAndOzone(3.6, 0.9)

Aerosol Profiles

class Py6S.AeroProfile

Class representing options for Aerosol Profiles

class AerosolDistribution(rmin, rmax, numtype)

Stores data regarding a specific Aerosol Distribution.

Used by the following methods:

add_component(rmean, sigma, percentage_density, refr_real, refr_imag)

Adds a component to the aerosol distribution.

Wavelength dependent values must be input at the following wavelengths (given in micrometers): 0.350, 0.400, 0.412, 0.443, 0.470, 0.488, 0.515, 0.550, 0.590, 0.633, 0.670, 0.694, 0.760, 0.860, 1.240, 1.536, 1.650, 1.950, 2.250, 3.750

Arguments:

  • rmean – The mean radius of the aerosols
  • sigma – Sigma, as defined by the distribution (Log Normal etc)
  • percentage_density – The percentage density of the aerosol
  • refr_real – A 20-element iterable giving the real part of the refractive indices at the specified wavelengths (see above)
  • refr_imag – A 20-element iterable giving the imaginary part of the refractive indices at the specified wavelengths (see above)
classmethod AeroProfile.JungePowerLawDistribution(rmin, rmax)

Set 6S to use a Junge Power Law distribution.

Arguments:

  • rmin – The minimum aerosol radius
  • rmax – The maximum aerosol radius

This returns an AerosolDistribution object. Components can then be added to this distribution using the add_component() method of the returned class.

Example usage:

s.aeroprofile = AeroProfile.JungePowerLawDistribution(0.1, 0.3)
s.aeroprofile.add_component(...)
classmethod AeroProfile.ModifiedGammaDistribution(rmin, rmax)

Set 6S to use a Modified Gamma distribution.

Arguments:

  • rmin – The minimum aerosol radius
  • rmax – The maximum aerosol radius

This returns an AerosolDistribution object. Components can then be added to this distribution using the add_component() method of the returned class.

Example usage:

s.aeroprofile = AeroProfile.ModifiedGammaDistribution(0.3, 0.1)
s.aeroprofile.add_component(...)
classmethod AeroProfile.MultimodalLogNormalDistribution(rmin, rmax)

Set 6S to use a Multimodal Log-Normal distribution.

Arguments:

  • rmin – The minimum aerosol radius
  • rmax – The maximum aerosol radius

This returns an AerosolDistribution object. Components can then be added to this distribution using the add_component() method of the returned class.

Example usage:

s.aeroprofile = AeroProfile.MultimodalLogNormalDistribution(0.3, 0.1)
s.aeroprofile.add_component(...)
classmethod AeroProfile.PredefinedType(type)

Set 6S to use a predefined aerosol type, one of the constants defined in this class.

Arguments:

  • type – the predefined aerosol type, one of the constants defined in this class

Example usage:

s.aeroprofile = AeroProfile.PredefinedType(AeroProfile.Urban)
classmethod AeroProfile.SunPhotometerDistribution(r, dvdlogr, refr_real, refr_imag)

Set 6S to use an aerosol parameterisation from Sun Photometer measurements.

The real and imaginary parts of the refractive indices must be input at the following wavelengths (given in micrometers): 0.350, 0.400, 0.412, 0.443, 0.470, 0.488, 0.515, 0.550, 0.590, 0.633, 0.670, 0.694, 0.760, 0.860, 1.240, 1.536, 1.650, 1.950, 2.250, 3.750

Arguments:

  • r – A list of radius measurements from a sun photometer (microns)
  • dvdlogr – A list of dV/d(logr) measurements from a sun photometer, for the radiuses as above (cm^3/cm^2/micron)
  • refr_real – A list containing the real part of the refractive indices for each of the 20 wavelengths (above). If a single float value is given then the value is treated as constant for all wavelengths.
  • refr_imag – A list containing the imaginary part of the refractive indices for each of the 20 wavelengths (above). If a single float value is given then the value is treated as constant for all wavelengths.
classmethod AeroProfile.User(**kwargs)

Set 6S to use a user-defined aerosol profile based on proportions of standard aerosol components.

The profile is set as a mixture of pre-defined components, each given as an optional keyword. Not all keywords need to be given, but the values for the keywords given must sum to 1, or a ParameterError will be raised.

Optional keywords:

  • dust – The proportion of dust-like aerosols
  • water – The proportion of water-like aerosols
  • oceanic – The proportion of oceanic aerosols
  • soot – The proportion of soot-like aerosols

Example usage:

s.aeroprofile = AeroProfile.User(dust=0.3, oceanic=0.7)
s.aeroprofile = AeroProfile.User(soot = 0.1, water = 0.3, oceanic = 0.05, dust = 0.55)
class AeroProfile.UserProfile(atype)

Set 6S to use a user-defined aerosol profile, with differing AOTs over the height of the profile.

Arguments:

  • atype – Aerosol type to be used for all layers. Must be one of the pre-defined types defined in this class.

Methods:

  • add_layer() – Adds a layer to the user-defined aerosol profile, with the specified height and aerosol optical thickness.

Example usage:

s.aeroprofile = AeroProfile.UserProfile(AeroProfile.Maritime)
s.aeroprofile.add_layer(5, 0.34) # Add a 5km-thick layer with an AOT of 0.34
s.aeroprofile.add_layer(10, 0.7) # Add a 10km-thick layer with an AOT of 0.7
s.aeroprofile.add_layer(100, 0.01) # Add a 100km-thick layer with an AOT of 0.01
add_layer(height, optical_thickness)

Adds a layer to the user-defined profile.

Arguments:

  • height – Height of the layer (in km)
  • optical_thickness – Optical thickness of the layer

Example usage:

s.aeroprofile.add_layer(5, 0.34) # Add a 5km-thick layer with an AOT of 0.34

Ground Reflectances

class Py6S.GroundReflectance

Produces strings for the input file for a number of different ground reflectance scenarios.

Options are:

  • Homogeneous

    • Lambertian

    • BRDF

      • Walthall et al. model
      • Rahman et al. model
      • etc
  • Heterogeneous

    • Lambertian

These are combined to give function names like:

HomogeneousLambertian() or HomogeneousWalthall()

The standard functions (HomogeneousLambertian() and HeterogeneousLambertian()) will decide what to do based on the types of inputs they are given:

model.ground_reflectance = GroundReflectance.HomogeneousLambertian(0.7) # A spectrally-constant reflectance of 0.7
model.ground_reflectance = GroundReflectance.HomogeneousLambertian(GroundReflectance.GreenVegetation) # A built-in green vegetation spectrum
model.ground_reflectance = GroundReflectance.HomogeneousLambertian([0.6, 0.8, 0.34, 0.453]) # A user-defined spectrum given in micrometers with steps of 2.5nm
# A 2D ndarray, such as that returned by any of the Spectra.import_* functions
model.ground_reflectance = GroundReflectance.HomogeneousLambertian(Spectra.import_from_usgs("http://speclab.cr.usgs.gov/spectral.lib06/ds231/ASCII/V/russianolive.dw92-4.30728.asc"))
classmethod HeterogeneousLambertian(radius, ro_target, ro_env)

Provides parameterisation for heterogeneous Lambertian (ie. uniform BRDF) surfaces.

These surfaces are modelled in 6S as a circular target surrounded by an environment of a different reflectance.

Arguments:

  • radius – The radius of the target (in km)
  • ro_target – The reflectance of the target
  • ro_env – The reflectance of the environment

Both of the reflectances can be set to any of the following:

  • A single float value (for example, 0.634), in which case it is interpreted as a spectrally-constant reflectance value.
  • A constant defined by this class (one of GroundReflectance.GreenVegetation, GroundReflectance.ClearWater, GroundReflectance.Sand or GroundReflectance.LakeWater) in which case a built-in spectrum of the specified material is used.
  • An array of values (for example, [0.67, 0.85, 0.34, 0.65]) in which case the values are taken to be reflectances across the whole wavelength range at a spacing of 2.5nm. In this case, if the start wavelength is s and the end wavelength is e, the values must be given for the wavelengths: s, s+2.5, s+5.0, s+7.5, ..., e-2.5, e
  • A multidimensional ndarray giving wavelength (column 0) and reflectance (column 1) values
classmethod HomogeneousHapke(albedo, assymetry, amplitude, width)

Parameterisation for a surface BRDF based on the Hapke model.

The parameters are:

  • albedo
  • assymetry parameter for the phase function
  • amplitude of hot spot
  • width of the hot spot
classmethod HomogeneousIaquintaPinty(leaf_dist, hot_spot, lai, hot_spot_param, leaf_reflec, leaf_trans, soil_albedo)

Parameterisation for a surface BRDF based on the Iaquinta and Pinty model.

The parameters are:

  • Leaf distribution (one of the GroundReflectance.LeafDistXXX constants)
  • Hot spot setting (GroundReflectance.HotSpot or GroundReflectance.NoHotSpot)
  • Leaf Area Index (1-15)
  • Hot spot parameter 2*r*lambda (0-2)
  • Leaf reflectance (0-0.99)
  • Leaf transmittance (0-0.99)
  • Soil albedo (0-0.99)

Leaf reflectance + Leaf transmittance must be less than 0.99. If this is not the case, a ParameterException is raised.

classmethod HomogeneousKuuskMultispectralCR(lai, lad_eps, lad_thm, relative_leaf_size, chlorophyll_content, leaf_water_equiv_thickness, effective_num_layers, ratio_refractive_indices, weight_first_price_function)

Parameterisation for a surface BRDF based on Kuusk’s multispectral CR model.

The Parameters are:

  • Leaf Area Index (0.1-10)
  • LAD eps (0.0-0.9)
  • LAD thm (0.0-90.0)
  • Relative leaf size (0.01-1.0)
  • Chlorophyll content (ug/cm^2, 0-30)
  • Leaf water equivalent thickness (0.01-0.03)
  • Effective number of elementary layers inside a leaf (1-225)
  • Ratio of refractive indices of the leaf surface wax and internal material (0-1.0)
  • Weight of the 1st Price function for the soil reflectance (0.1-0.8)
classmethod HomogeneousLambertian(ro)

Provides parameterisation for homogeneous Lambertian (ie. uniform BRDF) surfaces.

The single argument can be either:

  • A single float value (for example, 0.634), in which case it is interpreted as a spectrally-constant reflectance value.
  • A constant defined by this class (one of GroundReflectance.GreenVegetation, GroundReflectance.ClearWater, GroundReflectance.Sand or GroundReflectance.LakeWater) in which case a built-in spectrum of the specified material is used.
  • An array of values (for example, [0.67, 0.85, 0.34, 0.65]) in which case the values are taken to be reflectances across the whole wavelength range at a spacing of 2.5nm. In this case, if the start wavelength is s and the end wavelength is e, the values must be given for the wavelengths: s, s+2.5, s+5.0, s+7.5, ..., e-2.5, e
  • A multidimensional ndarray giving wavelength (column 0) and reflectance (column 1) values
classmethod HomogeneousMODISBRDF(par1, par2, par3)

Parameterisation for a surface BRDF based on the MODIS Operational BRDF model.

The parameters are:

  • Weight for lambertian kernel
  • Weight for Ross Thick kernel
  • Weight for Li Spare kernel
classmethod HomogeneousMinnaert(k, alb)

Parameterisation for a surface BRDF based on the Minnaert BRDF model.

The parameters are: - K surface parameter - Surface albedo

classmethod HomogeneousOcean(wind_speed, wind_azimuth, salinity, pigment_concentration)

Parameterisation for a surface BRDF based on the Ocean BRDF model.

The parameters are:

  • wind speed (in m/s)
  • azimuth of the wind (in degrees)
  • salinity (in ppt) (set to 34.3ppt if < 0)
  • pigment concentration (in mg/m3)
classmethod HomogeneousRahman(intensity, asymmetry_factor, structural_parameter)

Parameterisation for a surface BRDF based on the Rahman BRDF model.

The parameters are:

  • Intensity of the reflectance of the surface (N/D value >= 0)
  • Asymmetry factor, N/D value between -1.0 and 1.0
  • Structural parameter of the medium
classmethod HomogeneousRoujean(albedo, k1, k2)

Parameterisation for a surface BRDF based on the Roujean et al. model.

The parameters are:

  • albedo
  • geometric parameter for hot spot effect
  • geometric parameter for hot spot effect
classmethod HomogeneousUserDefined(observed_reflectance, albedo, ro_sun_at_thetas, ro_sun_at_thetav)

Parameterisation for a user-defined surface BRDF.

The parameters are:

  • observed_reflectance – Observed reflectance in the geometry specified in the Geometry parameterisation
  • albedo – Surface spherical albedo
  • ro_sun_at_thetas – A reflectance table (described below) for the scenario when the sun is at theta_s (the solar zenith angle specified in the Geometry parameterisation)
  • ro_sun_at_thetav – A reflectance table (described below) for the scenario when the sun is at theta_v (the view zenith angle specified in the Geometry parameterisation)

The reflectance tables mentioned above must be NumPy arrays (that is, instances of ndarray) with a shape of (10, 13) where the table headers are as below, and each cell contains the reflectance of the surface in the specified geometry:

      zenith
      0   10    20    30    40    50    60    70    80    85
a 0
z 30
i 60
m 90
u 120
t 150
h .
  .
  .
classmethod HomogeneousVerstaeteEtAl(kappa_param, phase_funct, scattering_type, leaf_area_density, sun_flecks_radius, ssa, legendre_first, legendre_second, k1, k2, asym_factor, chil)

Parameterisation for a surface BRDF based on the Verstraete, Pinty and Dickinson model.

The parameters are:

  • The type of Kappa parameterisation (one of the GroundReflectance.KappaXXX constants)
  • The phase function to use (one of the GroundReflectance.PhaseXXX constants)
  • The scattering type to use (either GroundReflectance.SingleScatteringOnly or GroundReflectance.DickinsonMultipleScattering)
  • Leaf area density (m^2/m^-3)
  • Radius of the sun flecks on the scatterer (m)
  • Single Scattering Albedo (0-1)
  • First coefficient of Legendre polynomial (Only used if phase function is not GroundReflectance.PhaseIsotropic, set to None otherwise)
  • Second coefficient of Legendre polynomial (Only used if phase function is not GroundReflectance.PhaseIsotropic, set to None otherwise)
  • Kappa value k1 (Only used if Kappa parameterisation was GroundReflectance.KappaGivenValues, set to None otherwise)
  • Kappa value k2 (Only used if Kappa parameterisation was GroundReflectance.KappaGivenValues, set to None otherwise)
  • Asymmetry factor for Heyney-Greenstein parameterisation (Only used if Phase function is set to GroundReflectance.PhaseHeyneyGreenstein, set to None otherwise)
  • Goudriaan’s chil parameter (Only used if Kappa parameterisation was NOT GroundReflectance.KappaGivenValues, set to None otherwise)
classmethod HomogeneousWalthall(param1, param2, param3, albedo)

Parameterisation for a surface BRDF based on the Walthall et al. model.

The parameters are:

  • term in square ts*tv
  • term in square ts*ts+tv*tv
  • term in ts*tv*cos(phi) (limacon de pascal)
  • albedo

Geometries

class Py6S.Geometry
class AVHRR_AM

Stores parameters for a AVHRR morning pass geometry for 6S.

Attributes:

  • month – The month the image was acquired in (0-12)
  • day – The day the image was acquired in (1-31)
  • column – The AVHRR column of the image
  • ascendant_node_longitude – The longitude of the ascendant node of the image
  • ascendant_node_hour – The hour of the ascendant node of the image
class Geometry.AVHRR_PM

Stores parameters for a AVHRR afternoon pass geometry for 6S.

Attributes:

  • month – The month the image was acquired in (0-12)
  • day – The day the image was acquired in (1-31)
  • column – The AVHRR column of the image
  • ascendant_node_longitude – The longitude of the ascendant node of the image
  • ascendant_node_hour – The hour of the ascendant node of the image
class Geometry.GoesEast

Stores parameters for a GOES East geometry for 6S.

Attributes:

  • month – The month the image was acquired in (0-12)
  • day – The day the image was acquired in (1-31)
  • gmt_decimal_hour – The time in GMT, as a decimal, in hours (eg. 7.5 for 7:30am)
  • column – The GOES East column of the image
  • line – The GOES East line of the image
class Geometry.GoesWest

Stores parameters for a GOES West geometry for 6S.

Attributes:

  • month – The month the image was acquired in (0-12)
  • day – The day the image was acquired in (1-31)
  • gmt_decimal_hour – The time in GMT, as a decimal, in hours (eg. 7.5 for 7:30am)
  • column – The GOES West column of the image
  • line – The GOES West line of the image
class Geometry.Landsat_TM

Stores parameters for a Landsat TM geometry for 6S.

Attributes:

  • month – The month the image was acquired in (0-12)
  • day – The day the image was acquired in (1-31)
  • gmt_decimal_hour – The time in GMT, as a decimal, in hours (eg. 7.5 for 7:30am)
  • latitude – The latitude of the centre of the image
  • longitude – The longitude of the centre of the image
class Geometry.Meteosat

Stores parameters for a Meteosat geometry for 6S.

Attributes:

  • month – The month the image was acquired in (0-12)
  • day – The day the image was acquired in (1-31)
  • gmt_decimal_hour – The time in GMT, as a decimal, in hours (eg. 7.5 for 7:30am)
  • column – The Meteosat column of the image
  • line – The Meteosat line of the image
class Geometry.SPOT_HRV

Stores parameters for a SPOT HRV geometry for 6S.

Attributes:

  • month – The month the image was acquired in (0-12)
  • day – The day the image was acquired in (1-31)
  • gmt_decimal_hour – The time in GMT, as a decimal, in hours (eg. 7.5 for 7:30am)
  • latitude – The latitude of the centre of the image
  • longitude – The longitude of the centre of the image
class Geometry.User

Stores parameters for a user-defined geometry for 6S.

Attributes:

  • solar_z – Solar zenith angle
  • solar_a – Solar azimuth angle
  • view_z – View zenith angle
  • view_a – View azimuth angle
  • day – The day the image was acquired in (1-31)
  • month – The month the image was acquired in (0-12)
from_time_and_location(lat, lon, datetimestring, view_z, view_a)

Sets the user-defined geometry to a given view zenith and azimuth, and a solar zenith and azimuth calculated from the lat, lon and date given.

Uses the PySolar module for the calculations.

Arguments:

  • lat – The latitude of the location (0-90 degrees)
  • lon – The longitude of the location
  • datetimestring – Any string that can be parsed to produce a date/time object. All that is really needed is a time - eg. “14:53”
  • view_z – The view zenith angle
  • view_a – The view azimuth angle

Altitudes

class Py6S.Altitudes

Allows the specification of target and sensor altitudes.

set_sensor_custom_altitude(altitude, aot=-1, water=-1, ozone=-1)

Set the altitude of the sensor, along with other variables required for the parameterisation of the sensor.

Takes optional arguments of aot, water and ozone to specify atmospheric contents underneath the sensor. If these aren’t specified then the water and ozone contents will be interpolated from the US-1962 standard atmosphere, and the AOT will be interpolated from a 2km exponential aerosol profile.

Arguments:
  • altitude – The altitude of the sensor, in km.
  • aot – (Optional, keyword argument) The AOT at 550nm at the sensor
  • water – (Optional, keyword argument) The water vapour content (in g/cm^2) at the sensor
  • ozone – (Optional, keyword argument) The ozone content (in cm-atm) at the sensor

Example usage:

s.altitudes.set_sensor_custom_altitude(8, 0.35, 1.6, 0.4) # Altitude of 8km, AOT of 0.35, Water content of 1.6g/cm^2 and Ozone of 0.4cm-atm
set_sensor_satellite_level()

Set the sensor altitude to be satellite level.

set_sensor_sea_level()

Set the sensor altitude to be sea level.

set_target_custom_altitude(altitude)

Set the altitude of the target.

Arguments:
  • altitude – The altitude of the target, in km
set_target_pressure(pressure)

Set the pressure of the target (a proxy for the height of the target).

Arguments:
  • pressure – The pressure at the target, in mb
set_target_sea_level()

Set the altitude of the target to be at sea level (0km)

Wavelengths

class Py6S.Wavelength

Select one or more wavelengths for the 6S simulation.

There are a number of ways to do this:

  1. Pass a single value of a wavelength in micrometres. The simulation will be performed for just this wavelength:

    Wavelength(0.43)
    
  2. Pass a start and end wavelength in micrometres. The simulation will be performed across this wavelength range with a constant filter function (spectral response function) of 1.0:

    Wavelength(0.43, 0.50)
    
  3. Pass a start and end wavelength, and a filter given at 2.5nm intervals. The simulation will be performed across this wavelength range using the given filter function:

    Wavelength(0.400, 0.410, [0.7, 0.9, 1.0, 0.3])
    
  4. Pass a constant (as defined in this class) for a pre-defined wavelength range:

    Wavelength(PredefinedWavelengths.LANDSAT_TM_B1)
    

Atmospheric Corrections

class Py6S.AtmosCorr

Class representing options for selecting atmospheric correction settings for 6S.

classmethod AtmosCorrBRDFFromRadiance(radiance)

Set 6S to perform atmospheric correction using a fully BRDF-represented surface, using a given radiance value.

Arguments: * radiance – Radiance of the surface

classmethod AtmosCorrBRDFFromReflectance(reflectance)

Set 6S to perform atmospheric correction using a fully BRDF-represented surface, using a given reflectance value.

Arguments: * reflectance – Reflectance of the surface.

classmethod AtmosCorrLambertianFromRadiance(radiance)

Set 6S to perform atmospheric correction assuming a Lambertian surface, using a given radiance value.

Arguments: * radiance – Radiance of the surface.

classmethod AtmosCorrLambertianFromReflectance(reflectance)

Set 6S to perform atmospheric correction assuming a Lambertian surface, using a given reflectance value.

Arguments: * reflectance – Reflectance of the surface.

classmethod NoAtmosCorr()

Set 6S not to perform any atmospheric correction