Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Lightweaver

C. Osborne (University of Glasgow) & I. Milić (NSO/CU Boulder), 2019-2026

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.10+, and it is recommended to be run inside a virtual environment, e.g. using conda, but other venv providers exist! In this case a new virtual environment can be created with:

conda create -n Lightweaver python=3.12

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 . --config-settings editable_mode=strict (the strict mode is optional, but advised). The libraries currently produce a few warnings, but should not produce any errors. This setup then enables the compilation of extension modules to shared libraries that can be loaded at runtime. This is advanced functionality -- ask me if you need help!

The Python code is formatted and linted with ruff, which CI checks. To run the same checks automatically on each commit, install the pre-commit hooks with python -m pip install pre-commit and pre-commit install.

Documentation

Please contact me through this repository if difficulties are encountered. We also have a community Discord for discussions and knowledge-pooling.

Acknowledgements

The python implementation of the Wittmann equation of state has been kindly provided J. de la Cruz Rodriguez.

Metadata

Release files for lightweaver 1.0.0rc4

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 1.0.0rc4
File Size Uploaded
lightweaver-1.0.0rc4.tar.gz 3.5 MB Details

Built distributions (wheels)

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

Release files / lightweaver-1.0.0rc4.tar.gz

Download URL lightweaver-1.0.0rc4.tar.gz
Size 3.5 MB
Tags Source
SHA-256 checksum
How to use checksums
b83339a6169de520769f6474398cb305a94c311b3b435e57126ee077d52e2d0c
BLAKE2b-256 checksum
How to use checksums
8bbb415b3ffc8563080916d9b799804b20d7960ee6142dae83d36d64a0f1d272
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / lightweaver-1.0.0rc4-cp314-cp314-win_amd64.whl

Download URL lightweaver-1.0.0rc4-cp314-cp314-win_amd64.whl
Size 13.2 MB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
68425ef34ce495c9f8cb34849022466ed7de90179b92a9bc8aecbab7c19c7ee7
BLAKE2b-256 checksum
How to use checksums
4dffeb2ddf094fde60186113d9deb028a7a85b06481115975f26c187c1ab5afc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / lightweaver-1.0.0rc4-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl

Download URL lightweaver-1.0.0rc4-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
9d594fb62d0ce3872138d50c7c77774eee0094acb6f16738fda58330a0e40ee8
BLAKE2b-256 checksum
How to use checksums
35dc3690be3ad34ef206d9ad76a04ea9c2cdd89c428cd81f2c5d6b1f838eab04
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / lightweaver-1.0.0rc4-cp314-cp314-macosx_10_15_x86_64.whl

Download URL lightweaver-1.0.0rc4-cp314-cp314-macosx_10_15_x86_64.whl
Size 5.3 MB
Tags CPython 3.14 macOS 10.15+ x86-64
SHA-256 checksum
How to use checksums
32e68753667a2c2f39cb3441314e02ae6b8ae3fabc83c9ef5bc5431a12ec8021
BLAKE2b-256 checksum
How to use checksums
85bd3afa7ab33eab0ff642bf6d40285723fc517cd98f0990fdb1b9175ba1a080
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / lightweaver-1.0.0rc4-cp314-cp314-macosx_10_15_universal2.whl

Download URL lightweaver-1.0.0rc4-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
84f610a40702580e956507cd33ba74d3f34b781e577d41e38e9ef523faca2fc1
BLAKE2b-256 checksum
How to use checksums
39abb06a2afd60bc8f0c29060e0c17be1c1f62734461b811b4eb66b927fa0502
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / lightweaver-1.0.0rc4-cp313-cp313-win_amd64.whl

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

Release files / lightweaver-1.0.0rc4-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl

Download URL lightweaver-1.0.0rc4-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
7f2281bd5ab4d91b904f088786197b8f53ad286567b698040931d89c892a04ee
BLAKE2b-256 checksum
How to use checksums
38e87236c309f9c73c788f85f87e744b47cc6e47b237551de0cf92885e95508c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / lightweaver-1.0.0rc4-cp313-cp313-macosx_10_13_x86_64.whl

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

Release files / lightweaver-1.0.0rc4-cp313-cp313-macosx_10_13_universal2.whl

