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-2021

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 (which can be parallelised over wavelength) or 1.5D parallel columns with ProcessPool or MPI parallelisation. There is also support for unpolarised radiative transfer in 2D atmospheres.

Lightweaver is described in a paper (including examples!), and has API documentation.

Whilst the core numerics are implemented 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). Other languages with a C/C++ interface could interact directly with this core, hopefully allowing it to be reused as needed in different projects.

The aim of Lightweaver is to provide an NLTE Framework, rather than a "code". That is to say, it should be more malleable, 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 popular python 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

  • Paper.
  • API documentation.
  • I suggest looking through the samples repository (in particular the Simple*.py) after the code description in the paper to gain an understanding of the basic functionality and interfaces. These samples are unfortunately not always up to date, but are a work in progress.
  • The MsLightweaver repository contains a more "production grade" tool built on Lightweaver for reprocessing the time-dependent radiative output from RADYN simulations. This tool is currently undocumented, but has a relatively simple structure.

Please 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.8.2.tar.gz (3.3 MB view details)

Uploaded Source

Built Distributions

lightweaver-0.8.2-cp310-cp310-win_amd64.whl (11.9 MB view details)

Uploaded CPython 3.10 Windows x86-64

lightweaver-0.8.2-cp310-cp310-musllinux_1_1_x86_64.whl (19.9 MB view details)

Uploaded CPython 3.10 musllinux: musl 1.1+ x86-64

