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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.12 Windows x86-64

lightweaver-0.10.1-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.1-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.1-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.1-cp311-cp311-win_amd64.whl (12.1 MB view details)

Uploaded CPython 3.11 Windows x86-64

lightweaver-0.10.1-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.1-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.1-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.1-cp310-cp310-win_amd64.whl (12.1 MB view details)

Uploaded CPython 3.10 Windows x86-64

lightweaver-0.10.1-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.1-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.1-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.1-cp39-cp39-win_amd64.whl (12.1 MB view details)

Uploaded CPython 3.9 Windows x86-64

lightweaver-0.10.1-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.1-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.1-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.1-cp38-cp38-win_amd64.whl (12.1 MB view details)

Uploaded CPython 3.8 Windows x86-64

lightweaver-0.10.1-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.1-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.1-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.1.tar.gz.

File metadata

  • Download URL: lightweaver-0.10.1.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.1.tar.gz
Algorithm Hash digest
SHA256 efaf00f8e9bb45c104b8e68cf145c25524968507ec30c1f81db30865b422390b
MD5 e0244ba96d8850880e0ab04739c3fc65
BLAKE2b-256 44ef46fc44cf4687a6b54a051b159fd7a3f9d8e77c5a7c1e1c4e0fb006799e6e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.10.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 cb407f5c12c8b552c491dc0dc3ce03f6874d596b820cb228508dbd9cbe3c40bd
MD5 68426ee0610f6cf8d8aff5d066844af3
BLAKE2b-256 930d5b86b9b986001db4e22a526705a1747b00798f2d0f9438586ffe44418292

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.10.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d30a2be1e432f69a1a860149b18d12984594f844be9741a6868ab4c4c01b8d9d
MD5 0e6eedfe4f51542855820edfee8fe8ef
BLAKE2b-256 9d44ddf6ead67f56c7528b6c42eee5156110dc62f39edbafa9d075c4c9d1c95e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.10.1-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 c90825decdca30ac11540f920164f714484dd60978e7ec9cb6f05b2e0c5d87d2
MD5 60297aeb03aa92c0c6eb5d632ff113b0
BLAKE2b-256 21a5de1f83fd3ce8b5b4f299550be4d0e0168f9b24bb5f125e9347557f02decd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.10.1-cp312-cp312-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 1e770598762609579f69d0925fe364b519e35d965346f043b556d1e4c1f33ff6
MD5 b593e9dbbdc09a11e9d30ba4dd41d0b5
BLAKE2b-256 94531e9e9a2ec5342f19808e8bd155dfdf236cf49a7424deae1d068dfe9a7da6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.10.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 43090da4d27710cb1ede5b7c2804009b654764bfe05bb513c3d22120a9655ac1
MD5 72a28a18e4d593c7a18925fd8a89b906
BLAKE2b-256 07209ae6103381111e651752507526193034d6ca8debac09153245bb734a0bbf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.10.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2233caedbda599a9c3c23d7b305b5bce43fea1b4ca61c3aa928798f19a5309f6
MD5 919f2c8909aab4762b157102e7a42188
BLAKE2b-256 be2822b5d3bf955a455f36a5dba76dabb18cb19b6ad36048b9cfceacf9561a0b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.10.1-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 4f50c011284f335b9491fe328080931414907f76f193aa9861ff2756186dc57a
MD5 3265656bf6b3c0dc2209b634daecd144
BLAKE2b-256 d7ffb0890575284a40562981c2ab341b0df701cfafeb9b54b9ee12f0d88c943b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.10.1-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 d8c817e273b9070ca169b1e8a8a0c9a8644b0bfbd3bf21f214cbd7776aeb6a88
MD5 573a9369994c83f440b3b96277d8ff20
BLAKE2b-256 8eb328bd168ec6f9ae2ea1171a794fc0d0f9c7fbde9aa38ccbcbef0fed947303

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.10.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 a0ba4a748d5aa547df3663c8697ec711f9990d1524a81b7606c029de43f6a37b
MD5 09e513f94538f1359007176cc89c7512
BLAKE2b-256 079f81ffa54ea521f4a23112d6ae832b117c4cf7088f6efb97345a263e036c97

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.10.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c6877fc865eefd9bf79da4091c682d2446085fa2f5af73d649c627f695ec01cf
MD5 608f0ba6891d9f2cba065e8c11e857c5
BLAKE2b-256 3b6a8bd374cae0379762b21ede8d6a776ac2ad9771625d7ed3c4a9ca51ee3917

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.10.1-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 ca606ce35a3b78188add776963da014bacff078e8099ca7f0ae386319c4e74b1
MD5 438a9b514d304951c9ee08bae3b50746
BLAKE2b-256 d3ecddbbd88575107706e1847359e524a396d256080df0764cff5a671e555372

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.10.1-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 133412ea3482d361fde26cbf228aef4f8204ea78d2d25990b22319783a77cf88
MD5 91bd68ffa6c2f42823806e20ebda933b
BLAKE2b-256 644f7247a40aa2ccb0251ee73dfe44a139307990f684810f424a80e667eb3ddb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.10.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 b9ed040d780249af578ee776fd1d74e8a755512e8998a5b7a8e630d4363d6b6a
MD5 179e6590e763820350653cda9e9cc1c2
BLAKE2b-256 ad5d74eb110dfc474cbd70cb626d9961177d3708abc41c31fbf740a29d804cb5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.10.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b0d6d3277863d3ae29c2c29b2f30c751a231d05dc6cf5a8558056941970487b5
MD5 6762fc35a20737d8ef5325f1717ed8dd
BLAKE2b-256 d712a50c7de36d336553968aff05b2ae11e01c87d1da039302e598e1993df072

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.10.1-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 1a31b95493abd49798d35dd66f8d0f438f1afb4b90de5e3d9c94c5daa228c418
MD5 1e10c86f37d361bdc546315f3cc3dba7
BLAKE2b-256 b9f553aa0bfbc5ab0647f9719516c0cafadf5e77ecd50a70c0baa559c16161c4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.10.1-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 3646741723df3dbc29cd9453f1a889529b1855ff9423da0274f4403daa073b65
MD5 1c9c4d65c96506037fba815970f9630f
BLAKE2b-256 847a5c6b1bf9e00eb15d21eba8517dd2171261322b127c78b119c01444c91b40

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.10.1-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 058e5408ebc446d67a1fee32dad73b2f75d506a205f87cb30269b3d2a97f25cd
MD5 f6d46a58c35a41339d41efcc8a2fe250
BLAKE2b-256 c195e32991aa5263372037c23dd9a77f8c857ce3d2eeddbde8de5d5a7e25f21c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.10.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 16a62412dd726b3a7cdb3251511ebd8ee585805ebf0c6dcd1bf08a6f5611840f
MD5 33ce4b2bedf377d5869d082d941d95ff
BLAKE2b-256 f46381072facd3f268b1c184a2981169ec29ff2f3d6a9ea5564737ee2d279d7e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.10.1-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 0d4a119b1a50ad9408e111da6d64cc3f0c19aeaccc35dc8df0087cd0263a34bf
MD5 6ef031f9f06b649ce33d4c4e970d1618
BLAKE2b-256 9f1993da896a8e48ec335f5cdc5d9396a5453008ce4aba2914f813f24d99949a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.10.1-cp38-cp38-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 37e99df0031b25397f788552b61f415224eba74fc72938577fdafa6459b7aa95
MD5 485baecc1f79360b9819b918619d4ae4
BLAKE2b-256 df1a1f85fadbad6b8cdfa05ba6948f13357a1ef7de004e18c4b4c9bc35d05fcd

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