Download URL lightweaver-1.0.0rc4-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
1af514d375221d0ef65261ab86687502830322ad04b1c04b9eafb67dee942ee5
BLAKE2b-256 checksum
How to use checksums
d298aa36af7c8f038b286a39ccf597f15f9302f0eef045b816ab464bcb2f8ff2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / lightweaver-1.0.0rc4-cp312-cp312-win_amd64.whl

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

Release files / lightweaver-1.0.0rc4-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl

Download URL lightweaver-1.0.0rc4-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
57f5770ec659115d165c704790a73d06080db51b758461ff9b835b283dcffe8d
BLAKE2b-256 checksum
How to use checksums
ec391b99ec2384b0d6c51f340b7668a5a3601cbb5133a7ad83678650a4461b8e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / lightweaver-1.0.0rc4-cp312-cp312-macosx_10_13_x86_64.whl

Download URL lightweaver-1.0.0rc4-cp312-cp312-macosx_10_13_x86_64.whl
Size 5.3 MB
Tags CPython 3.12 macOS 10.13+ x86-64
SHA-256 checksum
How to use checksums
a2501f568242b3823ebb66f69fcdd9235a59531b284ef35c9e0568ccd4544594
BLAKE2b-256 checksum
How to use checksums
128d0eac31dcdae8f61b175adfda4b526b0dca2a0e7f253af48a3f2e89e30cfd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / lightweaver-1.0.0rc4-cp312-cp312-macosx_10_13_universal2.whl

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

Release files / lightweaver-1.0.0rc4-cp311-cp311-win_amd64.whl

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

Release files / lightweaver-1.0.0rc4-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl

Download URL lightweaver-1.0.0rc4-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
9313fd529e70c3009c67cd00e1d193a09a974e0d84b981f8e5a88d8cec186dd1
BLAKE2b-256 checksum
How to use checksums
e26941720567939c0603662701063e8d4a6dd3e1a2b4acc54e0e2bd5f04748d6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / lightweaver-1.0.0rc4-cp311-cp311-macosx_10_9_x86_64.whl

Download URL lightweaver-1.0.0rc4-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
77785eb87f8c53b53af6e9a398621babac3c927f0aad849054eccb0cc009ae8e
BLAKE2b-256 checksum
How to use checksums
43ab4e13ca96b153d5b699f5b5f4e2dd3c489146be608ac362d31d4252de0e99
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / lightweaver-1.0.0rc4-cp311-cp311-macosx_10_9_universal2.whl

Download URL lightweaver-1.0.0rc4-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
0cd68283932780dc7d1268fa1eedc23573f0151ba230fce44da3b5c75cd1b5c1
BLAKE2b-256 checksum
How to use checksums
17c66d159729871c95b8eafa7a828b8ef8d2f1cae6789a1bfe39524fb22a2227
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / lightweaver-1.0.0rc4-cp310-cp310-win_amd64.whl

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

Release files / lightweaver-1.0.0rc4-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl

Download URL lightweaver-1.0.0rc4-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
97d21c8ed88e249566dcd2e75a38ed38881c17a35d080b1adf66b66ffe932e30
BLAKE2b-256 checksum
How to use checksums
8da94a9dcc55cfe39ee808a0b2da84d1c6d85c3cb001898d4d5b9790eebe037e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / lightweaver-1.0.0rc4-cp310-cp310-macosx_10_9_x86_64.whl

Download URL lightweaver-1.0.0rc4-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
6e5060f05afb7e9bfed658570b01b35b4d629bf52d48122e56b51610d8ba4bd4
BLAKE2b-256 checksum
How to use checksums
ef2b3333846b7946e0b63bec7ba158aec0a5dd10eeb393678fa2f10f6a85681f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / lightweaver-1.0.0rc4-cp310-cp310-macosx_10_9_universal2.whl

Download URL lightweaver-1.0.0rc4-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
518aa20135e591ce6146a9a3c658ef18ce4b392d7ce22654aeaa6e753be7a478
BLAKE2b-256 checksum
How to use checksums
ce3a5e8e5a164ed0141ae925e58d0ad2af9daf06e1269976676a3a7dc33e4fa9
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

1.0.0rc4 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