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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.8 Windows x86-64

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

Uploaded CPython 3.8 Windows x86

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

Uploaded CPython 3.8 manylinux: glibc 2.12+ x86-64

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

Uploaded CPython 3.8

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

Uploaded CPython 3.8 macOS 10.9+ x86-64

lightweaver-0.2.2-cp37-cp37m-win_amd64.whl (990.0 kB view details)

Uploaded CPython 3.7m Windows x86-64

lightweaver-0.2.2-cp37-cp37m-win32.whl (938.5 kB view details)

Uploaded CPython 3.7m Windows x86

lightweaver-0.2.2-cp37-cp37m-manylinux2010_x86_64.whl (6.1 MB view details)

Uploaded CPython 3.7m manylinux: glibc 2.12+ x86-64

lightweaver-0.2.2-cp37-cp37m-manylinux1_x86_64.whl (6.1 MB view details)

Uploaded CPython 3.7m

lightweaver-0.2.2-cp37-cp37m-macosx_10_9_x86_64.whl (3.3 MB view details)

Uploaded CPython 3.7m macOS 10.9+ x86-64

File details

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

File metadata

  • Download URL: lightweaver-0.2.2.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.2.tar.gz
Algorithm Hash digest
SHA256 bbf845ce6a556b805d2f3506b1b2d5912b32840ccb358b3c37adf3a21c17a7d6
MD5 beb41a9cd7784aebc637fcf4a23cf7da
BLAKE2b-256 da388edd2782ccb9b122d2fb1ff190e6ac12d73b003fedda02bfcdc8fe5a19ff

See more details on using hashes here.

File details

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

File metadata

  • Download URL: lightweaver-0.2.2-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.2-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 063bc684af26d0696c4ff9fd605883aceac955c54c8acd937dec4d195df12559
MD5 6c971adc3a1d7955d0750cc92bb743e6
BLAKE2b-256 b1a0ffc467d5dd4c3880298701a99d07135b64253dd31786018918a7d0f36bf5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: lightweaver-0.2.2-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.2-cp38-cp38-win32.whl
Algorithm Hash digest
SHA256 51a4e7ef3d2eadd96ecdea620f572936bca44f570b1559cd1eae02381c5ed7a4
MD5 84aedde244468a985b8e94d4267b046c
BLAKE2b-256 29b4cdf162fbbf6cbdbf5451f303115ebea20b3c3b815cbd62c9aebe028bbdef

See more details on using hashes here.

File details

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

File metadata

  • Download URL: lightweaver-0.2.2-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.2-cp38-cp38-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 c427398aacfc53dd02cf0c2347485f2dcb92da0414c0dc7688e76fc66f7b3dbc
MD5 96e08c336cd9b78a79f56bffd9cbacb5
BLAKE2b-256 601c51581cbce2bdf77828441563a8ed54de0b4e58a39bb10d87a8a78143bc6e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: lightweaver-0.2.2-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.2-cp38-cp38-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 052590c84f7acbd0fac72f2e718fded6049d214282943ebf4bcf7b144d925702
MD5 d4109c2392f6ee3f7a1af097722fdb88
BLAKE2b-256 9bad5c48875e757848cc156e1fcd1343c4820c567c19fbc3a7b73622522fb90c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: lightweaver-0.2.2-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.2-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 7a561bd80133bef362baba2117fe10c1182297a866050cc80a6bf8de3fccca29
MD5 1d6f2e2018a8a28f36e0c1d625881233
BLAKE2b-256 46a3623bcf78b597ec9ad4f64581bee669d8335800dadabb1553ab45ff310c2a

See more details on using hashes here.

File details

Details for the file lightweaver-0.2.2-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: lightweaver-0.2.2-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 990.0 kB
  • Tags: CPython 3.7m, 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.2-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 72c8d220e2a4dc7c18e9a1e03cd46f8d2e9e53dfb8f1fc1970b7d9652d1e44d3
MD5 0e2517dbc8b20657a331d3c8a832c86e
BLAKE2b-256 7aad7a840ee191db242330628ff63cd568391bd73d476eddde0a195590e6b770

See more details on using hashes here.

File details

Details for the file lightweaver-0.2.2-cp37-cp37m-win32.whl.

File metadata

  • Download URL: lightweaver-0.2.2-cp37-cp37m-win32.whl
  • Upload date:
  • Size: 938.5 kB
  • Tags: CPython 3.7m, 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.2-cp37-cp37m-win32.whl
Algorithm Hash digest
SHA256 797f7a128afcefa8772cb719683aca1e23a3f4393a550ea43533a2c89409fde3
MD5 30b544bedad4977913491a84d1f99e71
BLAKE2b-256 4c0f2f7cb4fc4c7ca5ec3cc4350f66c1c85d9ba80885bc9cc15c09aadd009c28

See more details on using hashes here.

File details

Details for the file lightweaver-0.2.2-cp37-cp37m-manylinux2010_x86_64.whl.

File metadata

  • Download URL: lightweaver-0.2.2-cp37-cp37m-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 6.1 MB
  • Tags: CPython 3.7m, 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.2-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 5a4e333db47ac72754c2d303a0ced60daefca95035df72f68b8ea30a495d6bb2
MD5 b1846023056ad99d9c70ddc08a01c21a
BLAKE2b-256 21d98a35dba29215c772906fabd13ad9d3bae2ed3d52905b4099953b7b0a1246

See more details on using hashes here.

File details

Details for the file lightweaver-0.2.2-cp37-cp37m-manylinux1_x86_64.whl.

File metadata

  • Download URL: lightweaver-0.2.2-cp37-cp37m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 6.1 MB
  • Tags: CPython 3.7m
  • 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.2-cp37-cp37m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 d2ac07bbfbc3677e5885cbb3668f1dfb15da7ac27d2b49d0b863e22ca3a138c5
MD5 de9a56adaa2f66d8217a21bbd262628b
BLAKE2b-256 dd71e39b177283209f6cc50f40f4816b8468f684944d46c99080e53b469b4704

See more details on using hashes here.

File details

Details for the file lightweaver-0.2.2-cp37-cp37m-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: lightweaver-0.2.2-cp37-cp37m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 3.3 MB
  • Tags: CPython 3.7m, 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.2-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 fee16516345bc7f21a63cb0742fd8df5101ee698ae1777d4ed612d992fed8883
MD5 4fa7bfadfd6667a7175d7a9ee5ee077e
BLAKE2b-256 28c089211d3d8e83575de7ca2a493c7ab50603a3fd0d98623019f4c99c00aa64

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