• Stars
    star
    164
  • Rank 230,032 (Top 5 %)
  • Language
    Python
  • License
    GNU Lesser Genera...
  • Created over 12 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A Python interface to the 6S Radiative Transfer Model
https://travis-ci.org/robintw/Py6S.svg?branch=master

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 [email protected].

More Repositories

1

BankClassify

Simple example of using a Naive Bayesian classification to classify entries in bank statements
Python
125
star
2

PandasToPowerpoint

Python utility to take a Pandas DataFrame and create a Powerpoint table
Python
103
star
3

RPiNDVI

Raspberry PI NDVI Code
Python
61
star
4

AutoZotBib

JavaScript
37
star
5

LatLongToWRS

Python code to get a Landsat WRS-2 path and row from a latitude/longitude co-ordinate
Python
34
star
6

daterangeparser

Python module to parse human-style date ranges (eg. 15th-19th March 2011) to datetimes
Python
32
star
7

pywavethermo

Basic module to control the Worcester Wave thermostat from Python
Python
27
star
8

XArrayAndRasterio

Experimental code for loading/saving XArray DataArrays to Geographic Rasters using rasterio
Jupyter Notebook
22
star
9

PyProSAIL

Python interface to the ProSAIL leaf/canopy reflectance model
Fortran
21
star
10

XArray_PyConUK2018

Code and slides for my talk at PyCon UK 2018 on XArray
Jupyter Notebook
18
star
11

PyFMask

Python version of the FMask Landsat Cloud Masking code
Python
13
star
12

RastersRevealedTalk

Slides and resources for talk given at Rasters Revealed, 21st Feb 2017
Jupyter Notebook
9
star
13

offline_folium

Allows using folium without an internet connection
Python
9
star
14

DropboxBasedWordCount

Code to download revisions of files from Dropbox, then use texcount to do a word count of them
Jupyter Notebook
9
star
15

Python-DocSets

Python docsets for use with Dash (http://kapeli.com/dash/)
JavaScript
8
star
16

PyAURN

A Python module to import data from the UK Automatic Urban Rural Network (air pollution monitoring network)
Python
7
star
17

sqlalchemy-units-example

Example code from 'Pint + SQLAlchemy = Unit consistency and enforcement in your database' poster at PyData Global 2020
Python
7
star
18

LandsatUtils

Python
5
star
19

manifestoclouds

Creates word clouds from political party manifestos
Python
5
star
20

CloudFrequencyApp

CloudFrequency webapp, using Google App Engine
JavaScript
4
star
21

ParentZonePhotoDownloader

Downloads photos from a ParentZone account
Python
4
star
22

DunesGIS

ENVI/IDL and ArcGIS routines for processing DEMs of sand dunes from the DECAL model
Prolog
4
star
23

6S

6S with CMake files
Fortran
4
star
24

py6s-website

Website for Py6S
HTML
3
star
25

Web6S

Web-based interface to Py6S
Python
3
star
26

GDALUtils

Python
3
star
27

bib2coins

Utility to convert BibTeX files to COINS metadata (see http://ocoins.info/) for use in webpages
Python
3
star
28

RTWToolsForArcGIS

RTW Tools for ArcGIS
Python
3
star
29

rtwrtm

Monte Carlo Ray Tracing Radiative Transfer Model (RTM)
IDL
2
star
30

LeafletExample_IMD_Choropleth

Example Leaflet code for a choropleth map with auto-generated and auto-hiding legend
JavaScript
2
star
31

PyToENVI

Python module to easily allow you to display files in ENVI
Python
2
star
32

julian_timehop

Sends a daily 'Julian Timehop' email reminding me of things Julian did on this day in previous years
Python
2
star
33

LeafletExample_IMD_Choropleth_With_Limits

JavaScript
2
star
34

rtwtools-website

HTML
2
star
35

pytest_examples

Simple Pytest examples
Python
2
star
36

WernerModel

The Werner (1995) model and its extension, written for COMP6023 at the University of Southampton
Python
2
star
37

CW-ideas

Hack day project from CW21 working on collating and analysing collaborative ideas and hack day projects from previous Collaborations Workshops
HTML
2
star
38

VisAOT

Code for paper: Are visibility-derived AOT estimates suitable for parameterising satellite data atmospheric correction algorithms?
2
star
39

ProSAIL

New Python version of ProSAIL
Python
1
star
40

Academic-Website

My academic website - hosted at www.rtwilson.com/academic
PHP
1
star
41

BreathingSpacesWebmap

Web map for Breathing Spaces project
JavaScript
1
star
42

sse_powercuts

1
star
43

SESG6028Coursework2

Code for SESG6028 Coursework 2
C
1
star
44

FlaskTemperature

Flask app for reading temperature from W1 sensor on the RPi
Python
1
star
45

WeddingSite

Files for our wedding website
PHP
1
star
46

first_app

First app for RoR tutorial application
Ruby
1
star
47

FreeGISData

HTML
1
star
48

sample_app

RoR Tutorial Sample Application
Ruby
1
star
49

RWords

Search words in the SOWPODs dictionary in interesting ways
Ruby
1
star
50

Personal-Website

Source for my personal website - available at www.rtwilson.com/personal
PHP
1
star
51

RTWIDL

RTWTools for IDL - a library of useful IDL routines
IDL
1
star
52

CrestExtract

New version of Crest Extraction code in DunesGIS
Prolog
1
star
53

COMP3008Coursework

Code for my COMP3008 Coursework
R
1
star
54

TheatreScraper

Python
1
star
55

SESG6028Coursework3

Code for SESG6028 Coursework 3
C
1
star
56

RTWOBIA

Robin's Object-based Image Analysis software
Prolog
1
star
57

recipy-website

HTML
1
star
58

pandas-FSDR

Python
1
star
59

SESG6028Coursework3New

New (working?) version of SESG6028 Coursework 3
C
1
star
60

WoodgetDietrichWilson2019

Code for the Machine Learning analyses in Woodget, Dietrich and Wilson (2019)
Jupyter Notebook
1
star
61

SESG6028Coursework1

Coursework for SESG6028
C
1
star
62

PySun

Python sun.py as a proper module - originally from http://kortis.to/radix/python/code/Sun.py (Public Domain)
Python
1
star
63

IWVComparison

Code to run the validations & comparisons presented in 'A global comparison of integrated water vapour estimates from WMO radiosondes, AERONET sun photometers and GPS for the 17 year period from 1997 to 2013' by Wilson et al. Edit
R
1
star
64

AOT2PM

Python
1
star