{"id":22174313,"url":"https://github.com/brianschubert/6s-bin","last_synced_at":"2025-06-24T15:11:38.280Z","repository":{"id":182431600,"uuid":"668481208","full_name":"brianschubert/6s-bin","owner":"brianschubert","description":"Convenience distribution for building and installing local 6S executables","archived":false,"fork":false,"pushed_at":"2024-03-13T20:11:35.000Z","size":234,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-29T13:14:45.429Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/brianschubert.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-07-19T23:17:20.000Z","updated_at":"2024-10-16T03:39:33.000Z","dependencies_parsed_at":"2023-12-29T16:34:18.001Z","dependency_job_id":"b90cd695-b74d-4bc1-8158-929e142b27e6","html_url":"https://github.com/brianschubert/6s-bin","commit_stats":null,"previous_names":["brianschubert/6s-bin"],"tags_count":18,"template":false,"template_full_name":null,"purl":"pkg:github/brianschubert/6s-bin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brianschubert%2F6s-bin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brianschubert%2F6s-bin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brianschubert%2F6s-bin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brianschubert%2F6s-bin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brianschubert","download_url":"https://codeload.github.com/brianschubert/6s-bin/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brianschubert%2F6s-bin/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261700856,"owners_count":23196506,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-02T07:43:45.236Z","updated_at":"2025-06-24T15:11:38.250Z","avatar_url":"https://github.com/brianschubert.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 6S Binaries\n\n[![release workflow](https://github.com/brianschubert/6s-bin/actions/workflows/release.yaml/badge.svg?event=push)](https://github.com/brianschubert/6s-bin/actions/workflows/release.yaml)\n[![tests workflow](https://github.com/brianschubert/6s-bin/actions/workflows/test.yaml/badge.svg)](https://github.com/brianschubert/6s-bin/actions/workflows/test.yaml)\n[![PyPI - Version](https://img.shields.io/pypi/v/6s-bin)](https://pypi.org/project/6s-bin)\n[![GitHub last commit (branch)](https://img.shields.io/github/last-commit/brianschubert/6s-bin/develop)](https://github.com/brianschubert/6s-bin/commits/develop)\n[![License](https://img.shields.io/github/license/brianschubert/6s-bin)](./LICENSE)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-black.svg)](https://github.com/psf/black)\n\nThis distribution provides access to compiled binaries of the [6S Radiative Transfer Model](https://salsa.umd.edu/6spage.html) as [package resources](https://docs.python.org/3/library/importlib.resources.html#module-importlib.resources).\n\nIt *does not* provide a Python interface to 6S. For a Python interface, see  Robin Wilson's [Py6S].\n\nCurrently, this project includes binaries for 6SV1.1 and 6SV2.1. It requires Python 3.9+ and supports Linux, macOS, and Windows.\n\n## Install\n\nPre-compiled wheels can be installed from [PyPI](https://pypi.org/project/6s-bin/):\n```shell\n$ pip install 6s-bin\n```\nIf you are using [poetry](https://python-poetry.org/), you can add this distribution as a dependency using \n`poetry add`:\n```shell\n$ poetry add 6s-bin\n```\n\n### Installing from source\n\nBuilding this distribution involves downloading, validating, and compiling the 6S source code. See [`build.py`](./build.py) for details about the build process. A Fortran 77 compiler is required to compile 6S.\n\nBuild and install from source distribution:\n```shell\n$ pip install --no-binary=6s-bin 6s-bin\n```\n\nBuild and install from git:\n```shell\n$ pip install '6s-bin @ git+https://github.com/brianschubert/6s-bin'\n```\n\nBuild and install from local source tree:\n```shell\n$ pip install .\n```\n\n## Python Usage\n\nCall `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\"`.\n```pycon\n\u003e\u003e\u003e import sixs_bin\n\n\u003e\u003e\u003e sixs_bin.get_path(\"1.1\")\nPosixPath('\u003cpath to virtual environment\u003e/lib/python3.X/site-packages/sixs_bin/sixsV1.1')\n\n\u003e\u003e\u003e sixs_bin.get_path(\"2.1\")\nPosixPath('\u003cpath to virtual environment\u003e/lib/python3.X/site-packages/sixs_bin/sixsV2.1')\n```\n\nIf you also have [Py6S][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.\n\n```pycon\n\u003e\u003e\u003e wrapper = sixs_bin.make_wrapper()\n\n\u003e\u003e\u003e wrapper\n\u003cPy6S.sixs.SixS object at 0x...\u003e\n\n\u003e\u003e\u003e wrapper.sixs_path\nPosixPath('\u003cpath to virtual environment\u003e/lib/python3.X/site-packages/sixs_bin/sixsV1.1')\n\n\u003e\u003e\u003e wrapper.run()\n\u003e\u003e\u003e wrapper.outputs.apparent_radiance\n134.632\n```\n\n## Command Line Usage\n\nRun `python3 -m sixs_bin --help` to see all available command line options.\n```none\n$ python3 -m sixs_bin --help\nusage: python3 -m sixs_bin [-h] [--version]\n                           [--path {1.1,2.1} | --exec {1.1,2.1} | --test-wrapper]\n\n6S v1.1 and 6S v2.1 binaries provided as package resources.\n\noptional arguments:\n  -h, --help        show this help message and exit\n  --version         show program's version number and exit\n\ncommand:\n  --path {1.1,2.1}  Print the path to the specified 6S executable from this package's\n                    resources.\n  --exec {1.1,2.1}  Execute specified 6S executable in a subprocess, inheriting stdin and\n                    stdout. This option is provided as a convenience, but its not\n                    generally recommended. Running 6S using this option is around 5%\n                    slower than executing the binary directly, due the overhead of\n                    starting the Python interpreter and subprocess.\n  --test-wrapper    Run Py6S.SixS.test on this package's 6SV1.1 executable.\n```\n\nTo 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`:\n```shell\n$ python3 -m sixs_bin --path 2.1\n\u003cpath to virtual environment\u003e/lib/python3.X/site-packages/sixs_bin/sixsV2.1\n```\n\nIf you need the path to the containing directory, use `dirname`. For example:\n```shell\n$ SIXS_DIR=$(dirname $(python3 -m sixs_bin --path 2.1))\n$ echo $SIXS_DIR\n\u003cpath to virtual environment\u003e/lib/python3.X/site-packages/sixs_bin\n```\n\n## Test\n\nTests can be run using pytest:\n```shell\n$ pytest\n```\n\nSome tests are included to check compatibility with Robin Wilson's [Py6S][Py6S] wrapper. These tests will be ignored if `Py6S` is not available.\n\n[Py6S]: https://www.py6s.rtwilson.com/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrianschubert%2F6s-bin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrianschubert%2F6s-bin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrianschubert%2F6s-bin/lists"}