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.1.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.1-cp314-cp314-win_amd64.whl (12.6 MB view details)

Uploaded CPython 3.14Windows x86-64

lightweaver-0.16.1-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.1-cp314-cp314-macosx_10_15_x86_64.whl (5.1 MB view details)

Uploaded CPython 3.14macOS 10.15+ x86-64

lightweaver-0.16.1-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.1-cp313-cp313-win_amd64.whl (12.4 MB view details)

Uploaded CPython 3.13Windows x86-64

lightweaver-0.16.1-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.1-cp313-cp313-macosx_10_13_x86_64.whl (5.1 MB view details)

Uploaded CPython 3.13macOS 10.13+ x86-64

lightweaver-0.16.1-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.1-cp312-cp312-win_amd64.whl (12.4 MB view details)

Uploaded CPython 3.12Windows x86-64

lightweaver-0.16.1-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.1-cp312-cp312-macosx_10_13_x86_64.whl (5.1 MB view details)

Uploaded CPython 3.12macOS 10.13+ x86-64

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

Uploaded CPython 3.11Windows x86-64

lightweaver-0.16.1-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.1-cp311-cp311-macosx_10_9_x86_64.whl (5.1 MB view details)

Uploaded CPython 3.11macOS 10.9+ x86-64

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

Uploaded CPython 3.10Windows x86-64

lightweaver-0.16.1-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.1-cp310-cp310-macosx_10_9_x86_64.whl (5.1 MB view details)

Uploaded CPython 3.10macOS 10.9+ x86-64

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

File metadata

  • Download URL: lightweaver-0.16.1.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.1.tar.gz
