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

Uploaded Source

Built Distributions

lightweaver-0.9.0-cp312-cp312-win_amd64.whl (10.1 MB view details)

Uploaded CPython 3.12 Windows x86-64

lightweaver-0.9.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (19.1 MB view details)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

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

Uploaded CPython 3.12 macOS 10.9+ x86-64

lightweaver-0.9.0-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.9.0-cp311-cp311-win_amd64.whl (10.1 MB view details)

Uploaded CPython 3.11 Windows x86-64

lightweaver-0.9.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (19.2 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

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

Uploaded CPython 3.11 macOS 10.9+ x86-64

lightweaver-0.9.0-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.9.0-cp310-cp310-win_amd64.whl (10.0 MB view details)

Uploaded CPython 3.10 Windows x86-64

lightweaver-0.9.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (19.1 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

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

Uploaded CPython 3.10 macOS 10.9+ x86-64

lightweaver-0.9.0-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.9.0-cp39-cp39-win_amd64.whl (10.0 MB view details)

Uploaded CPython 3.9 Windows x86-64

lightweaver-0.9.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (19.1 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

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

Uploaded CPython 3.9 macOS 10.9+ x86-64

lightweaver-0.9.0-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.9.0-cp38-cp38-win_amd64.whl (10.0 MB view details)

Uploaded CPython 3.8 Windows x86-64

lightweaver-0.9.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (19.2 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

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

Uploaded CPython 3.8 macOS 10.9+ x86-64

lightweaver-0.9.0-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.9.0.tar.gz.

File metadata

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

File hashes

Hashes for lightweaver-0.9.0.tar.gz
Algorithm Hash digest
SHA256 25d877cdf0496f2c54cc61117170bc3438d04219ac3bf349f3c2314d53ade715
MD5 5ada8b4ed28188c0ce03700659f2cf8b
BLAKE2b-256 79f806c29c6b38865633cf2a9a14fbfee64ddf4e4700b5e1534b44faa91a01e7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.9.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 67f79ae66db3b089cb02216aa4be45441e4e87c4f0027bd0bd605adad4e51c35
MD5 6ebf691cc02d6557d4ea27b59c930f64
BLAKE2b-256 4320af2c17c6256ff0b84c03ac6969f530f1acdd7bfc89efc0e761868d3d3a58

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.9.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5c9837d97b5d3a81eaf0f99887350c9a46871cdabedf46a0b91c0ece1a06818d
MD5 d57a5c4bf4ce94be021d13f7cdba1a91
BLAKE2b-256 9498a69b087625bd2e2013fba0bf85acd77ce8823122aab12c0f0b8a4aaef76a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.9.0-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 d0044d6832e3e49b61b0ef155e1a961ca1e1ef50fe8f2ad5ae9b921f634d2155
MD5 c681633d60a76b99d176262f07320352
BLAKE2b-256 cb9df40f6aef542bbb4194f65cfa04acc813a3e3a7e513b65481090186ffb35c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.9.0-cp312-cp312-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 f1837acb10a58d540c64565d0cc32a5cb655e8520212e39cb09ba159230d71f2
MD5 7d37b6047634e9e04418bc960b0c3f35
BLAKE2b-256 0bdfca63b9c225365b29fe073225db64f0a192d533e1d08b0138aa4c2891905e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.9.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 8c9c125b8b081c0c84c38d9ef2917ef69e3acc855e44b8c5032595e9a1b802ef
MD5 f84d260c2bb59b52d30da9a6b19486f4
BLAKE2b-256 c61e4a7a8fcb3d531c8c2b3eab4db6469381af4a97331fadfc353b880d6d60d9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.9.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d0914df4b73ce96b3a492b311f1a78fff0ed249179417a68ec15abe54308d31b
MD5 07d224f9154ac29d2eab7efaf3e49603
BLAKE2b-256 cd89eae81d3d8ed6f6facf16a5c2402b6bddfec36de96d0bdedeaf6c9cad8426

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.9.0-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 b37f0a45a2d42323c0ac586a35156d918e7531e91116b904aaf0821d76c2dce1
MD5 b4a27bac277488801241421dd3a6ea9b
BLAKE2b-256 e54c7007b01140c835fbea0b3f7672d7ba784a2e444a22798dce0f6593ed1399

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.9.0-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 d8781b58b59b58a4c6d349d42dc8c0a162352ec042e0b5c3d63c242ddfb77c1e
MD5 373e88fe9ffb06970a2e0178821cfc99
BLAKE2b-256 2086fad164f8de535d7c331601ea305e60de01708f8ced129ed64c6de14123f2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.9.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 d31995f29f7d02152e05da684defe95d120163be28cb26be16ca67dda9a5db43
MD5 591dee0ca973b108976d9409ba96b2d9
BLAKE2b-256 2021c477a5094a4e96383813e11cf0f3e099d0e83ed1f5b24a0ff842f79baf3d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.9.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 be17d5d07217217fa72c6a3b425cd92c877b66214ae476c6d7c3af9074d2d2bc
MD5 f944948041763f44c73e69507898e9c0
BLAKE2b-256 b65cbdea5bf28f1a5d8c192000f385ce495c5fc633013b3052f0fa87c33e333b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.9.0-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 f63a7ce715fb212718f296bd157baa1906bb97faa768f2773af2bc9cbf13df3b
MD5 4d60ea774ee5f7711bc1fee3d85a513f
BLAKE2b-256 f2062212aa207d2e2323b6d7414bbff79d1a3ea27e896aac084b2157fc21fc30

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.9.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 28d8b4acecd991b48f11b4fc685e2e2fa893f80e5f5770e91a1544a126295b6d
MD5 664cfc14c303bf4ae741e88e33de266a
BLAKE2b-256 b0b979a5f82c7207367d62111aab0f0f0dca2626a33c3e51eb5cbd86a278bca2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.9.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 9d25569fcc60bac711685ca0e1650de32e7dae03b54f3fb137802db77f6bb11e
MD5 69ce67582fc3c03bbe6de15378489c40
BLAKE2b-256 8bd9f5f25a58953c95bfa3f8e9a2b815cbca63879c228f1ef0ab125d734f30ff

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.9.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 02a674b937e1f26b36303fb3cc9a04547de28c9301897e080835e2f278638ee5
MD5 683e2cefc37dc77a9874f9a029191707
BLAKE2b-256 c75195c8d548685cc5da053454a6e07eb6ed8c548a2014632e861e079c7f77c8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.9.0-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 c763e94782d1d4ea3105c5554eac0865ae2075727d78bb6408921313559b57ad
MD5 9ce9387c3d7b77260588910705a9929e
BLAKE2b-256 e67ff7f07f6d123c79c1b5c24ad48628531c35e333c41bb6f1ab192dfdfeb466

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.9.0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 4fda2b1bde6c23f703c61e4cfe8cdb7ac01c110bb88075fa91c89c5005c9f510
MD5 5d291d943e616a0793d02148986a0d9c
BLAKE2b-256 46b0eb1ba98c67f45fdf2d285da4f5bf82ce9fa1813793edb3b7b4a0f57442e2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.9.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 537eec41002dcc41db970877c053fec737fb62c3dc597f7df61dfb0cee2fe681
MD5 f8658224c6d14775a17e3f71bf0ead4a
BLAKE2b-256 ebf84b407fb0dadf385ddf236fc984b1043808dcbff21c11f8377ac211ea7a3c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.9.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 97622cfd18407b0c89fef1d7fa25e3975178b0c2e51d3eb70a29dab2a2b21b3e
MD5 397fef4efb8de70799df014e2e5ddba2
BLAKE2b-256 eefa3e6431ef55bb054c1230136a5d69d320ba14d2d07e0b6c3dd57cfca869d3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.9.0-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 2f82522e4b6c0691099d7242ce93b8e117700521fc2b95eee4824dc4c4c44848
MD5 cd59c746ed57e2f24c4c64d0abe5a2c3
BLAKE2b-256 89969a838c9ad8552a3020dbf22f4e0aafb47af953200f67dab5be9927910cd1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.9.0-cp38-cp38-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 569277c9e9efb0e768ebdd4e367d153bfc9bb5919cf7757c1414fd4fb736a96f
MD5 a0674c10b7d4fa558841dce9fe13505e
BLAKE2b-256 12a49c2588fda2cd0fa2b1dce94c6774b730fd08c6074e47a0aa9929adc9f2c4

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