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.11.3.tar.gz (3.4 MB view details)

Uploaded Source

Built Distributions

lightweaver-0.11.3-cp312-cp312-win_amd64.whl (12.3 MB view details)

Uploaded CPython 3.12 Windows x86-64

lightweaver-0.11.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (18.9 MB view details)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

lightweaver-0.11.3-cp312-cp312-macosx_10_9_x86_64.whl (4.8 MB view details)

Uploaded CPython 3.12 macOS 10.9+ x86-64

lightweaver-0.11.3-cp312-cp312-macosx_10_9_universal2.whl (4.2 MB view details)

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

lightweaver-0.11.3-cp311-cp311-win_amd64.whl (12.3 MB view details)

Uploaded CPython 3.11 Windows x86-64

lightweaver-0.11.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (19.0 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

lightweaver-0.11.3-cp311-cp311-macosx_10_9_x86_64.whl (4.8 MB view details)

Uploaded CPython 3.11 macOS 10.9+ x86-64

lightweaver-0.11.3-cp311-cp311-macosx_10_9_universal2.whl (4.3 MB view details)

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

lightweaver-0.11.3-cp310-cp310-win_amd64.whl (12.2 MB view details)

Uploaded CPython 3.10 Windows x86-64

lightweaver-0.11.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (18.9 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

lightweaver-0.11.3-cp310-cp310-macosx_10_9_x86_64.whl (4.8 MB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

lightweaver-0.11.3-cp310-cp310-macosx_10_9_universal2.whl (4.3 MB view details)

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

lightweaver-0.11.3-cp39-cp39-win_amd64.whl (12.2 MB view details)

Uploaded CPython 3.9 Windows x86-64

lightweaver-0.11.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (18.9 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

lightweaver-0.11.3-cp39-cp39-macosx_10_9_x86_64.whl (4.8 MB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

lightweaver-0.11.3-cp39-cp39-macosx_10_9_universal2.whl (4.3 MB view details)

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

lightweaver-0.11.3-cp38-cp38-win_amd64.whl (12.2 MB view details)

Uploaded CPython 3.8 Windows x86-64

lightweaver-0.11.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (19.0 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

lightweaver-0.11.3-cp38-cp38-macosx_10_9_x86_64.whl (4.8 MB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

lightweaver-0.11.3-cp38-cp38-macosx_10_9_universal2.whl (4.3 MB view details)

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

File details

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

File metadata

  • Download URL: lightweaver-0.11.3.tar.gz
  • Upload date:
  • Size: 3.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.8.19

File hashes

Hashes for lightweaver-0.11.3.tar.gz
Algorithm Hash digest
SHA256 44f0e79c45c19c48cd3b237f11e9ddf6e522cfee439859ec0bd5a53975a148f2
MD5 9c63f1a4f0b29d476a22abcfd7527d4f
BLAKE2b-256 4e96e534812bc6a0419a7838ebd294c4ff4ca96714b56ca1dea70aaa42fae03a

See more details on using hashes here.

File details

Details for the file lightweaver-0.11.3-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for lightweaver-0.11.3-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 5d73768d8f433b2039749a79b624789504cdbd4d441823252bf430df3dda7328
MD5 cfa962f6458de1feac0471acf4e8b2e5
BLAKE2b-256 c4ccebbb6a50d0160cc16d089d02893af31aa48cbed7f64342ea40ffb7337422

See more details on using hashes here.

File details

Details for the file lightweaver-0.11.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for lightweaver-0.11.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ed15a48bee20e73714f942ffe983ab60216a14b87e8bed74759416b6c179cace
MD5 0f07b15f593fb443232f0aa516bbb214
BLAKE2b-256 8103d0454ebe54430416526803ce90b36abd81785e5d29d32a53b2bac64dde20

See more details on using hashes here.

File details

Details for the file lightweaver-0.11.3-cp312-cp312-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for lightweaver-0.11.3-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 604de4bfbcc48fbe14afc94e885344884149cdf4853f91784ff5fa21cd5e2b92
MD5 764782cf79721510568ed5222c9e44bd
BLAKE2b-256 a595844aaabfe5480dc6dade5a227cc7241de171114b7e56d6ac90a49b3024f6

See more details on using hashes here.

File details

Details for the file lightweaver-0.11.3-cp312-cp312-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for lightweaver-0.11.3-cp312-cp312-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 01e0210ab5a747e4caa6fcda2584d13497ebced2aa2da8d6de7c797ef4db397a
MD5 b28d06da76d90be46d24eb830d2a6b15
BLAKE2b-256 34d432d763fa6dbb9edf0ebd24f427f27bfeafe0fa453d05907988372eb7b433

See more details on using hashes here.

File details

Details for the file lightweaver-0.11.3-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for lightweaver-0.11.3-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 1c6a7932b2a194d937fa2dc9b0687820e40ba98b6508b5cfa9c370407ef32eb9
MD5 77fb903b3467505bb6f9b63032c4b774
BLAKE2b-256 e7ba12777752cd32defce43926d8d4d4b788f309ea8070f725935415d484f7c3

See more details on using hashes here.

File details

Details for the file lightweaver-0.11.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for lightweaver-0.11.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ffaf82f8ecdab3a2944f3edc15972d03e1db278f37386eb3389d9fcfe0aae166
MD5 bbe6a9f622b200950d150e15b304cbe5
BLAKE2b-256 3aa4482e0f7e40613fed122b4ab7b6b0f38de7a745d32d8be52ca40c93ad084c

See more details on using hashes here.

File details

Details for the file lightweaver-0.11.3-cp311-cp311-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for lightweaver-0.11.3-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 c37b4bc7f4ff95f253e61eb6d12f9692fb6a16c5eb8664a6fd95125adec5ff34
MD5 97da7e5dbf8a80c1c0a7418097fba082
BLAKE2b-256 4b04235996cf28032915f68d12cb7fd86ddd0295e1790fffaf8d2bde09c80b52

See more details on using hashes here.

File details

Details for the file lightweaver-0.11.3-cp311-cp311-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for lightweaver-0.11.3-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 edc9b7d797fe3ab952939af9c3fee35878b630af03e086dbe5b1d540a14834bd
MD5 5b313c904f44698a919a92ca0c39ce1b
BLAKE2b-256 e1ad4d1493c8289c3734e0310906252b96e1ac9e0b9f3df708294536cf3aadb2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.11.3-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 cd8329025eb0a2cbcdfc3e446d898fe5fefeffaeaddecf12df74327c8aa6b0d7
MD5 c314cfb3034f2ed611f58981afeac747
BLAKE2b-256 56adbf8416450043184bc3e16ce113c0251c8113d31f86efc8cbe2888caae4bb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.11.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 cd54999dbbe638c3a1d5604401fa3e05f7c2f730bce005f294c88dd0ed276b53
MD5 f94b69cba301ba872399c81cbaab0965
BLAKE2b-256 262727b1ca1971cf730b32a4a6c0e9e8022d1060b48ee8149d00e476e7ae316b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.11.3-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 e8e6085465b699827f09285d27d774780b53fa75767b044324af560f77839019
MD5 ee490603f9f8d90863945e9703aa9189
BLAKE2b-256 fe256342be4d41c3994ad8dd1112ae5837d3abf9db7b90f449567752896753ce

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.11.3-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 0315cee3447beac63cfd49d75499218455bef82b741e6058630b36972ed85dbc
MD5 1027285e6cc0199bf7bc6ce9a8b61809
BLAKE2b-256 dab0e08670d3c1524e387f6850ddc24815004360dd083ddb42eb49d4c1650446

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.11.3-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 a3218351a95dff54c7e5c1bb71313612fd4db6e27cb679dd37068a566350b2ed
MD5 c89df914b8748f1bb4ea8adaa232ed6b
BLAKE2b-256 7e08be63fa9d0ead35287b02e68a35a5ef0a6197169307d363cb9f4ab186b2b5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.11.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a57ed32927d3d3db8dedc6570da49140b83ec07651cdf8bd6a2a944511f7a389
MD5 8b2a687b4311557ed062bd4dffb75f28
BLAKE2b-256 2c651c30087050544d9f66019cd3e4e4ac4c9072b59ce7dde03dd5b8551d5b4b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.11.3-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 9fdfb66b557c11dfee154a6a418ecc8b724836c8d56510e75da4c77462f1964c
MD5 602508840d91a937b68bb413b16950d2
BLAKE2b-256 f9243281cf857b56b6116e87a3a197dc64633ca682d8464f978f46edef46269a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.11.3-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 d309a27ca3a390c6db47d771a2e77d72305ff61203181d97500e7d8144168203
MD5 017773c30c2ba2c51cc3dacf97ef4ff6
BLAKE2b-256 091121aa2e34e97af83053291fd7a95ee86b12682cae71d0356c772269281459

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.11.3-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 d5eae33190b412ead4dbd5245e2501b5a665a5e4dd2adae681c7d77da99e7f5e
MD5 6e4fc9d06dfe1fc7c65c1feda39e9980
BLAKE2b-256 1617f418f3ae616d1bbe04d03f35e4adc7f02ec5d199a7f73b6a0d2b627b36cb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.11.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f892e252d48b11bba6ded350c3eb5f5f5c5ade81f0d493f38f9ab820730b5058
MD5 665ac619e9c82c37fac0f95be7f72b03
BLAKE2b-256 b2368f4c8766b9c84d8450cdc50d4100f47c0261de5f2dd26863354a1f56cb69

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.11.3-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 e633674e656015154edfdff850605749879893c72f1c3de823b6a66a9b48de90
MD5 dec95715d76c763c679f04cbe72ab401
BLAKE2b-256 f575fb4e88c8741383030e59fefa8cd71ddb0f4d96537432f68428dbe6b27d61

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.11.3-cp38-cp38-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 3697ee70f6221fcc10f97d74ee3b358a56fc86ee6e060f066feec6fb39cbffd9
MD5 a99a7b7b2e95e34bda674e0b4f28366b
BLAKE2b-256 2092a9434816586469aa6950f24806044aaa44433e727d0de83297955e49c640

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