Algorithm Hash digest
SHA256 7d7f29d7f238a58ebb33fd2dc956debd0a70f7f376feb1470c8c9895e7965a0d
MD5 dd8d39006edcf3d9fa8f32cdba11e24d
BLAKE2b-256 f20c77eb8727f4f4e1e0639089622a6a4afb3eeee1b50f16f9cca6c464b2681d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.16.1-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 4bd633ce69acf08f117fb0acb239fe898257a139be6d45118b40526ddd2676c6
MD5 7477f4d871364256091b06729b59a16c
BLAKE2b-256 baf040f807c0b774d9edbd5e12aeb7a96f7b1a10f6e0e20cd89a4099fdcd52de

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.16.1-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 effbea7a0b5b60bdb7a84c0aa42e254a94fb1d410494a0769ee8fb108b6008eb
MD5 6a14e604517ac79340ce68bf895c259d
BLAKE2b-256 3920bc9188f492c57c52dd7923e3765b35d8da43e69b0f947f35e755b07847ba

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.16.1-cp314-cp314-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 1854804c7f30499d8cb77ddd81aeb1279b5a37c7aa2f30db959756c9ed33a820
MD5 da28a8dc2cf2ba1424b3722adba7c709
BLAKE2b-256 75817d2ce88663c62b3ae0290a8e998a4629fb5847cd66515e25042151eab386

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.16.1-cp314-cp314-macosx_10_15_universal2.whl
Algorithm Hash digest
SHA256 833b9d6ce84b61f7e3d920ad921add7c68b5260142199a3c751fb6f8d8750fa9
MD5 b09a3b45777e373a2f0bac96a3befedc
BLAKE2b-256 0126c40e7635dfa9a3d365b805ea96bd5478fd1ef02c5bea29d6d90486bf0105

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.16.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 e19a01f59117a1f510089ced269688029e5950e8697d95b937e3840735d93254
MD5 6bfbee56d30221dc0e213ede62ff3da0
BLAKE2b-256 f0e281545090f193735392bfaf0f069c76497a07ed3d06e2291093adf03b2017

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.16.1-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 746dfde6d71f7af8da990c6bba892f7dfac28db9610a8ee13cf6e2023e651e74
MD5 848c6d4fc123da5b428a038eb853648e
BLAKE2b-256 8ffbf91408372d8a9b977d5f9fc267b4a8e40977b8d51cf0153629cbf70030ef

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.16.1-cp313-cp313-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 6a47fe86540dc97a80d9b4a4a25ed3536a7ce1b4d73e04b3e459044cc1ac3a54
MD5 3d23fa68111e9086bc3c35f76eeb9b4f
BLAKE2b-256 c4de0e5f5cef3802d5f2caca0422de9b2e4c988b8e78ceaac3971e30ee63f2a4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.16.1-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 dbd6fcbad74a8a24443442f34f740052839953293f0e8ebf6d235546027a9cba
MD5 4accebf369f319218eb58484d342c639
BLAKE2b-256 f7717368ea3ce42c253568a72059d081253b07f4a70b6a48534e468746723daf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.16.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 3639b7bcea83c8dd591aaa16de50dad5b3146702cfab8d130dfe5c54635f8565
MD5 ad519b89cc7d20e02029f9193e27a486
BLAKE2b-256 4d5eb10b534683a11872db50e8da0cd29d12628daf4504f369159d3f44c0bb68

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.16.1-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 0974f0246ab1582944d579d7a856cd505b753fc6349135d9eb38b11b9407faba
MD5 2dad9753869ab9377656102411d91175
BLAKE2b-256 00c99923f07dcfc1dfaa9f66ad97160b0b680630ceed189ba305b11ca7996c5a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.16.1-cp312-cp312-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 8ad8173dcdb75d5f66d74bddc243777a052a7df383b3d967e7442c0d57cbdf16
MD5 08e09bb99bd2a8ee5309cad9ae48b8eb
BLAKE2b-256 b27cfe9a31208f24eab86f204919c6c6bfb9e30a6050513300a9726c9810a85c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.16.1-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 4e0d342790dee95605bbc46f0bf4afc2a7f49d7d6f6432a46d7517bff172509a
MD5 6ea2e52b48cf63fcfbcb45cd98fef63a
BLAKE2b-256 052d63c561969077ddb2b62a2e3269a5e6e301f21d03a82efe9a3593cbccd9e2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.16.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 c9ac606a267be59522369587e5ab9479765e1b385e9aa979d77ca442ff0c4760
MD5 1307d918aea165ecf6d6f4f4b8641780
BLAKE2b-256 47938d4ba602fee4f5562ecb2e66b89efbbefc9c1a1141436161a0c0281d2230

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.16.1-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 bc949aacdcb93b6fb71c72ad4bef35b6faec5f2e00fcaa4502e6543dd80795ea
MD5 b559191fc6f260d4f1d747835499ce73
BLAKE2b-256 034735fea6993dbd232707708613eb57101eb08b46e8a4512425d3678afabcc1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.16.1-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 b66be89679e13484f85e34fa4e7b8c1c4655d677d4ec333b9ac915a90bb473ae
MD5 62c479055daf301d5f70ab413a5386fd
BLAKE2b-256 f0fc23ef15430f60580111109372ff897c94a3a3778377b6cf2bfe6cb3052dda

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.16.1-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 5245ea98f7d6d4b2f493f31c126ac657c2788788a97a132841113a83b2f85e48
MD5 e1b8d78162c37014c5fb0f59b35ce554
BLAKE2b-256 5ad90b18688cd9338912ad24b233beda2f8a81f12fcfad315c00e07ef8a65e73

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.16.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 beb42376adfbcbe8f85cf9dbbacdaa061609b587e600a5cac049330d563bb39b
MD5 4519b9048cfdd80a629368e6d76ea510
BLAKE2b-256 cd2f58ae75a95a57649eed528c694a79ea55184ebfec5ac543705bfe55433dca

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.16.1-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 502bc7b2525a027329163ef12e8426b6e9bcb312ae0b114ec95a41c4864acc4f
MD5 516b9a5e40fc08377a49e925c1603ba0
BLAKE2b-256 971d365839d0021242f9ff45f3f36998ccb1b3f1f2664e066d6b3b47ae4cfed4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.16.1-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 812d63886af2ba24652a808fea328a7d8ec551187e9ee0d9c7e8b76a0308d7cd
MD5 23e1058c8f694fc4c48c6744f868c7ca
BLAKE2b-256 fc0f778a973ea2d7131bc89294751344fd418a28a236753f191ada6ec1a213d5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.16.1-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 f601c535100eaf85fd86929613edc0d006270465debfce8df3d0757b5a40e2d8
MD5 dab1f7514a6cf3801813adb5a6bdf4c9
BLAKE2b-256 4c4882602ae6df7bbc6ae3476c9713f2d35690234b00eae8ba2cc1120ec09b01

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