Skip to main content

A wrapper for the 6S Radiative Transfer Model to make it easy to run simulations with a variety of input parameters, and to produce outputs in an easily processable form.

Project description

https://travis-ci.org/robintw/Py6S.svg?branch=master https://coveralls.io/repos/github/robintw/Py6S/badge.svg

Introduction

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
s.run()
# 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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Py6S-1.8.0.tar.gz (122.3 kB view details)

Uploaded Source

File details

Details for the file Py6S-1.8.0.tar.gz.

File metadata

  • Download URL: Py6S-1.8.0.tar.gz
  • Upload date:
  • Size: 122.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.1

File hashes

Hashes for Py6S-1.8.0.tar.gz
Algorithm Hash digest
SHA256 256162d2f1f558e601d4f79022c037a0051838ba307b9f4d1f5fcf0b46a0c277
MD5 b030bccb26be73a965c23f91b1d80c7c
BLAKE2b-256 999c87ed66cfe2bf44be4dfae3cfde4946b91deb9a745e2b5e941690395d5696

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page