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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.12 Windows x86-64

lightweaver-0.11.2-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.2-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.2-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.2-cp311-cp311-win_amd64.whl (12.3 MB view details)

Uploaded CPython 3.11 Windows x86-64

lightweaver-0.11.2-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.2-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.2-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.2-cp310-cp310-win_amd64.whl (12.2 MB view details)

Uploaded CPython 3.10 Windows x86-64

lightweaver-0.11.2-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.2-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.2-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.2-cp39-cp39-win_amd64.whl (12.2 MB view details)

Uploaded CPython 3.9 Windows x86-64

lightweaver-0.11.2-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.2-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.2-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.2-cp38-cp38-win_amd64.whl (12.2 MB view details)

Uploaded CPython 3.8 Windows x86-64

lightweaver-0.11.2-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.2-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.2-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.2.tar.gz.

File metadata

  • Download URL: lightweaver-0.11.2.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.2.tar.gz
Algorithm Hash digest
SHA256 c536a84bc434b76ba247597c536f2e3ab240a1dd84b5a0978ce046639fa56685
MD5 1c33c2519cb60f6835baead47bc5e9c8
BLAKE2b-256 f67268fdd31d8734683255888f4f79cc49199bf74635350f2a6f482782291792

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.11.2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 da648a6d0a24b7632775ec5d7791d65da19c32ebc51852509a9e53ce760b6a79
MD5 271f16aa9630f9c72c0c90bf581b49a2
BLAKE2b-256 c7309f990646a2377d31438a41467b275e6735d690d07ece9ad67ceb484bd3d3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.11.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8a2efa6f77acfb3440b909ba22e162d305dbca88508453a077b4c6ed89bcc2d1
MD5 d71e9302a5288e8d66aec2cc5ac48d6a
BLAKE2b-256 26e3e1c68b2b90aba106dfdec8a55b310c3ecf92f4467d74ab6c619c9b092bf7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.11.2-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 3ba1ac43fb1ed1d29617d1b075c67ddbfc3a838ff0ab51a75c6b2c7520aae834
MD5 9ad3d5f1d576f18a73ded6bb2aa199f4
BLAKE2b-256 9b43a57984cb9a85ec94eabeb77dcd6faf59d42152c26d011e252d95147f9a5f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.11.2-cp312-cp312-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 8e1b77eeffb19a64820c7efc2459236628dd0195bf4dd392829d5be6ef27757b
MD5 e1caa68225abb53d71d93a1ba06dc80a
BLAKE2b-256 817479bd1679f9c3b51ad459445fa0fcfc294b46d1f39f595e3cea9851acc165

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.11.2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 fa351859e689ebbdcde5c3b5f0fc8e45b8b5b5a9ba998db44a3d80b197293fe4
MD5 2f17d7c5d2035b070dad38b757c6fb23
BLAKE2b-256 36f93fda1817407d4facc78f0f63d65c31340eca10efd606194a12f1dee80008

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.11.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1b6cccab420cbd20fdaad9f8b6ff77fcb09c03f58ddcb96757ac6e3fabdb1450
MD5 fde8c32667ddbc285cce8f71c9bf7417
BLAKE2b-256 9ec5d5ac7fac5735f59ac49bc668c9f2498ba70df61db98c60ac63675c488154

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.11.2-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 509b40d98756ec87f459db1cf72d11cd527c28a9afe0c3fc9814def1e4da0a65
MD5 ac6ec001feb677d1ee608c205e8ae018
BLAKE2b-256 02ad8f9ab2ff4b4bc1039a62dd4ebf68b9ccb9ee7b3d44cb745ae5b58cf63f8d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.11.2-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 dc8359d2e8f24ab08269ed280c01c595e8018a5c36ced35064aee08547c1ee72
MD5 47fb253e9f799e471242d93cc94077c3
BLAKE2b-256 0fb8e11e166bbe51fb79465293035d44008a3eae9f27afd25db71e827fe7b2c7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.11.2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 3b3c76e170dd1d1c0776df7d8c777ef135914fd91647934c977b643a9b127a41
MD5 ec761d5a9f4c5a122dc9813f22a86e45
BLAKE2b-256 9eee8b0ff519395ebd2292b4891e02bed7d0be77a9540f9b11dc7f065341a2e3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.11.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 294718e8d94fbfa91d6a495bbf3745aa8b2687bba098f98a040f2f001e630615
MD5 10c0ae1fbff0b1609af6fd0705ff6e03
BLAKE2b-256 aa0178dcc1fb6cdce5222c867752df4159bbf8e7ff1c15564b44e7a415807886

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.11.2-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 06b74d1968d5dbeb15a3fbcdf15fd69e79c3e41160745f736425d6555fb7b951
MD5 54856a27932661c59522a63fc578ae19
BLAKE2b-256 514b2bc0d9498b54c7f09766753e0eb08d60c4a727fa970541bd0aaef915b40d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.11.2-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 b0f67293673f355994022f109bd68c7d7b405230ceb93c51d7e9e75ddab1157f
MD5 31233f2dfff7a5e7785fc14a858a3b57
BLAKE2b-256 591076f930e7194bf9ce0be9203c326b7fa01d02a9a54f5c40935d75c95942af

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.11.2-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 6d094cb3cd6839ae8442e4fe17d560541a0f4e95139822f6712d913cccbc83c6
MD5 bf452ed24a186bd9f1a0e09a961a0c85
BLAKE2b-256 ee828d6d58b43708fe32bf1f7a2134c6c7a2b36c2fd4c3d61e910959ae9e6601

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.11.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 32b1c967fc8e56c377f34de86ba73a87b1d67e10743b3b50253e1bff9d2818ae
MD5 d89b9593c286ee13d824e5320c4fc0f3
BLAKE2b-256 7a20bad137d671b8b0f68de279f0a686ce3239a0eeda32c25ad0ccfe1f6f3e3f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.11.2-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 ea934352b12e7ace292137d5f86c9476314f608c45c0f2a11ae73b5deba9e99b
MD5 cd70328d8b6fc77997bdb61d9141d0e9
BLAKE2b-256 f0831d964f6169998e7a4f0535acca2b7c59f667ceee98a3e4ebc97c5a52a1f6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.11.2-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 ebc9deaa82d5ae6691ab6a0980e86851d71b2432869f126ac4506c79d2e9aef2
MD5 c19fc1ac9631e9ba8e83a44b67a901e5
BLAKE2b-256 54a76bc08ff6aceaecf5ec250a4e986df43c14b90de2a5fc7732c161b1db9ed7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.11.2-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 4bfcd8897fae4b0f0537e182df133a7f8d72217635da2b36f062ed6ea78c4179
MD5 41fbe5f9e2a4b9b69496c83dcb09a190
BLAKE2b-256 731622f20694b579d921eca2d043f3ebaaf24b9ee6fe9cb435c7da54695aedbc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.11.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2d2db25ab10fd6fabfd2c9bb5159c7dec6c3bf3b8fbe197cf8fe5372e83d7486
MD5 e276a49173127f5d76a649bd167ce889
BLAKE2b-256 04949c5d8efba864204a9fcd2a43c0b17ea145ba976a475aa63fff7b97e549a8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.11.2-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 d5da7fb2d04980aa8f20c1fa4dcaed322917c8159db1d84699d30cb48255d42e
MD5 e3df86b4465346a033f0f5948378fd06
BLAKE2b-256 e5bc1d251c8cf38d356a66be7a0e5cbb347cc8fec8607616bf273918f5e12f64

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.11.2-cp38-cp38-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 29c4152ee1903797e3fb19fab947050c15a4d5d5fa595e64429670d42ddf3eb5
MD5 d3b08cbc5599b359056ddbe2373db58b
BLAKE2b-256 b932d140925678b559b051cbbdf1739087f5b04d4472592ce1b2cdee4b7c9ba4

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