The SixS class

The SixS class is the heart of Py6S. It has attributes and methods that allow you to set parameters, run 6S and access the outputs. These are described in detail below, but the basic usage pattern is:

from Py6S import *
s = SixS() # Instantiate the class
s.aero_profile = AeroProfile.PredefinedType(AeroProfile.Maritime) # Set various parameters # Run the model
print s.outputs.pixel_irradiance # Access the outputs
class Py6S.SixS(path=None)

Wrapper for the 6S Radiative Transfer Model.

This is the main class which can be used to instantiate an object which has the key methods for running 6S.

The most import method in this class is the run() method which writes the 6S input file, runs the model and processes the output.

The parameters of the model are set as the attributes of this class, and the outputs are available as attributes under the output attribute.

For a simple test to ensure that Py6S has found the correct executable for 6S simply run the test() method of this class:



  • atmos_profile – The atmospheric profile to use. Should be set to the output of an AtmosProfile method. For example:

    s.atmos_profile = AtmosProfile.PredefinedType(AtmosProfile.MidlatitudeSummer)
  • aero_profile – The aerosol profile to use. Should be set to the output of an AeroProfile method. For example:

    s.aero_profile = AeroProfile.PredefinedType(AeroProfile.Urban)
  • ground_reflectance – The ground reflectance to use. Should be set to the output of a GroundReflectance method. For example:

    s.ground_reflectance = GroundReflectance.HomogeneousLambertian(0.3)
  • geometry – The geometrical settings, including solar and viewing angles. Should be set to an instance of a Geometry class, which can then have various attributes set. For example:

    s.geometry = GeometryUser()
    s.geometry.solar_z = 35
    s.geometry.solar_a = 190
  • altitudes – The settings for the sensor and target altitudes. This should be set to an instance of the Altitudes() class, which can then have various attributes set. For example:

    s.altitudes = Altitudes()
  • wavelength – The wavelength settings. Should be set to the output of the Wavelength() method. For example:

    s.wavelength = Wavelength(0.550)
  • atmos_corr – The settings for whether to perform atmospheric correction or not, and the parameters for this correction. Should be set to the output of a AtmosCorr method. For example:

    s.atmos_corr = AtmosCorr.AtmosCorrLambertianFromReflectance(0.23)

Prints out information about the configuration of Py6S generally, and the current SixS object specifically, which will be useful when debugging problems.


Runs the 6S model and stores the outputs in the output variable.

May raise an ExecutionError if the 6S executable cannot be found.

classmethod test(path=None)

Runs a simple test to ensure that 6S and Py6S are installed correctly.


Generates a 6S input file from the parameters stored in the object and writes it to the given filename.

The input file is guaranteed to be a valid 6S input file which can be run manually if required



The sixs path