A Python interface to the 6S Radiative Transfer Model
Failed to load latest commit information.
Py6S Bumped to v1.7.0 Jan 31, 2017
doc Updated installation to show conda method of installation Feb 15, 2017
test Fixed test (SIXSVERSION not defined in that file) Jul 22, 2016
.bumpversion.cfg Bumped to v1.7.0 Jan 31, 2017
.coveralls.yml Updated for use with coveralls Feb 14, 2017
.gitignore Added tox config and ignored tox temp dir Jan 23, 2014
.project First commit Jun 20, 2011
.travis.yml Removed CircleCI config & changed python-coveralls dep to use pip to … Feb 14, 2017
CONTRIBUTORS Revert "Merge branch 'master' of github.com:robintw/Py6S" May 24, 2014
COPYING Added proper licensing info #SSI_Alterations Dec 14, 2012
COPYING.LESSER Updated COPYING.LESSER file to contain proper LGPL license. Mar 24, 2013
MANIFEST.in Updated setup.py and added MANIFEST.in to make running tests easier Oct 26, 2015
README.rst Fixed links for badges Feb 14, 2017
create_new_predefined_wvs.py Added extra functionality to code to create new predefined wavelengths Jul 9, 2015
pip_requirements Minor changes to PR #28 to remove pandas in requirements file and alt… Jul 22, 2016
setup.py Bumped to v1.7.0 Jan 31, 2017
testinput Updated release notes Jan 22, 2014
tox.ini Add pandas dep to tox Feb 14, 2017
trialparallel.py Renames etc May 13, 2012
wv0471 Updated release notes Jan 22, 2014
wvlinux Updated release notes Jan 22, 2014
wvmac Updated release notes Jan 22, 2014
wvwin Updated release notes Jan 22, 2014




Py6S is a Python interface to the 6S Radiative Transfer Model. It allows you to run many 6S simulations using a simple Python syntax, rather than dealing with the rather cryptic 6S input and output files. As well as generally making it easier to use 6S, Py6S adds some new features:

  • The ability to run many simulations easily and quickly, with no manual editing of input files
  • The ability to run for many wavelengths and/or angles and easily plot the results
  • The ability to import real-world data to parameterise 6S, from radiosonde measurements and AERONET sun photometer measurements

Py6S has been designed to be easy to use, and to work on the 'principle of least surprise'. Far more details are available in the rest of this documentation, but a quick code example should give you an idea of what Py6S can do:

# Import the Py6S module
from Py6S import *
# Create a SixS object
s = SixS()
# Set the wavelength to 0.675um
s.wavelength = Wavelength(0.675)
# Set the aerosol profile to Maritime
s.aero_profile = AeroProfile.PredefinedType(AeroProfile.Maritime)
# Run the model
# Print some outputs
print s.outputs.pixel_reflectance, s.outputs.pixel_radiance, s.outputs.direct_solar_irradiance
# Run the model across the VNIR wavelengths, and plot the result
wavelengths, results = SixSHelpers.Wavelengths.run_vnir(s, output_name='pixel_radiance')
SixSHelpers.Wavelengths.plot_wavelengths(wavelengths, results, "Pixel radiance ($W/m^2$)")

This will produce the results shown below:

0.283 112.095 667.589

Followed by an image containing a graph showing the result for each wavelength.

To use Py6S you will also need to compile and install the 6S executable. Please follow the installation instructions in the documentation to find out how to do this on Windows, OS X or Linux.

Py6S was described in a journal article which should be referenced if Py6S is used for producing outputs for a scientific report/publication.

This project was written as part of my PhD at the University of Southampton. The code is open-source, released under the LGPL license, and is available at Github.

I'm very interested in receiving feedback, bug reports and feature suggestions, so please email me at robin@rtwilson.com.