Skip to main content

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!

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 0.17.0

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

Built distributions (wheels)

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

Release files / lightweaver-0.17.0.tar.gz

Download URL lightweaver-0.17.0.tar.gz
Size 3.5 MB
Tags Source
SHA-256 checksum
How to use checksums
9e2595835bc514fd3722145d680cab28cfbed25ccbaae3e44dbef0650439f3b3
BLAKE2b-256 checksum
How to use checksums
eba6c76202c364bf54b5495f4f0b13a80b17abe2c772815ed028944e23fdf2e2
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.17.0-cp314-cp314-win_amd64.whl

Download URL lightweaver-0.17.0-cp314-cp314-win_amd64.whl
Size 13.1 MB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
9228143330bbf63021466f7799f4549bebcd5ab8d908cbaf2ecb0304544113a8
BLAKE2b-256 checksum
How to use checksums
fcde3e28c7be48a451204ccc03b75f150b653ba59891f7bfca28b5a0fc7380b4
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.17.0-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl

Download URL lightweaver-0.17.0-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Size 20.8 MB
Tags CPython 3.14 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
5e17a750311b048379c5d75505f00219b5e56c2230d77083d8d5b5fb37cfb9d2
BLAKE2b-256 checksum
How to use checksums
eb8ba22d86ce334f0827397afc821d9dac3cc2321493b1ea73e3e929330a7445
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.17.0-cp314-cp314-macosx_10_15_x86_64.whl

Download URL lightweaver-0.17.0-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
4312fab473b793f5ed50c7287e44d8265bf488e06896ff8cedd07abcb3f7090c
BLAKE2b-256 checksum
How to use checksums
c260a27c6d8e058b15ef7c8d4b09aaeade400629c9c68c07131aa343ebeeb848
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.17.0-cp314-cp314-macosx_10_15_universal2.whl

Download URL lightweaver-0.17.0-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
3c8002537900afe6020c2f624ea914d1e2add4c8ea7a50de633a03b43d97ff40
BLAKE2b-256 checksum
How to use checksums
e20bf2cb3fe6b788a29a525bd75452b6334f0e46c1db7a1846a1b189d8ac7f69
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.17.0-cp313-cp313-win_amd64.whl

Download URL lightweaver-0.17.0-cp313-cp313-win_amd64.whl
Size 12.9 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
ec31a4aabbb9ade22bfcce8492c2ef12d7fd80c0c120473a1acc32da64eb537f
BLAKE2b-256 checksum
How to use checksums
0826946dbb377adb2325520a806ca2f6105b720f7e04008fceeb613e983a9b98
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.17.0-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl

Download URL lightweaver-0.17.0-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Size 20.8 MB
Tags CPython 3.13 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
1629eb2a578c8d40c92549c10e1be3a8eab9bc83536888d5762ae82206415436
BLAKE2b-256 checksum
How to use checksums
244a81c413eabb7de0addbe35676725792fbb27a6f9badb0ce442748fe73e667
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.17.0-cp313-cp313-macosx_10_13_x86_64.whl

Download URL lightweaver-0.17.0-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
e3a5c859b322156af50256a0604fe40148484341a252922824db67e9e17a8b6b
BLAKE2b-256 checksum
How to use checksums
90ccfae26f43f8a126942e2d9e01f663dc29a13eb22dede51ab7f73936d87596
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.17.0-cp313-cp313-macosx_10_13_universal2.whl

Download URL lightweaver-0.17.0-cp313-cp313-macosx_10_13_universal2.whl
Size 4.2 MB
Tags CPython 3.13 macOS 10.13+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
680d439c841fe7d72040079657fef9bd70854f447e7a1700e301667277cab523
BLAKE2b-256 checksum
How to use checksums
e3688ce7b40a866ce06e244149d8415648b5f5461613e98e2be4838e7f6d782f
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.17.0-cp312-cp312-win_amd64.whl

Download URL lightweaver-0.17.0-cp312-cp312-win_amd64.whl
Size 12.9 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
8e3e1810ef23fffdc3f02fb0b3332776b9c0d32a8bed7f2371e8cef25b51c8d1
BLAKE2b-256 checksum
How to use checksums
774e140cb9ecefab70c186f039b72d645b89fa7297996afc3a28f7e025276b99
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.17.0-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl

