Skip to main content

6S Binaries

release workflow tests workflow PyPI - Version GitHub last commit (branch) License Code style: black

This distribution provides access to compiled binaries of the 6S Radiative Transfer Model as package resources.

It does not provide a Python interface to 6S. For a Python interface, see Robin Wilson's Py6S.

Currently, this project includes binaries for 6SV1.1 and 6SV2.1. It requires Python 3.9+ and supports Linux, macOS, and Windows.

Install

Pre-compiled wheels can be installed from PyPI:

$ pip install 6s-bin

If you are using poetry, you can add this distribution as a dependency using poetry add:

$ poetry add 6s-bin

Installing from source

Building this distribution involves downloading, validating, and compiling the 6S source code. See build.py for details about the build process. A Fortran 77 compiler is required to compile 6S.

Build and install from source distribution:

$ pip install --no-binary=6s-bin 6s-bin

Build and install from git:

$ pip install '6s-bin @ git+https://github.com/brianschubert/6s-bin'

Build and install from local source tree:

$ pip install .

Python Usage

Call sixs_bin.get_path(version) to get the path to an installed 6S binary. The parameter version is required, and must be either the string "1.1" or "2.1".

>>> import sixs_bin

>>> sixs_bin.get_path("1.1")
PosixPath('<path to virtual environment>/lib/python3.X/site-packages/sixs_bin/sixsV1.1')

>>> sixs_bin.get_path("2.1")
PosixPath('<path to virtual environment>/lib/python3.X/site-packages/sixs_bin/sixsV2.1')

If you also have Py6S installed, you can call sixs_bin.make_wrapper() to get a Py6S.SixS instance that's configured to use the installed 6SV1.1 binary.

>>> wrapper = sixs_bin.make_wrapper()

>>> wrapper
<Py6S.sixs.SixS object at 0x...>

>>> wrapper.sixs_path
PosixPath('<path to virtual environment>/lib/python3.X/site-packages/sixs_bin/sixsV1.1')

>>> wrapper.run()
>>> wrapper.outputs.apparent_radiance
134.632

Command Line Usage

Run python3 -m sixs_bin --help to see all available command line options.

$ python3 -m sixs_bin --help
usage: python3 -m sixs_bin [-h] [--version]
                           [--path {1.1,2.1} | --exec {1.1,2.1} | --test-wrapper]

6S v1.1 and 6S v2.1 binaries provided as package resources.

optional arguments:
  -h, --help        show this help message and exit
  --version         show program's version number and exit

command:
  --path {1.1,2.1}  Print the path to the specified 6S executable from this package's
                    resources.
  --exec {1.1,2.1}  Execute specified 6S executable in a subprocess, inheriting stdin and
                    stdout. This option is provided as a convenience, but its not
                    generally recommended. Running 6S using this option is around 5%
                    slower than executing the binary directly, due the overhead of
                    starting the Python interpreter and subprocess.
  --test-wrapper    Run Py6S.SixS.test on this package's 6SV1.1 executable.

To get the path to an installed 6S binary, run sixs_bin as an executable module with the --path flag specified. The --path flag takes one required argument, which must be either the string 1.1 or 2.1:

$ python3 -m sixs_bin --path 2.1
<path to virtual environment>/lib/python3.X/site-packages/sixs_bin/sixsV2.1

If you need the path to the containing directory, use dirname. For example:

$ SIXS_DIR=$(dirname $(python3 -m sixs_bin --path 2.1))
$ echo $SIXS_DIR
<path to virtual environment>/lib/python3.X/site-packages/sixs_bin

Test

Tests can be run using pytest:

$ pytest

Some tests are included to check compatibility with Robin Wilson's Py6S wrapper. These tests will be ignored if Py6S is not available.

Metadata

Release files for 6s-bin 0.11.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for 6s-bin 0.11.3
File Size Uploaded Provenance
6s_bin-0.11.3.tar.gz 13.4 kB Without provenance Details

Built distributions (wheels)

Table of built distributions (wheels) for 6s-bin 0.11.3
File Interpreter ABI Platform
6s_bin-0.11.3-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details
6s_bin-0.11.3-py3-none-manylinux_2_35_x86_64.whl Python 3 none Linux glibc 2.35+ x86-64 Details
6s_bin-0.11.3-py3-none-macosx_12_0_x86_64.whl Python 3 none macOS 12.0+ x86-64 Details

Total release size: 3.0 MB

Release files / 6s_bin-0.11.3.tar.gz

Download URL 6s_bin-0.11.3.tar.gz
Size 13.4 kB
Tags Source
SHA-256 checksum
How to use checksums
2d40f0f4606221d95893a7935b89eadc3725184401c4d1641e99ff41c7402958
BLAKE2b-256 checksum
How to use checksums
0d988d2a4fe10206cc85b04fcc7c485993ba6da82567a33981571f5cf3b5dd34
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.7

Release files / 6s_bin-0.11.3-py3-none-win_amd64.whl

Download URL 6s_bin-0.11.3-py3-none-win_amd64.whl
Size 1.3 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
1667613f3ef16fe3a4bd30403365c8fd047871c17a28b27c46b5439055aaedd3
BLAKE2b-256 checksum
How to use checksums
53b9137e4fa94c0b14a3a4deda6d1b4daa5429b42ba59d9c97d99176d955426c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.7

Release files / 6s_bin-0.11.3-py3-none-manylinux_2_35_x86_64.whl

Download URL 6s_bin-0.11.3-py3-none-manylinux_2_35_x86_64.whl
Size 828.2 kB
Tags Linux glibc 2.35+ x86-64 Python 3
SHA-256 checksum
How to use checksums
861abecb7e2c506e62115223512686533af7124d1174cd8bae5761cb650ad483
BLAKE2b-256 checksum
How to use checksums
89b08e6a812d56035e6f18241eecc32bc80eeb5eaaca6220532dbc09e5ec4cb1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.7

Release files / 6s_bin-0.11.3-py3-none-macosx_12_0_x86_64.whl

Download URL 6s_bin-0.11.3-py3-none-macosx_12_0_x86_64.whl
Size 823.9 kB
Tags Python 3 macOS 12.0+ x86-64
SHA-256 checksum
How to use checksums
2c83c6f1a5d3d7774f5c067142cc64ada1129a4af96f8bb33a7104f137f27801
BLAKE2b-256 checksum
How to use checksums
c15292acb0070ec00a9bfe26ccd8a4a97a0bd250711123d51fef45db9870188a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.7

Security for 6s-bin 0.11.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.11.3 This release

4 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page