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

Uploaded Source

Built Distributions

lightweaver-0.11.0-cp312-cp312-win_amd64.whl (12.1 MB view details)

Uploaded CPython 3.12 Windows x86-64

lightweaver-0.11.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.11.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.11.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.11.0-cp311-cp311-win_amd64.whl (12.1 MB view details)

Uploaded CPython 3.11 Windows x86-64

lightweaver-0.11.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.11.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.11.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.11.0-cp310-cp310-win_amd64.whl (12.1 MB view details)

Uploaded CPython 3.10 Windows x86-64

lightweaver-0.11.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.11.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.11.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.11.0-cp39-cp39-win_amd64.whl (12.1 MB view details)

Uploaded CPython 3.9 Windows x86-64

lightweaver-0.11.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.11.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.11.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.11.0-cp38-cp38-win_amd64.whl (12.1 MB view details)

Uploaded CPython 3.8 Windows x86-64

lightweaver-0.11.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.11.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.11.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.11.0.tar.gz.

File metadata

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

File hashes

Hashes for lightweaver-0.11.0.tar.gz
Algorithm Hash digest
SHA256 a3ee11bc68b32dca077bb3ffb59aea63af93ce22eb1c942565336842746318ca
MD5 f7edc2dacddcec0aa45b71a114acbc67
BLAKE2b-256 4f8fa31948c4e486299c577798f3c1d5590576344e5ba5e56984f3f6aaee0d78

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.11.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 a71f6a50ce64f4091a59f3fc45a7e39245619571310102b4ae493df39b318c46
MD5 b11c765a30047ed07016e27735854b41
BLAKE2b-256 b9d7bfe86933f2e32183ec4b0fb1798dc171e7961fce311ab488f2e97fb6169c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.11.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 cdb902589f9eba2dd8f11551641eab7dc103d8cd755587a71adce79e0c14d347
MD5 93f165892a363288e57f66c34eb22d96
BLAKE2b-256 7dc118a2e39f4325427aad5d45a1834240817a68674c32c159d32b97d18f5a3f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.11.0-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 b57b51bcf8e4f429c58dba8c254d6076d94a947ae2851a5d48eb808b2d79eb82
MD5 955ef113f72629cd193fbd9a9c6ecffa
BLAKE2b-256 ca2f1329afda2d0504f296fa459608317019772fc817f52ad988376c2ee0bd7c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.11.0-cp312-cp312-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 63e6d789ba73f1c95b160c31d7b3ecb2fa2803a7e6eb4ec3c945c6f14f439001
MD5 166daada095ec03f6bef33810a555109
BLAKE2b-256 a4538deffd0f4c6608ac5573cbcd8032e9fe82b6f41a7c688eb0927794111526

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.11.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 7c7f484277ac43c684259b022b923542b22cc0db9edcf176e769abd87a5296bf
MD5 0635c69ff9ac3a5f969e0b6ef2231169
BLAKE2b-256 3027855d648f12068d93e4ecfda6fbc494e1f43e2326318b48ac24c76eb0847f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.11.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 43eb508f55886707da27e4f789fd3f8f44f1c80e6f7797dd0bc6bf361d612c1c
MD5 a65824b4712f5b2657c5a0173f47424f
BLAKE2b-256 b97ebac232849933f4e56d8af8feca51e7480d6475aca08907e43e6f5ecf00a8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.11.0-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 a5f096af96d4d3d5d77dd812fee7f1ca497e44d629aa9699bd80377bddc8443a
MD5 920c4ec3cb85df8a7784fb401e759712
BLAKE2b-256 ab3d91613f44f344a9c24cf0a7fcb46337863fac8849d2539c9ae983dd46a14b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.11.0-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 d4baa0db935d00da25c4cc505f93cffb983122c527c09f33fb8c3c1239de7df2
MD5 40d0cc2b8f7671c1d17b0fd9ac68c388
BLAKE2b-256 a7bba29a14707af708d59dc8166353984f0d24bf96379fab5e0bc2d3c62f24fc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.11.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 0cebf9d0b92710cdd4233419870186f4c731575652a92719ea507e181d2a831b
MD5 03bd5d1b0ecc5c197411907c0412f8ce
BLAKE2b-256 75e0482c305df4ed5c527e6da041dce042e7e3955576b4dce35ec75d7b6f5ae6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.11.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1d62f42bfc5a578cf9862a51af389b7888f17ea99d0f3c8b890e7af8cbf0879c
MD5 9273dbd9e7e8b813616d450c80f17ae9
BLAKE2b-256 5a209ffa1ab656025d5ceb3b77c7b4ac5208ba04e23e56a8029e4fc611e7f3b4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.11.0-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 4a0b65f36a6f3c0ac7d47f922def96b96038d405faa1e98a9ddaf5a319dfdd9c
MD5 3324afdf0b81d85be76bee55b68c91fd
BLAKE2b-256 ac3adc2ba0cd057c3f1c3518600c519a860b7c789b2fe6dc3770470485135e12

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.11.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 62c03419127212297aef0b2df1b7d6b073e2e4e755d0be49731d73d255e90828
MD5 31380d3a4eb9e54da147bd8109be3be2
BLAKE2b-256 d549ae756ac02c6b8c8ab2fe147cdee5d47d5aa053d9bae8b961e5aaabbd11f5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.11.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 2c72d7b5996739e7e922cdde313f2f4e0bcb7625519f32544eed28dd914c2ed7
MD5 9119d2cb256c98a97636b893f7fc2196
BLAKE2b-256 ce978df3f147b4b8865321e2ae4637371163038a384f674c877c3a43baf0cc83

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.11.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5a8079868bc8e210c6e17b6368e9950308354ab583cce323d68afa7b1a6471a2
MD5 b458ab2ffe1f6d88b8ee012f98da3630
BLAKE2b-256 2312c5e2342901e7e0db969354c908e2b00a6435f760464e64292c4c1467e0c1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.11.0-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 d31cbccf1c103e14a91349e025d232b3b7b475336502d869c874881488d8ad99
MD5 3c98230be52f972e0ddf553c92e81d9a
BLAKE2b-256 b88e14b2a964ec510a9257f6332fb1c4a4c67d994f1c7159c4237f3f6ccd290a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.11.0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 99f10187673e52d10eba70b791d49fb29156e56e06c0b1a65dd906aa589483dd
MD5 5b80df2e5ec3574ac535ae7f2be32b32
BLAKE2b-256 dd910eb4f3fd1090bf0f946c10cdb3e0e21b3414e653b15be84c72ee21348a1f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.11.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 53fa0206e2a4937b9b64567f703b6ed73ab1eb2031546a61d50971d025f0bc72
MD5 1e56479bdb57bf44bed8a3e7a9af7a34
BLAKE2b-256 777f7341c2437f50d9049fc674ef6addcf4463589d42793f55933d0adf4512e4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.11.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0ceaf98cbdcf1fb6137da6778b88e40d023e77ed6e875eb60fe331efd7eb4e04
MD5 54b5077beed27fb2ad1a0184896530e9
BLAKE2b-256 715c4ca78ab800885d1e655fd299f6899fa1248671d303f45cc1642395160654

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.11.0-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 fc1d096f645d25adc570c64071648d45c94cbd0e8746b205f5a880eca88d17f2
MD5 98e15844f7c69200e52f0b964185d9f2
BLAKE2b-256 11b7566bc035be687ff36bd862cf09081c5d928f7e74973e0d797d2f1ab253bf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.11.0-cp38-cp38-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 f12fac65b9e434d0157412916237b3b152d062660eb7591508573a689e74a8f3
MD5 a6ce1d8a32564350e90763e8fa12ae7d
BLAKE2b-256 4d10073360818933d67a3d8a12e373d22f2f12a8671bd1169299bc6f0f246415

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