Download URL lightweaver-0.17.0-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Size 20.8 MB
Tags CPython 3.12 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
b20dd95cd9592555beff310728b9959a64233867073fcee3028f315d1f7fa288
BLAKE2b-256 checksum
How to use checksums
ae27c66ad472aa1f7832bc668bb35aae5479fbf5f2a2e6a6e68dfe34f3d1ef10
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.17.0-cp312-cp312-macosx_10_13_x86_64.whl

Download URL lightweaver-0.17.0-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
ef3621b7bf87a46e6470743e2f3eedc1d784d221e6392d851e79cf76cda2d945
BLAKE2b-256 checksum
How to use checksums
b4b749b9e32198902fddf9ec6666d32687128c00e38b290852239a4e5a238318
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.17.0-cp312-cp312-macosx_10_13_universal2.whl

Download URL lightweaver-0.17.0-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
dccf1559c4631123f174393aad4a21fe2c9c2675e8236f43d28f29d340e9395f
BLAKE2b-256 checksum
How to use checksums
ac1741f37db336a0b3118e1fd20effc32b2300ead58b4dbe997f72c1a4339ba0
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.17.0-cp311-cp311-win_amd64.whl

Download URL lightweaver-0.17.0-cp311-cp311-win_amd64.whl
Size 13.0 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
00c34595b64957db3fc92385781601284af9002654a2f2cf529aa5b971adafde
BLAKE2b-256 checksum
How to use checksums
807ecd6ac0310e791f6c54d247f32e812a0a815e88864d1d6b57ad285bed6213
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.17.0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl

Download URL lightweaver-0.17.0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Size 20.9 MB
Tags CPython 3.11 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
1385f6c87c63ac6a043b08a17b7ec7fd8e589f88b45a23b8c824f9648f77feb0
BLAKE2b-256 checksum
How to use checksums
b1b00f5c976b44cc8cdf68d56946eb6971b78cef3e38e537eeb97c4ef9b95480
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.17.0-cp311-cp311-macosx_10_9_x86_64.whl

Download URL lightweaver-0.17.0-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
7a54ed7eb908468e51d9f87e482ee14f5e73d607162979a199c1f684e6bc6597
BLAKE2b-256 checksum
How to use checksums
a444e59a24f7de261353df39661f43c781936da08cef8c7fdf23460d8bc98057
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.17.0-cp311-cp311-macosx_10_9_universal2.whl

Download URL lightweaver-0.17.0-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
194355ca07a095dc9a0e7e21e6bf291051c171ce0e5ebb1e904f0cfd8b043678
BLAKE2b-256 checksum
How to use checksums
89e35a1812af9cf7cca228bc02044213724ac60dafae556eb2b80d8e28b616af
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.17.0-cp310-cp310-win_amd64.whl

Download URL lightweaver-0.17.0-cp310-cp310-win_amd64.whl
Size 13.0 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
d9ab1be95c7ba9a5fac78003bfaba83561374413ebd1b827ab8d67493ec1de7d
BLAKE2b-256 checksum
How to use checksums
5bf18b7490e83abd519dbfba419b1b01a484572daa32084f35505b06fa85a22b
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.17.0-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl

Download URL lightweaver-0.17.0-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Size 20.8 MB
Tags CPython 3.10 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
23527682133a4488919cd41ede1f7725c2f7c5517ed41c4c2da182912ac0d06e
BLAKE2b-256 checksum
How to use checksums
eb2b7b694231abd661892041a09177b0402215ad741a769e9707c31473e6b7cf
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.17.0-cp310-cp310-macosx_10_9_x86_64.whl

Download URL lightweaver-0.17.0-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
2334c33e32c182ef07395074f7acd58689ee72f007356e3b9489a5d32df7a69c
BLAKE2b-256 checksum
How to use checksums
0b9b7b7f15408e7daed2e7d096b70710202673199385047857cbe7d6e5a0188b
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.17.0-cp310-cp310-macosx_10_9_universal2.whl

Download URL lightweaver-0.17.0-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
c89c8135b5cc7aecfbe9adfda0dd59c28087376d10fe36b128d9e77181e523f9
BLAKE2b-256 checksum
How to use checksums
da0bc23ab1741b33a3bd72e6e1887e2bfd5b37d68d015ed10c51fd1c19dd5508
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.17.0 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