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

Uploaded Source

Built Distributions

lightweaver-0.11.1-cp312-cp312-win_amd64.whl (12.1 MB view details)

Uploaded CPython 3.12 Windows x86-64

lightweaver-0.11.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (18.9 MB view details)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

lightweaver-0.11.1-cp312-cp312-macosx_10_9_x86_64.whl (4.8 MB view details)

Uploaded CPython 3.12 macOS 10.9+ x86-64

lightweaver-0.11.1-cp312-cp312-macosx_10_9_universal2.whl (4.2 MB view details)

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

lightweaver-0.11.1-cp311-cp311-win_amd64.whl (12.1 MB view details)

Uploaded CPython 3.11 Windows x86-64

lightweaver-0.11.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (19.0 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

lightweaver-0.11.1-cp311-cp311-macosx_10_9_x86_64.whl (4.8 MB view details)

Uploaded CPython 3.11 macOS 10.9+ x86-64

lightweaver-0.11.1-cp311-cp311-macosx_10_9_universal2.whl (4.3 MB view details)

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

lightweaver-0.11.1-cp310-cp310-win_amd64.whl (12.1 MB view details)

Uploaded CPython 3.10 Windows x86-64

lightweaver-0.11.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (18.9 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

lightweaver-0.11.1-cp310-cp310-macosx_10_9_x86_64.whl (4.8 MB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

lightweaver-0.11.1-cp310-cp310-macosx_10_9_universal2.whl (4.3 MB view details)

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

lightweaver-0.11.1-cp39-cp39-win_amd64.whl (12.1 MB view details)

Uploaded CPython 3.9 Windows x86-64

lightweaver-0.11.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (18.9 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

lightweaver-0.11.1-cp39-cp39-macosx_10_9_x86_64.whl (4.8 MB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

lightweaver-0.11.1-cp39-cp39-macosx_10_9_universal2.whl (4.3 MB view details)

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

lightweaver-0.11.1-cp38-cp38-win_amd64.whl (12.1 MB view details)

Uploaded CPython 3.8 Windows x86-64

lightweaver-0.11.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (19.0 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

lightweaver-0.11.1-cp38-cp38-macosx_10_9_x86_64.whl (4.8 MB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

lightweaver-0.11.1-cp38-cp38-macosx_10_9_universal2.whl (4.3 MB view details)

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

File details

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

File metadata

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

File hashes

Hashes for lightweaver-0.11.1.tar.gz
Algorithm Hash digest
SHA256 dee30d5385eb340855703c486e4a1cbe0c621fbcabcbd2b132d55a3b4f655f99
MD5 d9d74c223401deb1e78df91b3ee11fb6
BLAKE2b-256 63d375823e6aeaeed0967386b3e4afb335ce346f14b95df0b6a04a42dbb33975

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.11.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 d7fcf0b0572c5a0f918d90379a14c343d6baec8864401d3c50e5d976129a893b
MD5 b1b785fd33edc06c88c430caf05f4aab
BLAKE2b-256 9630b01b4ca40532803601cf8e04b3041de6632de15bed9fb1ade350f2116868

See more details on using hashes here.

File details

Details for the file lightweaver-0.11.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for lightweaver-0.11.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b1b7f01bd0f63a222252603c35ec17b2868c505c22b45dec9f6b0e92e9f3a366
MD5 8afe4300fc135f694128ffa192096b7a
BLAKE2b-256 e5e95375c0f58397e4b5d1f74eac7b57172a97ac3f0ff9e14e3204597018f055

See more details on using hashes here.

File details

Details for the file lightweaver-0.11.1-cp312-cp312-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for lightweaver-0.11.1-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 d4c68145ba0d17ef5bc3eadabc3b886417826679457b4ae821afb1dc54faec12
MD5 3185124f2ce59797afc89e9d44c27280
BLAKE2b-256 137585377298f2e0f0fffa9e9b63107f6e3a0bec7a0e16280871ef380207bed0

See more details on using hashes here.

File details

Details for the file lightweaver-0.11.1-cp312-cp312-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for lightweaver-0.11.1-cp312-cp312-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 6e47e5ec1bc351c68dfe838746b21176ee6edb5c54f631308edf4c371b92aca2
MD5 1f8a23a7f40bee8b1ea35c2ff2c78ea0
BLAKE2b-256 916be577e0373cbfef6d923983636963c27e8cfd93f45e474459d8945fa73304

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.11.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 6da6478aaa3451068d144b0346397b7470dcc09c49f5688c9340df49efc351db
MD5 d629c0c78c53bff37d38c04e3c5447bf
BLAKE2b-256 11f1aeb822bc224e8bcc466e63cf65ed0da0b010ade34a8dd3028bc0886ba91a

See more details on using hashes here.

File details

Details for the file lightweaver-0.11.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for lightweaver-0.11.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 fffbc3f8874f7767853650d163fdc0ec8c987117f4ab58fb1b61f0b9b99059df
MD5 09ea538e74dab5165d866e7a2be7e1bf
BLAKE2b-256 1b8c3e08e7850508a9d7005ae7a30015eea64e83dbcf923dde6cc7c17d216263

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.11.1-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 00382fb14c83f3bf459627d095f1c4aa907daef871004b89daca296173de9959
MD5 383b5a1c9f1471cf407e5b14694e2a10
BLAKE2b-256 93f3aed2e86db3e0bd77a73fdfeb2facec8fbd5dc697f565383261d189629d62

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.11.1-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 bf82861b8aa97c4d22c86ee93d13e286abd0969c9dee87751abb83788911b287
MD5 c5179a92738373642fb4f85d7dcb7f72
BLAKE2b-256 ea3ce9837fd07dbe5256fe216430523ec4b44740b2d255975206a71659999da4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.11.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 4bfee89179b7e9ce1513569fbd6a6577cdefad0b675a769d4f959a1d5d18483a
MD5 a2cbe04d5e060d7d043906bb32cc392a
BLAKE2b-256 51447c10738d12997bddcd5d73da0b504bbd85ba7115f9dad1f215dfe421a747

See more details on using hashes here.

File details

Details for the file lightweaver-0.11.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for lightweaver-0.11.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c6c2eb43ae8acdb5a7aaf341c085a26ba0cf656ec5fced8f8ea9a3eba806de54
MD5 7ea408df0d106e883b20e2f1b4a910dc
BLAKE2b-256 1de34c9f853c79deb0b15d5d78e9aba4aecc603230f0ef3e96fff0f4d65301cd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.11.1-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 1c1a6d3ffd5fe7ba214fb48a8bcc986792d2a6e29e14ca679b1a758ab98c01a4
MD5 0fcfb3670d1a575cc5437b81f2ec5b49
BLAKE2b-256 07ff5620e4443d4a3eccab8f6e0b74da81a9e8a1fdd827f2c0c2a38d1119a139

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lightweaver-0.11.1-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 69c267238492a387bede5c5aa85e06053e5de0ef46468fd092ac86c307c73c26
MD5 73efcc3090219b4f410ef0b286fba935
BLAKE2b-256 3f14238a64de265941a79fdc4f22487bf2d24894453b50e58733a866b74a3d7c

See more details on using hashes here.

File details

Details for the file lightweaver-0.11.1-cp39-cp39-win_amd64.whl.

File metadata

File hashes

Hashes for lightweaver-0.11.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 2bb0f45401b9d5a95a3c71bbc3230f774d9d7ffd8e877f49a85f95447fa93ca9
MD5 88d1c3a21b6122bbe75fcb899ee035fb
BLAKE2b-256 fa4427810d1c0ceece6fdd4e66b8deebc008529b416e3a164fc045c9a77da476

See more details on using hashes here.

File details

Details for the file lightweaver-0.11.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for lightweaver-0.11.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 458eaa1f82e492f8d9c6415c79258a3d46d99791e482b2bf07b7531143297773
MD5 7911806bd0f1031533e63405a7f81162
BLAKE2b-256 051dcd34bccc97922b39992881f4a9967860242ef2744bf18c863fdf0d27a5e9

See more details on using hashes here.

File details

Details for the file lightweaver-0.11.1-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for lightweaver-0.11.1-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 a1c82edcba30a1de034fc3959d2cddc65e3236b0313cbf806d7e26cced7bd184
MD5 fb5be2e22e2fc351d7d05bb3a0b8e63d
BLAKE2b-256 32811a618ed88b0d1ce7cefeb3f64b6380a80b8f119477f3d32592ccd68b4ce1

See more details on using hashes here.

File details

Details for the file lightweaver-0.11.1-cp39-cp39-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for lightweaver-0.11.1-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 0f51464869e16872a632f9ebcf52414979cab7e29870c48139ee4f4862514aac
MD5 31effc7c38d84938806440f5c647b639
BLAKE2b-256 eb9079acead832a85e545d2ec15e7d5c0ba0496a34f3b6cdb62cbc8fa71ae2c8

See more details on using hashes here.

File details

Details for the file lightweaver-0.11.1-cp38-cp38-win_amd64.whl.

File metadata

File hashes

Hashes for lightweaver-0.11.1-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 90773735eae6f1578a49d72252dbe1cbb9314dc0026bc9dab408ba9f14cd5eeb
MD5 9617dd843e406c08c7f328a363d190e3
BLAKE2b-256 499ff9aed4ef096ff0467c91f572a2ac46ceb7c588f758ad8f9f8700ca562212

See more details on using hashes here.

File details

Details for the file lightweaver-0.11.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for lightweaver-0.11.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 523d35aef500bbda6ff47280083d1f95925f8b1ba24616847fe3d6556766b681
MD5 4f651fb91c7f1dc28d0522dc81ce7899
BLAKE2b-256 8d091934953c3f5f18e965ce848c9511563377edd6590c2248bf2d43353d7a28

See more details on using hashes here.

File details

Details for the file lightweaver-0.11.1-cp38-cp38-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for lightweaver-0.11.1-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 b2d8c7019f16c6a91ceca543102f6a3ecab163cca3bb874a6ae86c918ca8b745
MD5 494065c4d7826a7a0fff2e340d4b9751
BLAKE2b-256 5a1d0fe07a8eef874387514ba12ff198daa99eba547d28c2ecdf4f640a506fe3

See more details on using hashes here.

File details

Details for the file lightweaver-0.11.1-cp38-cp38-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for lightweaver-0.11.1-cp38-cp38-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 db173334e66293c21a11ee2050667dd3d97813fa055cf8e439bb893630c35a5f
MD5 cfe344a877f562bf24eadc12ae9cb4ce
BLAKE2b-256 a7761f995227ef08e93a867a6238253bfe1b58c320d4a5d6fc47d02316da36ac

See more details on using hashes here.

Supported by

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