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

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

lightweaver-0.16.0-cp314-cp314-win_amd64.whl (12.6 MB view details)

Uploaded CPython 3.14Windows x86-64

lightweaver-0.16.0-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (20.6 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

lightweaver-0.16.0-cp314-cp314-macosx_10_15_x86_64.whl (5.1 MB view details)

Uploaded CPython 3.14macOS 10.15+ x86-64

lightweaver-0.16.0-cp314-cp314-macosx_10_15_universal2.whl (4.2 MB view details)

Uploaded CPython 3.14macOS 10.15+ universal2 (ARM64, x86-64)

lightweaver-0.16.0-cp313-cp313-win_amd64.whl (12.4 MB view details)

Uploaded CPython 3.13Windows x86-64

lightweaver-0.16.0-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (20.7 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

lightweaver-0.16.0-cp313-cp313-macosx_10_13_x86_64.whl (5.1 MB view details)

Uploaded CPython 3.13macOS 10.13+ x86-64

lightweaver-0.16.0-cp313-cp313-macosx_10_13_universal2.whl (4.2 MB view details)

Uploaded CPython 3.13macOS 10.13+ universal2 (ARM64, x86-64)

lightweaver-0.16.0-cp312-cp312-win_amd64.whl (12.4 MB view details)

Uploaded CPython 3.12Windows x86-64

lightweaver-0.16.0-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (20.7 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

lightweaver-0.16.0-cp312-cp312-macosx_10_13_x86_64.whl (5.1 MB view details)

Uploaded CPython 3.12macOS 10.13+ x86-64

lightweaver-0.16.0-cp312-cp312-macosx_10_13_universal2.whl (4.2 MB view details)

Uploaded CPython 3.12macOS 10.13+ universal2 (ARM64, x86-64)

lightweaver-0.16.0-cp311-cp311-win_amd64.whl (12.4 MB view details)

Uploaded CPython 3.11Windows x86-64

lightweaver-0.16.0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (20.8 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

lightweaver-0.16.0-cp311-cp311-macosx_10_9_x86_64.whl (5.1 MB view details)

Uploaded CPython 3.11macOS 10.9+ x86-64

lightweaver-0.16.0-cp311-cp311-macosx_10_9_universal2.whl (4.2 MB view details)

Uploaded CPython 3.11macOS 10.9+ universal2 (ARM64, x86-64)

lightweaver-0.16.0-cp310-cp310-win_amd64.whl (12.4 MB view details)

Uploaded CPython 3.10Windows x86-64

lightweaver-0.16.0-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (20.7 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

lightweaver-0.16.0-cp310-cp310-macosx_10_9_x86_64.whl (5.1 MB view details)

Uploaded CPython 3.10macOS 10.9+ x86-64

lightweaver-0.16.0-cp310-cp310-macosx_10_9_universal2.whl (4.2 MB view details)

Uploaded CPython 3.10macOS 10.9+ universal2 (ARM64, x86-64)

File details

Details for the file lightweaver-0.16.0.tar.gz.

File metadata

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

File hashes

Hashes for lightweaver-0.16.0.tar.gz
Algorithm Hash digest
SHA256 4b220cd85cb43154879553829d8e9b8832b78b4bd800d394d9a14a68c53f05f6
MD5 bdba26d85dc885d02efda7f5bf0d384c
BLAKE2b-256 3f4bab50a7d264fcb70e9ce1e52ffeae01ae535b39f1499e71d6fdef2f761449

See more details on using hashes here.

File details

Details for the file lightweaver-0.16.0-cp314-cp314-win_amd64.whl.

File metadata

File hashes

Hashes for lightweaver-0.16.0-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 787734cd66292b309343ec673d680b7f94b6e5e2235d70ecfa72a7507942edcd
MD5 7dd88952921a03ca5cb29ca6a1df84f6
BLAKE2b-256 9788bd796685e540be03aa6915fb5652bbc4173ff353ac01cc5cbcf6d1e94916

See more details on using hashes here.

File details

Details for the file lightweaver-0.16.0-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for lightweaver-0.16.0-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 6ae6db3a6415180ea13db98b5ffbedc751822539fd3c9251deaff38922ffe57a
MD5 dd87ec4df5a86e4c7f575f5b58184aff
BLAKE2b-256 8a97d45d021b9f2b7f2ec1bf5c8e737162124291258c5daa9b3aad668ec07575

See more details on using hashes here.

File details

Details for the file lightweaver-0.16.0-cp314-cp314-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for lightweaver-0.16.0-cp314-cp314-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 d6273208c7b8e90f78af1230659b590b607bc0a772e27dbfd07589c1408a273e
MD5 840c780550bca99613d451d5450763c7
BLAKE2b-256 bb522a40f813ca1a5f5cf2c5eab72b15aa3682ac6a51abb94300ea85d42ddc0c

See more details on using hashes here.

File details

Details for the file lightweaver-0.16.0-cp314-cp314-macosx_10_15_universal2.whl.

File metadata

File hashes

Hashes for lightweaver-0.16.0-cp314-cp314-macosx_10_15_universal2.whl
Algorithm Hash digest
SHA256 7fc4e30bf4356fd2dedd49ea05ac4aab56a4e21eaa64f99a02fd7ce9d19203e4
MD5 2ae2f2934558598cd9ab3e8fd59bf043
BLAKE2b-256 bd2bfaabe985a6c2a4f8fc5f5260d159152682bf01f400861b1d56bac4f064b9

See more details on using hashes here.

File details

Details for the file lightweaver-0.16.0-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for lightweaver-0.16.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 5be2180d8d2e443dfd693b76249011083579e469b62c9a351a6337fca696787b
MD5 1018248b23abc60930422e78da07078c
BLAKE2b-256 d01a20d9bf3bfc8881744cce309e210656ab19b8e56452f782455ae6ceebb839

See more details on using hashes here.

File details

Details for the file lightweaver-0.16.0-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for lightweaver-0.16.0-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 9164566d26154012987434a99f13d12b21dfa3704f64d50e6396a507f97ca110
MD5 403981cef4158a77bba77859fac5921f
BLAKE2b-256 cf9b854380f2e037b47e1a7e358fad8d5cb6e1f4200ad1423d047bd04d3ba37a

See more details on using hashes here.

File details

Details for the file lightweaver-0.16.0-cp313-cp313-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for lightweaver-0.16.0-cp313-cp313-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 bb57638790fe4984aa981b1466007b793a562e764b82587602dea91a21b38106
MD5 01a45be8062bd18186248db266aca8b6
BLAKE2b-256 6859be0ea0772750f821501048872e158be9e0e6e0453b1f112fdfdcc70f0a2b

See more details on using hashes here.

File details

Details for the file lightweaver-0.16.0-cp313-cp313-macosx_10_13_universal2.whl.

File metadata

File hashes

Hashes for lightweaver-0.16.0-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 f411b1243da5c41e8c738d0deb089fca907125456bb33c7b148d77f1af375271
MD5 bdb265359f52bd50a77a7c60a72b3395
BLAKE2b-256 286ba298c6eaef3f0d2e3bef14c8edda4308d72fd3bd9331a491cb2af68812f9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.16.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 fcf611337fc7db146219095b5565d46d7d294e937c28cb37faecfab65bcd9e2c
MD5 1fd71805226ad66193d8b8c36cc28aa9
BLAKE2b-256 be1b2b5ea7dfb60f6f61c81ccd4f6a6a284934b534708b4bcc75d5a433503c35

See more details on using hashes here.

File details

Details for the file lightweaver-0.16.0-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for lightweaver-0.16.0-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 5d33f3c886e8bade839ba6faa48521cfa7cc2152591e19f147b46661e3d667e6
MD5 e688c9aed709ab16918ac3ce7f6ddfc8
BLAKE2b-256 e977708c172d6f7bdc1edb3d7095d87626b9085a6c25be3f0179d69d642e6532

See more details on using hashes here.

File details

Details for the file lightweaver-0.16.0-cp312-cp312-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for lightweaver-0.16.0-cp312-cp312-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 72756dc7ddb44287813fed1437ecd41cb6aae5c7122ab0eb2ebdf80fa56bbbf6
MD5 54d20ce1c9eaf053f1658dff997a9176
BLAKE2b-256 afbed0a2bcf68aba31369dacdbcc3206cfb72ccecbf9824b2b14984f94bd74a3

See more details on using hashes here.

File details

Details for the file lightweaver-0.16.0-cp312-cp312-macosx_10_13_universal2.whl.

File metadata

File hashes

Hashes for lightweaver-0.16.0-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 c5a3a0bbab5d88faa9a52fa5aa63af288fd63a311468b84bc1614362d6fa8eba
MD5 aad06c17bc812885c75b2abac14f4be4
BLAKE2b-256 93c29de5c3d4477a8cdad3524e5cbf46b465ad8a163a19f9340b3d564272b58f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.16.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 9f87b0c405272af5e0128c1f325719275233032d9c2fbc239b3f500bd7018ef6
MD5 af16edfd60954e14e1e081cbaabc3c62
BLAKE2b-256 ff81342129610da8352074bc1453602bf9519a2b3150ab1d3fd5121a1f18f5c8

See more details on using hashes here.

File details

Details for the file lightweaver-0.16.0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for lightweaver-0.16.0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 4b406d8a94c1730f531ee1422655137c827dd075b27e4a33aa1359f2bb8eaa49
MD5 eca89072023ed693d80e359cef557d90
BLAKE2b-256 3a6b2561e8154cceed78518debf8b3f6ebee42db8d6db1e008ebae3fe56b43d1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.16.0-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 f007c8011f30db4727aea5ad9a505df0264d1351cf0f1999142ed6e282fef82e
MD5 53196092f440bad1e9686bda0f25a1ce
BLAKE2b-256 7745fb3451ea9fbde581f5dd2423062be529c65c1f789b85893e2fea1378e83b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.16.0-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 b665a5acdf12aa959c7317a046f232626d9d07ecbf73c272e13a4b4a4ae6531a
MD5 37634b6b196a002a1d2eeb1109825598
BLAKE2b-256 de0a2789bf50052256057470b82949a275e43a4f6b8524a8044e5bb625b92314

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.16.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 34cba25ec4e233431712f7afea197ef71f8a2df26e1789088e8d3d6c77e902ec
MD5 c966da0970f5456fca35b412b349654d
BLAKE2b-256 d120df408376a6b723b61571e3579f009fc3543e948c5a79c4ff272af147a0cc

See more details on using hashes here.

File details

Details for the file lightweaver-0.16.0-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for lightweaver-0.16.0-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 844f483e999219c41decf866660176946f825c7267585bc8d9a22e64a0423419
MD5 5640e6c1ef79b9a56af7fe739680dd19
BLAKE2b-256 a58fb5e1a662fda57cf931f2978db762f07a331f4a66b49ecfecf9f2dd1d91ea

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.16.0-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 e6333b413eb4b351cd3f049a336ecb98634994d3a8692e2111193f8495049686
MD5 278b6c0e6a7acd88f7d4bc065eaf9afe
BLAKE2b-256 d8a47ba477da8524336d7f2eef6c6b2569883ec11c2ca76226ef522b3693fb5d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.16.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 9b3f5d1f40de28eb94ac23fa23c2da0def50baad917b3c3a3b238b050bb1b3d8
MD5 08e9a6015816379643def39a670aa015
BLAKE2b-256 4c920cd60cb2a3d3574cfbf93f5428e0bdb9f7dc4a67d21c7991677f812099dd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page