Skip to main content

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.

Metadata

Release files for lightweaver 0.16.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lightweaver 0.16.3
File Size Uploaded
lightweaver-0.16.3.tar.gz 3.4 MB Details

Built distributions (wheels)

Table of built distributions (wheels) for lightweaver 0.16.3
File
lightweaver-0.16.3-cp314-cp314-win_amd64.whl CPython 3.14 CPython 3.14 Windows x86-64 Details
lightweaver-0.16.3-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.28+ x86-64, Linux glibc 2.24+ x86-64 Details
lightweaver-0.16.3-cp314-cp314-macosx_10_15_x86_64.whl CPython 3.14 CPython 3.14 macOS 10.15+ x86-64 Details
lightweaver-0.16.3-cp314-cp314-macosx_10_15_universal2.whl CPython 3.14 CPython 3.14 macOS 10.15+ universal2 (ARM64, x86-64) Details
lightweaver-0.16.3-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
lightweaver-0.16.3-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.24+ x86-64, Linux glibc 2.28+ x86-64 Details
lightweaver-0.16.3-cp313-cp313-macosx_10_13_x86_64.whl CPython 3.13 CPython 3.13 macOS 10.13+ x86-64 Details
lightweaver-0.16.3-cp313-cp313-macosx_10_13_universal2.whl CPython 3.13 CPython 3.13 macOS 10.13+ universal2 (ARM64, x86-64) Details
lightweaver-0.16.3-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
lightweaver-0.16.3-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.28+ x86-64, Linux glibc 2.24+ x86-64 Details
lightweaver-0.16.3-cp312-cp312-macosx_10_13_x86_64.whl CPython 3.12 CPython 3.12 macOS 10.13+ x86-64 Details
lightweaver-0.16.3-cp312-cp312-macosx_10_13_universal2.whl CPython 3.12 CPython 3.12 macOS 10.13+ universal2 (ARM64, x86-64) Details
lightweaver-0.16.3-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
lightweaver-0.16.3-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.24+ x86-64, Linux glibc 2.28+ x86-64 Details
lightweaver-0.16.3-cp311-cp311-macosx_10_9_x86_64.whl CPython 3.11 CPython 3.11 macOS 10.9+ x86-64 Details
lightweaver-0.16.3-cp311-cp311-macosx_10_9_universal2.whl CPython 3.11 CPython 3.11 macOS 10.9+ universal2 (ARM64, x86-64) Details
lightweaver-0.16.3-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details
lightweaver-0.16.3-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.28+ x86-64, Linux glibc 2.24+ x86-64 Details
lightweaver-0.16.3-cp310-cp310-macosx_10_9_x86_64.whl CPython 3.10 CPython 3.10 macOS 10.9+ x86-64 Details
lightweaver-0.16.3-cp310-cp310-macosx_10_9_universal2.whl CPython 3.10 CPython 3.10 macOS 10.9+ universal2 (ARM64, x86-64) Details

Total release size: 220.4 MB

Release files / lightweaver-0.16.3.tar.gz

Download URL lightweaver-0.16.3.tar.gz
Size 3.4 MB
Tags Source
SHA-256 checksum
How to use checksums
edd92b8be8caeeb4ac0da9e249077352cd7bcfe4855a1c9fd7f9afec78405e51
BLAKE2b-256 checksum
How to use checksums
31d9f4f18cddecf13fa27bf5979950ad66dc67968c0441199a36195f83694f04
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / lightweaver-0.16.3-cp314-cp314-win_amd64.whl

Download URL lightweaver-0.16.3-cp314-cp314-win_amd64.whl
Size 13.2 MB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
0adfc486a8bafbd11271e73191e364c773c45a3c7e9e4a2d19104a8034269d3f
BLAKE2b-256 checksum
How to use checksums
25a19facba05d65188a4439aa64b31908b03fc4a6552bbc1ad2f58c60d30cc10
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / lightweaver-0.16.3-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl

Download URL lightweaver-0.16.3-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Size 20.9 MB
Tags CPython 3.14 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
7844599be69dcd41b05d318680ca9ee85e2444298631a75be4824485d8159677
BLAKE2b-256 checksum
How to use checksums
8319d4f3bbdb6e82b8eda4e6e3531a95facf3467ad3ca7760f61e05ddc1c654e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / lightweaver-0.16.3-cp314-cp314-macosx_10_15_x86_64.whl