lightweaver-0.8.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (18.8 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

lightweaver-0.8.2-cp310-cp310-macosx_10_9_x86_64.whl (4.7 MB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

lightweaver-0.8.2-cp310-cp310-macosx_10_9_universal2.whl (4.2 MB view details)

Uploaded CPython 3.10 macOS 10.9+ universal2 (ARM64, x86-64)

lightweaver-0.8.2-cp39-cp39-win_amd64.whl (11.9 MB view details)

Uploaded CPython 3.9 Windows x86-64

lightweaver-0.8.2-cp39-cp39-musllinux_1_1_x86_64.whl (19.9 MB view details)

Uploaded CPython 3.9 musllinux: musl 1.1+ x86-64

lightweaver-0.8.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (18.8 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

lightweaver-0.8.2-cp39-cp39-macosx_10_9_x86_64.whl (4.7 MB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

lightweaver-0.8.2-cp39-cp39-macosx_10_9_universal2.whl (4.2 MB view details)

Uploaded CPython 3.9 macOS 10.9+ universal2 (ARM64, x86-64)

lightweaver-0.8.2-cp38-cp38-win_amd64.whl (11.9 MB view details)

Uploaded CPython 3.8 Windows x86-64

lightweaver-0.8.2-cp38-cp38-musllinux_1_1_x86_64.whl (20.2 MB view details)

Uploaded CPython 3.8 musllinux: musl 1.1+ x86-64

lightweaver-0.8.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (18.9 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

lightweaver-0.8.2-cp38-cp38-macosx_10_9_x86_64.whl (4.7 MB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

lightweaver-0.8.2-cp38-cp38-macosx_10_9_universal2.whl (4.2 MB view details)

Uploaded CPython 3.8 macOS 10.9+ universal2 (ARM64, x86-64)

File details

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

File metadata

  • Download URL: lightweaver-0.8.2.tar.gz
  • Upload date:
  • Size: 3.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.14

File hashes

Hashes for lightweaver-0.8.2.tar.gz
Algorithm Hash digest
SHA256 d95374f4292e45948997ea16a3001dd7abe50580abd7c6c3a3eb924c28cc8f42
MD5 45b5ac666b9a2dd61cc8a67bbca4e88c
BLAKE2b-256 cd30a00503446da45a586063df51919a7cc547bf2cc89b4e608ed05860456a2e

See more details on using hashes here.

File details

Details for the file lightweaver-0.8.2-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for lightweaver-0.8.2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 51b34aef3309725264b4e0f3dd8bab806e28741c490b186e1421bdc911cc8e86
MD5 480c8674b3f74a1a3eb3fc65367b2777
BLAKE2b-256 7c5b9b6db814b9ec5d4e28247a07592ad754654151cd3b04475b6743ab8093ce

See more details on using hashes here.

File details

Details for the file lightweaver-0.8.2-cp310-cp310-musllinux_1_1_x86_64.whl.

File metadata

File hashes

Hashes for lightweaver-0.8.2-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 83060c2698dbad9230e668966476d4fcd2e9240aa118727e51ccbe0a5a200a44
MD5 bff54585c508cf08e9c1a5af03479d43
BLAKE2b-256 7b8f518a4c9a8dea75103b22de4628364056958fac4ec4af7b486e5ef97ec6a5

See more details on using hashes here.

File details

Details for the file lightweaver-0.8.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for lightweaver-0.8.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7d3226d6b02004142540d9889bee5c7d961e8b44fe173121cfb63fd1fd48c92f
MD5 fd01c110c1ec4876a04b941ea0f01103
BLAKE2b-256 478a4adf4ee28f38dae6ebb7408a65d1c900e3c2b741927f4f18bcc1e867fe68

See more details on using hashes here.

File details

Details for the file lightweaver-0.8.2-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for lightweaver-0.8.2-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 31f973664a4c0d811407a50f4a55119eb135446f24f648d835fcaa37cb24c413
MD5 b9fdb57949db215356b570026f20d4fc
BLAKE2b-256 4d1a44e2fabc7cb90de33ae7b6f5e48a3e13a1d521757cefeba5d348eb945a2f

See more details on using hashes here.

File details

Details for the file lightweaver-0.8.2-cp310-cp310-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for lightweaver-0.8.2-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 b528f85ce27e73e549e546a81114c346376ea18c32844434bc713a7f06d422e6
MD5 600c6193be336bd441684ee8059837c3
BLAKE2b-256 ba6a89f57ce05a61b95fd652ba9e997b05be052bcb066b1a28013e2e0050e2cf

See more details on using hashes here.

File details

Details for the file lightweaver-0.8.2-cp39-cp39-win_amd64.whl.

File metadata

File hashes

Hashes for lightweaver-0.8.2-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 141dcba8850570872167ab6848e8b3ae21e453d51daf2232f55ded00038c6a55
MD5 0cddc210543b2d4a9519b101f8869817
BLAKE2b-256 c46c81c539c68f397cdece22dabcb6837f7b670c421d1c81ea700400a5e42bd0

See more details on using hashes here.

File details

Details for the file lightweaver-0.8.2-cp39-cp39-musllinux_1_1_x86_64.whl.

File metadata

File hashes

Hashes for lightweaver-0.8.2-cp39-cp39-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 16a5ca28d06e4052e9ee4b7de686faecdafea6d1599fa0fb54c778dcd2376baf
MD5 0bdc338ff35cac6ce9b702ab4267fe8b
BLAKE2b-256 d6c6fb4a83e981bca04117c8ff15e27c801f2b7c2ecadcc5d3c6d3a26c488f34

See more details on using hashes here.

File details

Details for the file lightweaver-0.8.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for lightweaver-0.8.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1b989d8dd1cb1126b517dc654fbb044a22db10bb6b81f64251a392e8dc2e9a57
MD5 500b4259d6c988b6289c05fe54af4774
BLAKE2b-256 17b4cbad6a156eedd4d69d9ac5b531828b9ba1391147a5703d210783de51f6e0

See more details on using hashes here.

File details

Details for the file lightweaver-0.8.2-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for lightweaver-0.8.2-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 274fb165864e9ea05d965508afd790db53e4fd94f670abadcd98274f1cd2ce0f
MD5 8c95a86fbf337ff21d193860eee36efe
BLAKE2b-256 2e1cd7da6363e118456bc361652283f88178ebabac252d129a3727ee4084ac27

See more details on using hashes here.

File details

Details for the file lightweaver-0.8.2-cp39-cp39-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for lightweaver-0.8.2-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 f223df93d07c428995b647f3401dd3291d997ffe5f082d4a2cdbf512b36b6aa3
MD5 94886506d6d5f2a3f301ab10a69986b9
BLAKE2b-256 09cffbda8cd06bed85ad31af80eaacaeb8b3ff3cf0fff4b96d20333e6bee49fd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.8.2-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 be69a76d4f87db173e1e6111bc01bccc8b61fb1f693a0ab5da22d9964a2cf01b
MD5 c6cd06dd3408a8b158cb2cf958f4e292
BLAKE2b-256 32f05b590ba44f9742ee85b72434847e9fefdb67361023b7a99d26f2dcbe9e05

See more details on using hashes here.

File details

Details for the file lightweaver-0.8.2-cp38-cp38-musllinux_1_1_x86_64.whl.

File metadata

File hashes

Hashes for lightweaver-0.8.2-cp38-cp38-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 51a730dc0333fbe7f8c6fbdac7eb233d7e7049d21fdf6679e3389af7e4915d95
MD5 5b1dc5385f9ef9b82d698717771cae63
BLAKE2b-256 a087349decd837e8bb0d965c9ba5a8700ecef42dee6153b255f50ce3bac62459

See more details on using hashes here.

File details

Details for the file lightweaver-0.8.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for lightweaver-0.8.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d654e1412b0446a5fa12a730ace0968cea3d43d7a772fd0fc87e6a5def9f2106
MD5 596c22245a42a868dc849b3363df86b4
BLAKE2b-256 66f2ba9c849103ec97ea95e8f1f647e4fbbc70b9690738608b798672deacb36b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.8.2-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 b371f4437ea67d08d365bfa68608008350ea3d15e2a386b431f33f2fbd652817
MD5 71c159d0eb712b1e41a17633aa13aac9
BLAKE2b-256 f6300484e9a8a292b96b2d89c0ea6473fc6b19e0d972a19f75e878fb31285143

See more details on using hashes here.

File details

Details for the file lightweaver-0.8.2-cp38-cp38-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for lightweaver-0.8.2-cp38-cp38-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 3a845708795fbadf831c31c89bf150722f7dfe5453e23628a63052ae7464a995
MD5 96fb644a864869d926c9bf4e1f11ee7d
BLAKE2b-256 af6c230de283aca5a3c3ab0108fda72d7e98b43e603d63a21f2cfed4cbe1853c

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