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-2020

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 (wavelength parallelisation in progress) or 1.5D parallel columns with ProcessPool or MPI parallelisation. There is also preliminary support for 2D atmospheres.

Whilst the core numerics are implented 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). These bindings could be rewritten in another language, so long as the same information can be provided to the C++ core.

The aim of Lightweaver is to provide an NLTE Framework, rather than a "code". That is to say, it should be more maleable, 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 well-recieved 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

Documentation is currently lacking, although it is currently being produced. I suggest looking through the samples repository (in particular the Simple*.py) to gain an understanding of the basic functionality and interfaces. These samples are kept as up to date as possible.

Feel free to 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.3.1.tar.gz (3.2 MB view details)

Uploaded Source

Built Distributions

lightweaver-0.3.1-cp38-cp38-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.8 Windows x86-64

lightweaver-0.3.1-cp38-cp38-win32.whl (3.1 MB view details)

Uploaded CPython 3.8 Windows x86

lightweaver-0.3.1-cp38-cp38-manylinux2010_x86_64.whl (7.0 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.12+ x86-64

lightweaver-0.3.1-cp38-cp38-manylinux1_x86_64.whl (7.0 MB view details)

Uploaded CPython 3.8

lightweaver-0.3.1-cp38-cp38-macosx_10_9_x86_64.whl (3.4 MB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

File details

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

File metadata

  • Download URL: lightweaver-0.3.1.tar.gz
  • Upload date:
  • Size: 3.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.6

File hashes

Hashes for lightweaver-0.3.1.tar.gz
Algorithm Hash digest
SHA256 816dc502bcf8744b61fd148994c55c20550ddef4cadc2d1368d7a1e4f6137350
MD5 e7a605ddec3752399ff71bbdb17f44f4
BLAKE2b-256 cd6e8312e3ceb6833ce38b9603b0e0b2102554906575e91519533035e9c60c83

See more details on using hashes here.

File details

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

File metadata

  • Download URL: lightweaver-0.3.1-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 3.2 MB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.6

File hashes

Hashes for lightweaver-0.3.1-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 ed84595cf1c45baee005bc5d7de2907b244033dd9425528ae69f6682c96d7b95
MD5 013a5850f086c34a741d91351224cafe
BLAKE2b-256 2ab87f6bc45bd559910ef0ca6ab0027f3055ab0d59a06f0c260cef32f99f7b2a

See more details on using hashes here.

File details

Details for the file lightweaver-0.3.1-cp38-cp38-win32.whl.

File metadata

  • Download URL: lightweaver-0.3.1-cp38-cp38-win32.whl
  • Upload date:
  • Size: 3.1 MB
  • Tags: CPython 3.8, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.6

File hashes

Hashes for lightweaver-0.3.1-cp38-cp38-win32.whl
Algorithm Hash digest
SHA256 5ec1347aa8a9f6d60af89aa082073fc8ea5238a03bbeac42c439c236d6db0b65
MD5 8de1537490b6baf354c37750b8eaf939
BLAKE2b-256 f15480ecef783a82834b3e7cae91cd4aa784397bf34534539c7fdd3c0729b09e

See more details on using hashes here.

File details

Details for the file lightweaver-0.3.1-cp38-cp38-manylinux2010_x86_64.whl.

File metadata

  • Download URL: lightweaver-0.3.1-cp38-cp38-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 7.0 MB
  • Tags: CPython 3.8, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.6

File hashes

Hashes for lightweaver-0.3.1-cp38-cp38-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 b5936d1686d4e751e684425c867bfdd72d7cea1cae7ed160d0825d36a64aa06f
MD5 1b54f49350b1bf9b981f9ccf5dd00fe7
BLAKE2b-256 502292ce74de60a9d814dc3205633a50805ef5836c41740df02203d1d848276e

See more details on using hashes here.

File details

Details for the file lightweaver-0.3.1-cp38-cp38-manylinux1_x86_64.whl.

File metadata

  • Download URL: lightweaver-0.3.1-cp38-cp38-manylinux1_x86_64.whl
  • Upload date:
  • Size: 7.0 MB
  • Tags: CPython 3.8
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.6

File hashes

Hashes for lightweaver-0.3.1-cp38-cp38-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 9fbf09bf7617249f74f7c2ab764187d9d1d6b7e48ca98024015285bd8e627bcf
MD5 17bff0317c510f402328741aa80e4adc
BLAKE2b-256 f1393ef83c580adf830179d19c48a52e0d4704a8c9fabb7ca9d155dc845d6338

See more details on using hashes here.

File details

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

File metadata

  • Download URL: lightweaver-0.3.1-cp38-cp38-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 3.4 MB
  • Tags: CPython 3.8, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.6

File hashes

Hashes for lightweaver-0.3.1-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 dbcb3bb3b2a6edf93dd478f7e9b43de09387fade019f18b3df04d19a0ae9493f
MD5 d3ab715dbe46ce11fec271eab08c2a55
BLAKE2b-256 8033b7adf27f5aa8bd1dcf71c52b32c36a2c1c98e7215c54c4ec99c48a017ebb

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