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

Uploaded Source

Built Distributions

lightweaver-0.2.3-cp38-cp38-win_amd64.whl (3.1 MB view details)

Uploaded CPython 3.8 Windows x86-64

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

Uploaded CPython 3.8 Windows x86

lightweaver-0.2.3-cp38-cp38-manylinux2010_x86_64.whl (6.6 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.12+ x86-64

lightweaver-0.2.3-cp38-cp38-manylinux1_x86_64.whl (6.6 MB view details)

Uploaded CPython 3.8

lightweaver-0.2.3-cp38-cp38-macosx_10_9_x86_64.whl (3.3 MB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

File details

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

File metadata

  • Download URL: lightweaver-0.2.3.tar.gz
  • Upload date:
  • Size: 3.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.5

File hashes

Hashes for lightweaver-0.2.3.tar.gz
Algorithm Hash digest
SHA256 4dc064685c64136fea13ed84cc516033fb4f32547f7609029814048d1835c39c
MD5 c631b6b3712e88621aa5a93916f2da51
BLAKE2b-256 5fa4fd6ec34817177ce08853dc5dd6b4802cc9faf755a83efc0dae61ed6dab0e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: lightweaver-0.2.3-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 3.1 MB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.5

File hashes

Hashes for lightweaver-0.2.3-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 509b310e126ebad859633d1312b52935c5e0ad46016f9568af7a451e911dd2a0
MD5 4b6573bd88bee176ce68686ffb3dd481
BLAKE2b-256 87672ee643d0ad1019f28b1890ba0cfb489791c6c0de8feee15855f7e6df261a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: lightweaver-0.2.3-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.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.5

File hashes

Hashes for lightweaver-0.2.3-cp38-cp38-win32.whl
Algorithm Hash digest
SHA256 2ddfc2ffb0c1259c3ba0fefe85b0f7c33496dbf2ad449fbf81c6a4356a985727
MD5 265587dd86e0025e45ed299f336f043e
BLAKE2b-256 2f7d5bdce50f00678543ed723d8aa0c86c51bd3ac28673a8a2e4ca63ec94fdf5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: lightweaver-0.2.3-cp38-cp38-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 6.6 MB
  • Tags: CPython 3.8, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.5

File hashes

Hashes for lightweaver-0.2.3-cp38-cp38-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 b658c21304e2ab718f3ba27eea8d2d3a048952fb44b80afa5267b8bd0b36dbc9
MD5 7d16ed8797f672679dcd30cfdf5d4c38
BLAKE2b-256 9f982cfd61e4964a75c20149c581a06db3936e03c0195f9b54aaf85f5a549a5e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: lightweaver-0.2.3-cp38-cp38-manylinux1_x86_64.whl
  • Upload date:
  • Size: 6.6 MB
  • Tags: CPython 3.8
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.5

File hashes

Hashes for lightweaver-0.2.3-cp38-cp38-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 510f76617f22986e5e843f640667e22a5985bee22b6cc77e24b4503408449ce2
MD5 3ad0c3a4c1ff58b32832166d6c61a012
BLAKE2b-256 65dace67fcbafcf9d5a10131a7b24d3734dd175c83e3eecfed386db36c406293

See more details on using hashes here.

File details

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

File metadata

  • Download URL: lightweaver-0.2.3-cp38-cp38-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 3.3 MB
  • Tags: CPython 3.8, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.5

File hashes

Hashes for lightweaver-0.2.3-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 ba479f529256319647bbffff353e5b5c6dfa82e2f527bef9e96289382995a5da
MD5 3ed190101d83347d37d41613243aad67
BLAKE2b-256 2748468cdf6a3c37eba19b5399dbaa55d92331505aabf9f83bc1d53d4014b586

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