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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.8 Windows x86-64

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

Uploaded CPython 3.8 Windows x86

lightweaver-0.6.0-cp38-cp38-manylinux2010_x86_64.whl (6.9 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.12+ x86-64

lightweaver-0.6.0-cp38-cp38-manylinux1_x86_64.whl (6.9 MB view details)

Uploaded CPython 3.8

lightweaver-0.6.0-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.6.0.tar.gz.

File metadata

  • Download URL: lightweaver-0.6.0.tar.gz
  • Upload date:
  • Size: 3.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.8.10

File hashes

Hashes for lightweaver-0.6.0.tar.gz
Algorithm Hash digest
SHA256 1bee309ab6033d16b3da00a53a4df7bf12e91c172c42f99a82ba604e3a8f00d4
MD5 a24852f1d09fed47de12ab838a416dd2
BLAKE2b-256 b134567c5924f9e9ee7f17ac5fe409b6b1335a89a9d05eead620fabbd32f5c80

See more details on using hashes here.

File details

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

File metadata

  • Download URL: lightweaver-0.6.0-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.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.8.10

File hashes

Hashes for lightweaver-0.6.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 57a881ab1acd9f8a36b78794cfcf1ea045463c0de1e23de9d560210268cb07b8
MD5 c7b367526593cf4738217c685a9fedd2
BLAKE2b-256 acf7b966db41d41a60a91e0cf81bde1f8de518b93f54d485237609ae9ff8e7f1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: lightweaver-0.6.0-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.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.8.10

File hashes

Hashes for lightweaver-0.6.0-cp38-cp38-win32.whl
Algorithm Hash digest
SHA256 8288136c7c335d3e94a9dd2dbcd1e0f3fc964ef3b001983bebdb573cfd2fb557
MD5 ab557f178deeb9c06e5ef0e69bc973f7
BLAKE2b-256 8da589fbf2013b28f4ce3dd4f91b26d2568b1c4b2050e119308464e7ddfaad61

See more details on using hashes here.

File details

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

File metadata

  • Download URL: lightweaver-0.6.0-cp38-cp38-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 6.9 MB
  • Tags: CPython 3.8, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.8.10

File hashes

Hashes for lightweaver-0.6.0-cp38-cp38-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 9df32927613e1bf978e7dca086a64476335b8fefad00af9f39327153f199b4dd
MD5 457b205ffbca538f87f87498ca983869
BLAKE2b-256 4e8c470163aea3cc45c8835e99b967a94e6b9c2a6a6bfa97bbb1f997da625c50

See more details on using hashes here.

File details

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

File metadata

  • Download URL: lightweaver-0.6.0-cp38-cp38-manylinux1_x86_64.whl
  • Upload date:
  • Size: 6.9 MB
  • Tags: CPython 3.8
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.8.10

File hashes

Hashes for lightweaver-0.6.0-cp38-cp38-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 8b9398a00ccc92763558abc49372e9e2bae45e9e52081bbd5da8ba5ce2aaa699
MD5 b1cf9a10240ec34029e5716d58affbe1
BLAKE2b-256 085d761465b295fe6290ba919bfdc9a0952551b8088771bcbc9e4355b1bbaf9b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: lightweaver-0.6.0-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.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.8.10

File hashes

Hashes for lightweaver-0.6.0-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 06caf6fc0b93286b9b564a667e045da1ce9133a0f2cfaede085e5bea0927d1f8
MD5 b1d7e6a64f1494ae940c073c95bd1e4e
BLAKE2b-256 7bb72bc34d507c26f52007fe0d296f6facbe222226ff50040ff96b4fbe6ea209

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