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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
File details
Details for the file lightweaver-0.3.3.tar.gz
.
File metadata
- Download URL: lightweaver-0.3.3.tar.gz
- Upload date:
- Size: 3.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.2 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 82b608873567c544b0e2382e023740cb13c42dc0855d07d4ac65916a4d79b43a |
|
MD5 | 9d1b0a8afeeceacdf8ae9d926218fdf0 |
|
BLAKE2b-256 | a040003ac3bcbb4da4e1ff21dcf1eac567aa8846749b01e9a6bd68432cd34148 |
File details
Details for the file lightweaver-0.3.3-cp38-cp38-win_amd64.whl
.
File metadata
- Download URL: lightweaver-0.3.3-cp38-cp38-win_amd64.whl
- Upload date:
- Size: 3.2 MB
- Tags: CPython 3.8, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.2 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 69725297079abec1dc6dbc1b582e6466765d0a147866d9ab12d9c77c9c2e4207 |
|
MD5 | 91d4ad8947f783713484ce1512bdef44 |
|
BLAKE2b-256 | bfdf7c001f8143722d7312c8ec45128d37311c66fe4c6c653bd7096c128b302d |
File details
Details for the file lightweaver-0.3.3-cp38-cp38-win32.whl
.
File metadata
- Download URL: lightweaver-0.3.3-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.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.2 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ea45b6744842703a9e46081be15f0a5e3bf12e69fe34dec29b515a6d6457447a |
|
MD5 | fd765b7e386fffbffcb153d3c5302a1a |
|
BLAKE2b-256 | c09bc07214af258564087be693c520818d9fe85ef6aec3188e1e62a40ec18c2d |
File details
Details for the file lightweaver-0.3.3-cp38-cp38-manylinux2010_x86_64.whl
.
File metadata
- Download URL: lightweaver-0.3.3-cp38-cp38-manylinux2010_x86_64.whl
- Upload date:
- Size: 7.0 MB
- Tags: CPython 3.8, manylinux: glibc 2.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.2 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e144cdd91bd2b54718e5840c932f2bea6b0ca5a853fb218122fc4b83317949eb |
|
MD5 | 0d4e92f53385dff04b61643dbb77994a |
|
BLAKE2b-256 | caec10379ee6db8f1d6ab223b07378ddbb3d533f44550ad6362bd68fae253add |
File details
Details for the file lightweaver-0.3.3-cp38-cp38-manylinux1_x86_64.whl
.
File metadata
- Download URL: lightweaver-0.3.3-cp38-cp38-manylinux1_x86_64.whl
- Upload date:
- Size: 7.0 MB
- Tags: CPython 3.8
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.2 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8ed027ed70ca4289cd0dc7199cf9a35e2bc0d3c712eb7fedd276be1d6dc33d3c |
|
MD5 | d24ae6248ef829e87489a3166f753aaf |
|
BLAKE2b-256 | ccc488dc340ff0e28da7a0ea44fe8b4d960753c164f4aa45f3f6c2c3ebecc65d |
File details
Details for the file lightweaver-0.3.3-cp38-cp38-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: lightweaver-0.3.3-cp38-cp38-macosx_10_9_x86_64.whl
- Upload date:
- Size: 3.4 MB
- Tags: CPython 3.8, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.2 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2a06527d7ebc4514d98da69a640e7b1d48732729897b9b0c20c4695dc16a262d |
|
MD5 | fc2fa496a61778704a1f08ecf3dcca89 |
|
BLAKE2b-256 | 970ea0d3dd63b4569392381c02ebdb3c8e1f67a594c20d5fbe942872dd996f17 |