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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.12 Windows x86-64

lightweaver-0.10.0-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.10.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.10.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.10.0-cp311-cp311-win_amd64.whl (10.1 MB view details)

Uploaded CPython 3.11 Windows x86-64

lightweaver-0.10.0-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.10.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.10.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.10.0-cp310-cp310-win_amd64.whl (10.1 MB view details)

Uploaded CPython 3.10 Windows x86-64

lightweaver-0.10.0-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.10.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.10.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.10.0-cp39-cp39-win_amd64.whl (10.1 MB view details)

Uploaded CPython 3.9 Windows x86-64

lightweaver-0.10.0-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.10.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.10.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.10.0-cp38-cp38-win_amd64.whl (10.1 MB view details)

Uploaded CPython 3.8 Windows x86-64

lightweaver-0.10.0-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.10.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.10.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.10.0.tar.gz.

File metadata

  • Download URL: lightweaver-0.10.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.10.0.tar.gz
Algorithm Hash digest
SHA256 896e919b96202f37baeeb942b32ba322348eb849c846acf88f7fbd8270aa7007
MD5 946ea054603f907479d6f10157b3fad2
BLAKE2b-256 910a2cdccc9ec7dd9859d3440a7042c4e772bcdff77677c60dc2ded07292cb0b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.10.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 b45515f2c90f497d0596f7bbaf0c480c43ed8e65ec72d5e81da49b45daac9528
MD5 eb98ef7ce57809d3cc2a8f128526d5d8
BLAKE2b-256 71889f46610a633c69d4b5bc2de37d9cd37146b97b5b1eea7b703d2b7a3429a5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.10.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 fad56ded3ffa687a88072853fe27d93755a13e8c27a5d4d4af8aebe9f67d1322
MD5 1b23955dc38e2b8542f97dbdb1a91a8a
BLAKE2b-256 a6051fc524b1f7a0614de442fcba108fc37c73b495a4cebd57013f8d1984638a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.10.0-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 08fbf3554c324a7a66e4fc1e7f7402e22a040fc9f08eef7c87c96ebb1e0da0c4
MD5 786ac7fa7bd6c1e4879eb1f91e695b8a
BLAKE2b-256 e7d4f0c4f1ea71dc1ba5201c1b3a523aa1ac3ceea985b072247450f241dd9de0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.10.0-cp312-cp312-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 2dcf243d9128d81e39ea3670c1866279136a761ae19e3880b91603488abc099d
MD5 d3d7eeb77ca973234ed51f06e770df3e
BLAKE2b-256 5a4f1069b0f909e4ac7b06172704855d288d2539f59ca85e05021bb456117598

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.10.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 9dc5c5683f401040d9b58bee1cc8117c3680aa99dcb57524dacd8f2c5f7f7997
MD5 cfc3372a01d9e68088776ce55558e3ef
BLAKE2b-256 9da07040d44bc0ef815b9b78f08b10510a39d49d0efc3afd6e0df1708efaec98

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.10.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 cff9d5483bd88477d847b450f134b70946269b108420c8ac7362c312481d62b1
MD5 4fd77d97e7c80135823c379d9cc9752d
BLAKE2b-256 192af2482b7888869484c037f0fbdeae40912d5880dda839e13442ab1893156b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.10.0-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 0e80b6bb8b8a61fba4e322418780e9d38702360fb72b511e2a69949c1def0a56
MD5 dbc0fdf31191920ed839a65bfe4ee4c8
BLAKE2b-256 3b6f87b7e6b131686306e55cc8a11ba3ecb5e2346bab117ac46925159ec6a494

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.10.0-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 9041828479b385347685268a36934efe274801bd889a273744e748ac47bef430
MD5 1672c50c40f8b0b210eeb0bf4341c499
BLAKE2b-256 3fd2621b8f6574029a18c00ae2757d765510ab913a60c4cbd0752eb3b7b1d0f0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.10.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 ba974273087bfcbe438230e6317ffb256370108d09cb1a92133b4e9f8b4e860d
MD5 378104b4ef80be2a99127bd794596c1a
BLAKE2b-256 a1adfb4ed9dc4bf8851159c9a31cbc1a86184813e8ebbb6b65b5da54e24fc24e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.10.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f2cdfdd58b3614d1bf3aa688efe901f3ed9173f48b805fa9b5241d0a6e86eed5
MD5 76fad4967ddf50948d21045b04b83f8c
BLAKE2b-256 abda9eeecd4735b20e25f158e8270bede077d33ecd10e0aacffe7a505ddb9aa9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.10.0-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 12855f05c01969b447d9dbfba8c65ba01a6b7873ffcd87f1e56284bc552d1782
MD5 a97789a0d0c982a6badd61a9e4f79a44
BLAKE2b-256 c740186e0c33459f5edda4b93c61974de34d5a382fb56eb7d47169cce72aea98

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.10.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 6fae74efff9bed40384f0c360c0acda2a06f68b4e34536b230951007049018a9
MD5 aa713b8a7cf4ec997840974573360f9e
BLAKE2b-256 9125496be763a46bf6271286ebcd9d2aab13b5c6716310629892c6db52378497

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.10.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 02218d842226409710af2435e7c18a094140541b58aa37154f0b063be868ebf4
MD5 0f23d9eae029b7735e128a5985a18799
BLAKE2b-256 3c947494827355d53d72cc9aba4d4fe30b17a47a902a86a55ffb3e8a6913abd4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.10.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 bd8872557e2628bb283a5d4581f68aa81616e375dc83ec130177be19dc0edb79
MD5 16d4b6d4282e3e304c6225a3bf3be52b
BLAKE2b-256 49497eefb9bc5a0601adc8ad79d9de4755d44804ab615698e2e3769b71b4905e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.10.0-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 a50ed33b2a0a32d26383c807706d84d13cf4a98c7c95426bc804c56e0f246056
MD5 590c1669491e739ce70ab64af5ac3c7c
BLAKE2b-256 1853b1e37f1bad433f2494f6c3ffa8baea3d32cb8c103a08af8c0384bf1474e3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.10.0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 e086ba15b1d3975dd28f8d88fd61096a78e1090814126378f42f68d143605ea5
MD5 abd65c94658cb8a015c3288e3ca008c9
BLAKE2b-256 48a98bff0b44e9715fc088999cbb8e2fb618ee361454fe0c1a398e3d5b15f004

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.10.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 bf855c9cfc77dbb8f6922c4efae844fec458ab53dbea3b00e7354386638d1b35
MD5 f0955f769038784c38a1bd3913b13e54
BLAKE2b-256 ddb35ace01e195a98014decfeabb7b9f36b0ad3b07d37192a0fb743decb74f2c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.10.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4e38649175f844c85ca1593602c23c043771bcafa20aa569aab635510f8ed788
MD5 3a6f31fcfd1a1d1ea0fba757dec0ea05
BLAKE2b-256 28c70a5eca86278d2e9d881cc2e9301b99cecce6f7e41a3cc62e731ae1eced87

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.10.0-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 7f5b9a85b2a35f42d6e207302d14f24e66a80edeec397a487e977275fc5c210b
MD5 7a8390a5c7f149a454ecc64e89216e83
BLAKE2b-256 baf55bae2bb41db6cf919cf7d7583b6ab0ffb018772b7c4ea426eca1b190a5fa

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.10.0-cp38-cp38-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 d7ded34c11e06df9a02eea8107b2b3e0e485357e0bcb3a0c7a0bb34ad89356bd
MD5 c2425c1b1a0fab5f7295365c44a304df
BLAKE2b-256 83804403952ef61cd1543fa85151896ea78e087885aed9caa0bfabffc830b53f

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