Package: 6s-bin
6S BinariesThis distribution provides access to compiled binaries of the6S Radiative Transfer Modelaspackage resources.Itdoes notprovide a Python interface to 6S. For a Python interface, see  Robin Wilson'sPy6S.Currently, this project includes binaries for 6SV1.1 and 6SV2.1. It requires Python 3.9+ and supports Linux, macOS, and Windows.InstallPre-compiled wheels can be installed fromPyPI:$pipinstall6s-binIf you are usingpoetry, you can add this distribution as a dependency usingpoetry add:$poetryadd6s-binInstalling from sourceBuilding this distribution involves downloading, validating, and compiling the 6S source code. Seebuild.pyfor details about the build process. A Fortran 77 compiler is required to compile 6S.Build and install from source distribution:$pipinstall--no-binary=6s-bin6s-binBuild and install from git:$pipinstall'6s-bin @ git+https://github.com/brianschubert/6s-bin'Build and install from local source tree:$pipinstall.Python UsageCallsixs_bin.get_path(version)to get the path to an installed 6S binary. The parameterversionis required, and must be either the string"1.1"or"2.1".>>>importsixs_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 havePy6Sinstalled, you can callsixs_bin.make_wrapper()to get aPy6S.SixSinstance that's configured to use the installed 6SV1.1 binary.>>>wrapper=sixs_bin.make_wrapper()>>>wrapper<Py6S.sixs.SixS object at 0x...>>>>wrapper.sixs_pathPosixPath('<path to virtual environment>/lib/python3.X/site-packages/sixs_bin/sixsV1.1')>>>wrapper.run()>>>wrapper.outputs.apparent_radiance134.632Command Line UsageRunpython3 -m sixs_bin --helpto 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, runsixs_binas an executable module with the--pathflag specified. The--pathflag takes one required argument, which must be either the string1.1or2.1:$python3-msixs_bin--path2.1
<pathtovirtualenvironment>/lib/python3.X/site-packages/sixs_bin/sixsV2.1If you need the path to the containing directory, usedirname. For example:$SIXS_DIR=$(dirname$(python3-msixs_bin--path2.1))$echo$SIXS_DIR<pathtovirtualenvironment>/lib/python3.X/site-packages/sixs_binTestTests can be run using pytest:$pytestSome tests are included to check compatibility with Robin Wilson'sPy6Swrapper. These tests will be ignored ifPy6Sis not available.