Download URL lightweaver-0.16.3-cp314-cp314-macosx_10_15_x86_64.whl
Size 5.2 MB
Tags CPython 3.14 macOS 10.15+ x86-64
SHA-256 checksum
How to use checksums
b171c523d48fae6166325b0b29025cc8259148f170cc1665588747cf27930c72
BLAKE2b-256 checksum
How to use checksums
2a214e0a4bccdc3b7d11440a6e655a5f1515e3fe8979e841a03c19f0c6bd6839
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / lightweaver-0.16.3-cp314-cp314-macosx_10_15_universal2.whl

Download URL lightweaver-0.16.3-cp314-cp314-macosx_10_15_universal2.whl
Size 4.3 MB
Tags CPython 3.14 macOS 10.15+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
2ee8a4540abdb0f2b2313d723423f5ffe156c9beb169413bb579d629a9322889
BLAKE2b-256 checksum
How to use checksums
064a2794c0b32e1f2046bbcf8e1721085ef683bc8d6e516e7682e099333eb471
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / lightweaver-0.16.3-cp313-cp313-win_amd64.whl

Download URL lightweaver-0.16.3-cp313-cp313-win_amd64.whl
Size 12.9 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
6017d68cc6a78cafda97aeab6b56d01157def9e817e66b72b8cf2de81320f70f
BLAKE2b-256 checksum
How to use checksums
1aac509bf4afadc7477e74bac5a75f8684b70e427c80e43052a88447e7e8929f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / lightweaver-0.16.3-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl

Download URL lightweaver-0.16.3-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Size 20.9 MB
Tags CPython 3.13 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
7ff442e09c70493358224f0aa36155f22a3ddf6c43992a087b4c5934f323f1fe
BLAKE2b-256 checksum
How to use checksums
364db7afeecc6d83059b356e8e52f37e2289bd154d51189f6f6a655e343f9c04
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / lightweaver-0.16.3-cp313-cp313-macosx_10_13_x86_64.whl

Download URL lightweaver-0.16.3-cp313-cp313-macosx_10_13_x86_64.whl
Size 5.2 MB
Tags CPython 3.13 macOS 10.13+ x86-64
SHA-256 checksum
How to use checksums
2880bb55d56de17fe0c77a640f8d6901d8e7e96837f4e746ccfa37358988ad85
BLAKE2b-256 checksum
How to use checksums
4ac3d5284e98bcffe6fa210d72b2c57c9232e476b6f12c362eebcd41ffe69106
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / lightweaver-0.16.3-cp313-cp313-macosx_10_13_universal2.whl

Download URL lightweaver-0.16.3-cp313-cp313-macosx_10_13_universal2.whl
Size 4.3 MB
Tags CPython 3.13 macOS 10.13+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
739c2eb099f782bf72e1e6fe28df1d743b157ecd60c070344a82381a5022207d
BLAKE2b-256 checksum
How to use checksums
134f12ff4b1226c112a60925891bffb544df13698f849ac8ec9e211fa726e7e0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / lightweaver-0.16.3-cp312-cp312-win_amd64.whl

Download URL lightweaver-0.16.3-cp312-cp312-win_amd64.whl
Size 12.9 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
9bcbf81a28d2b8fa0bbbaf73a0bc36fd082359ff927c13759fad0c3865650703
BLAKE2b-256 checksum
How to use checksums
951def2c9ee3543ffe34c1659a18dca13fef69bbed6c09ee4af7c0eba1b2428b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / lightweaver-0.16.3-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl

Download URL lightweaver-0.16.3-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Size 20.9 MB
Tags CPython 3.12 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
2141555576d55ba544041cdd8da85c7cf27f293ebe51a24028f524f8daab4fde
BLAKE2b-256 checksum
How to use checksums
74fc123d7fc7765ccd30ac52ffbcaff83badac5b3ef7ec136b9566a8db2630dd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / lightweaver-0.16.3-cp312-cp312-macosx_10_13_x86_64.whl

Download URL lightweaver-0.16.3-cp312-cp312-macosx_10_13_x86_64.whl
Size 5.2 MB
Tags CPython 3.12 macOS 10.13+ x86-64
SHA-256 checksum
How to use checksums
baae3e1d0fd2687a3536f1eb55dd06fbb148fd09a8a7ba2ba46f27749d55ee5f
BLAKE2b-256 checksum
How to use checksums
66140d40fa4d313589e20981b4693761857dbaed6fb50025201053f1764342a5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / lightweaver-0.16.3-cp312-cp312-macosx_10_13_universal2.whl

Download URL lightweaver-0.16.3-cp312-cp312-macosx_10_13_universal2.whl
Size 4.2 MB
Tags CPython 3.12 macOS 10.13+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
74e800ac5d052e61f9f2acee8f1bccc0bcf3c074ad85b8ca51b3943f9508f149
BLAKE2b-256 checksum
How to use checksums
dfebb859a6aceab5ec1acd525a6dd7be3ac1c51db59298526980e9504b2fda7e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / lightweaver-0.16.3-cp311-cp311-win_amd64.whl

