Skip to main content

Non-LTE Radiative Transfer Framework in Python

Project description

Lightweaver

C. Osborne (University of Glasgow) & I. Milić (NSO/CU Boulder), 2019-2020

MIT License

Lightweaver is an NLTE radiative transfer code in the style of RH. It is well validated against RH and also SNAPI. The code is currently designed for plane parallel atmospheres, either 1D single columns (wavelength parallelisation in progress) or 1.5D parallel columns with ProcessPool or MPI parallelisation. There is also preliminary support for 2D atmospheres.

Whilst the core numerics are implented in C++, as much of the non-performance critical code as possible is implemented in Python, and the code currently only has a Python interface (provided through a Cython binding module). These bindings could be rewritten in another language, so long as the same information can be provided to the C++ core.

The aim of Lightweaver is to provide an NLTE Framework, rather than a "code". That is to say, it should be more maleable, and provide easier access to experimentation, with most forms of experimentation (unless one wants to play with formal solvers or iteration schemes), being available directly from python. Formal solvers that comply with the interface defined in Lightweaver can be compiled into separate shared libraries and then loaded at runtime. The preceding concepts are inspired by the well-recieved machine learning frameworks such as PyTorch and Tensorflow.

Installation

For most users precompiled python wheels (supporting modern Linux, Mac, and Windows 10 systems) can be installed from pip and are the easiest way to get started with Lightweaver. Lightweaver requires python 3.8+, and it is recommended to be run inside a virtual environment using conda. In this case a new virtual environment can be created with:

conda create -n Lightweaver python=3.8

activate the environment:

conda activate Lightweaver

and Lightweaver can then be installed with

python -m pip install lightweaver

Installation from source

Whilst the above should work for most people, if you wish to work on the Lightweaver backend it is beneficial to have a source installation. This requires a compiler supporting C++17. The build is then run with python3 -m pip install -vvv -e .. The libraries currently produce a few warnings, but should not produce any errors.

Documentation

Documentation is currently lacking, although it is currently being produced. I suggest looking through the samples repository (in particular the Simple*.py) to gain an understanding of the basic functionality and interfaces. These samples are kept as up to date as possible.

Feel free to contact me through this repository if difficulties are encountered.

Acknowledgements

The python implementation of the Wittmann equation of state has been kindly provided J. de la Cruz Rodriguez.

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

lightweaver-0.2.4.tar.gz (3.1 MB view details)

Uploaded Source

Built Distributions

lightweaver-0.2.4-cp38-cp38-win_amd64.whl (3.1 MB view details)

Uploaded CPython 3.8 Windows x86-64

lightweaver-0.2.4-cp38-cp38-win32.whl (3.1 MB view details)

Uploaded CPython 3.8 Windows x86

lightweaver-0.2.4-cp38-cp38-manylinux2010_x86_64.whl (6.6 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.12+ x86-64

lightweaver-0.2.4-cp38-cp38-manylinux1_x86_64.whl (6.6 MB view details)

Uploaded CPython 3.8

lightweaver-0.2.4-cp38-cp38-macosx_10_9_x86_64.whl (3.3 MB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

File details

Details for the file lightweaver-0.2.4.tar.gz.

File metadata

  • Download URL: lightweaver-0.2.4.tar.gz
  • Upload date:
  • Size: 3.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.8.6

File hashes

Hashes for lightweaver-0.2.4.tar.gz
Algorithm Hash digest
SHA256 44aabe3f0bd7b19f943ed9ca34f35737f57bb9e2d19e26d1d3c4412ba5cbb065
MD5 1a2154832d893e72cd034516b3a5af04
BLAKE2b-256 18b88ff7dfd9c0e0f2da736594c80e531739a018987cf9b9b08c028ffae68807

See more details on using hashes here.

File details

Details for the file lightweaver-0.2.4-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: lightweaver-0.2.4-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 3.1 MB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.8.6

File hashes

Hashes for lightweaver-0.2.4-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 4d5ec1bc3ad66d0beb9b93fcf1b18da4251c117fdf58583a2bbbeb81fe0e5f97
MD5 dfde9dbfbe52d5968feea487b506d9b6
BLAKE2b-256 a2f189f2f5ca85c5d138e6ab0d10066c06e8c02d1ef2b5ad678d07635b9d998f

See more details on using hashes here.

File details

Details for the file lightweaver-0.2.4-cp38-cp38-win32.whl.

File metadata

  • Download URL: lightweaver-0.2.4-cp38-cp38-win32.whl
  • Upload date:
  • Size: 3.1 MB
  • Tags: CPython 3.8, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.8.6

File hashes

Hashes for lightweaver-0.2.4-cp38-cp38-win32.whl
Algorithm Hash digest
SHA256 737820437f6a4ed25eb87707d8fbf74ed4d5daa8a7ecaf1bc2a16f0215efa90e
MD5 92a16cfc4f34a7bd8bdbe664d7a812c6
BLAKE2b-256 3738031c8992d36a0822fe42ca9ba6ef0adb1e184d507de607df7ef2353c6e52

See more details on using hashes here.

File details

Details for the file lightweaver-0.2.4-cp38-cp38-manylinux2010_x86_64.whl.

File metadata

  • Download URL: lightweaver-0.2.4-cp38-cp38-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 6.6 MB
  • Tags: CPython 3.8, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.8.6

File hashes

Hashes for lightweaver-0.2.4-cp38-cp38-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 0033388b49e48e67b8d1f3c8b5a47b37e58e1488e20eb29e2f2a6f8d68ae495e
MD5 8d9e5d05329c43e8ebb8ef03bce401c7
BLAKE2b-256 4e54c77c39038a8d08fe1133bfc71f0b907d698acb62252de0a341cf169939c3

See more details on using hashes here.

File details

Details for the file lightweaver-0.2.4-cp38-cp38-manylinux1_x86_64.whl.

File metadata

  • Download URL: lightweaver-0.2.4-cp38-cp38-manylinux1_x86_64.whl
  • Upload date:
  • Size: 6.6 MB
  • Tags: CPython 3.8
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.8.6

File hashes

Hashes for lightweaver-0.2.4-cp38-cp38-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 27edd5f0680568ff14a5ac62630bb55f8e18d5727ae9fb1115587ba50f32df2a
MD5 0e419d78d6cbe46708820c846db6b929
BLAKE2b-256 282196256f90af8354d133efcf769014a216895be7047e75858130cce182cd29

See more details on using hashes here.

File details

Details for the file lightweaver-0.2.4-cp38-cp38-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: lightweaver-0.2.4-cp38-cp38-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 3.3 MB
  • Tags: CPython 3.8, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.8.6

File hashes

Hashes for lightweaver-0.2.4-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 d673f55d4758df36dc2c8a85efcd3b56045c7a971436c6adc0c025af19463940
MD5 004ed7e51ff474b8e8dfa899cbb30061
BLAKE2b-256 ff67c3cd6fe8c36064fc82637f930adf9b252822b961444df7eab50e732b7299

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