Download URL lightweaver-0.16.3-cp311-cp311-win_amd64.whl
Size 13.0 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
f7c504844a242ff48904346a1d077cc976e5339dcf0c7184a4474ed73748545e
BLAKE2b-256 checksum
How to use checksums
883bd69bb3090d9c5e83f7ffdb7737be1419130fcd14296e245c51ed2015c976
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / lightweaver-0.16.3-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl

Download URL lightweaver-0.16.3-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Size 21.0 MB
Tags CPython 3.11 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
3306fcb75b347fc38a6305387e998214f43ea831a1a29ebd1047f16cb2c8a736
BLAKE2b-256 checksum
How to use checksums
805fe97f88a898b568a0ce1b14b43383c2ec972569cc37013798de978cb082c7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / lightweaver-0.16.3-cp311-cp311-macosx_10_9_x86_64.whl

Download URL lightweaver-0.16.3-cp311-cp311-macosx_10_9_x86_64.whl
Size 5.3 MB
Tags CPython 3.11 macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
4539aaa50ac4a6569f448ac6e746467b9b5b46990e16d317dd251c6a266fc34f
BLAKE2b-256 checksum
How to use checksums
6a13bbb13897266e30e3e3caa5786a3994ae73f0c9545a6b146fdd04fdb637fe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / lightweaver-0.16.3-cp311-cp311-macosx_10_9_universal2.whl

Download URL lightweaver-0.16.3-cp311-cp311-macosx_10_9_universal2.whl
Size 4.3 MB
Tags CPython 3.11 macOS 10.9+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
6f591f4c09a8813fc6f940d8e1c1547a060783c6636bf6e456e2bf717de78772
BLAKE2b-256 checksum
How to use checksums
63b67bc396d292d8ccbf693d26059ba1f8b5f12fb57fe3d2110ab0f824a9e76f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / lightweaver-0.16.3-cp310-cp310-win_amd64.whl

Download URL lightweaver-0.16.3-cp310-cp310-win_amd64.whl
Size 13.0 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
da74178b9d17fc3ba5c006c173fcb76df4bf70740fc52a159745a7ad100e7955
BLAKE2b-256 checksum
How to use checksums
5c909b10c0762119b79550388893b95ff7a6187f756716f9bdd929df70cde997
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / lightweaver-0.16.3-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl

Download URL lightweaver-0.16.3-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Size 20.9 MB
Tags CPython 3.10 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
54ac340e702ab8b0806dd650ffe943ad203cd37adb9ad88573dd6c18207aa3cf
BLAKE2b-256 checksum
How to use checksums
1b253175f6df35f5687f4a7b3c94ebb3e37c2e8888ab5a390c5fa9b805616c06
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / lightweaver-0.16.3-cp310-cp310-macosx_10_9_x86_64.whl

Download URL lightweaver-0.16.3-cp310-cp310-macosx_10_9_x86_64.whl
Size 5.3 MB
Tags CPython 3.10 macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
4a5d7045201c1c588b0f88a873b32a075c7c17d014d499a35a10681c6c1fed00
BLAKE2b-256 checksum
How to use checksums
9dc40349ded538c30b343b74e3071db6f7756ebc7972000434e5f9ccd3e0d4b0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / lightweaver-0.16.3-cp310-cp310-macosx_10_9_universal2.whl

Download URL lightweaver-0.16.3-cp310-cp310-macosx_10_9_universal2.whl
Size 4.3 MB
Tags CPython 3.10 macOS 10.9+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
e8abaffdaf7dc86eac75e3f91936525713801f88641899fa6ed0efb273eff1dd
BLAKE2b-256 checksum
How to use checksums
5073c8c8f4cb5d14c94d633795bd480101b518bd47747075638b9effb2a9bdd3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release history Release notifications | RSS feed

This release

0.16.3 This release

21 release files

0.8.2

16 release files

0.8.0

16 release files

0.7.7

11 release files

0.7.6

11 release files

0.7.5

9 release files

0.7.4

7 release files

0.7.3

9 release files

0.7.2

9 release files

0.7.1

5 release files

0.7.0

5 release files

0.6.1

5 release files

0.6.0

6 release files

0.5.0

6 release files

0.4.0

6 release files

0.3.3

6 release files

0.3.2

6 release files

0.3.1

6 release files

0.3.0

6 release files

0.2.4

6 release files

0.2.3

6 release files

0.2.2

11 release files

0.2.1

11 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page