Skip to main content

A fast line-by-line code for high-resolution infrared molecular spectra

Project description

PyPI Downloads Article Spectral Synthesis Algorithm Documentation Status Binder Slack Contributors Tests Coverage Benchmarks License

RADIS

RADIS is a fast line-by-line code for high resolution infrared molecular spectra (emission / absorption, equilibrium / non-LTE) based on HITRAN/HITEMP/ExoMol. Atomic spectra from the NIST and Kurucz databases are also available.

RADIS includes post-processing tools to compare experimental spectra and spectra calculated with RADIS or other spectral codes.

Full user documentation (advanced install and examples) are available on the RADIS Website.

Getting Started

Install

Assuming you have Python installed with the Anaconda distribution you can use pip:

pip install radis

or mamba or conda via the conda-forge channel:

conda install radis -c conda-forge

That's it! You can now run your first example below. If you encounter any issue, or to upgrade the package later, please refer to the detailed installation procedure.

Quick Start

Calculate a CO equilibrium spectrum from the HITRAN database:

from radis import calc_spectrum
s = calc_spectrum(1900, 2300,         # cm-1
                  molecule='CO',
                  isotope='1,2,3',
                  pressure=1.01325,   # bar
                  Tgas=700,           # K
                  mole_fraction=0.1,
                  path_length=1,      # cm
                  databank='hitran'   # or 'hitemp'
                  )
s.apply_slit(0.5, 'nm')       # simulate an experimental slit
s.plot('radiance')

CO spectrum

Advanced use

The Quick Start examples automatically download the line databases from HITRAN-2016, which is valid for temperatures below 700 K. For high temperature cases, you may need to use other line databases such as HITEMP-2010 (typically T < 2000 K) or CDSD-4000 (T < 5000 K). HITEMP can also be downloaded automatically, or can be downloaded manually and described in a ~/radis.json Configuration file.

More complex examples will require to use the SpectrumFactory class, which is the core of RADIS line-by-line calculations. calc_spectrum is a wrapper to SpectrumFactory for the simple cases.

Compare with experiments

Experimental spectra can be loaded using the experimental_spectrum function and compared with the plot_diff function. For instance:

from numpy import loadtxt
from radis import experimental_spectrum, plot_diff
w, I = loadtxt('my_file.txt').T    # assuming 2 columns
sexp = experimental_spectrum(w, I, Iunit='mW/cm2/sr/nm')
plot_diff(sexp, s)    # comparing with spectrum 's' calculated previously

Typical output of plot_diff:

comparison

Refer to the Examples section for more examples, and to the Spectrum page for more post-processing functions.

GPU Acceleration

RADIS supports GPU acceleration for super-fast computation of spectra. Refer to GPU Spectrum Calculation on RADIS for more details on GPU acceleration.

Try online (no installation needed!)

🌱 Radis-app

A simple web-app for RADIS under development - GitHub

Radis-app

🔬 RADIS-lab

An online environment for advanced spectrum processing and comparison with experimental data:

  • no need to install anything
  • use pre-configured line databases (HITEMP)
  • upload your data files, download your results !

RADIS-lab

See more on GitHub


Cite

Articles are available at Article Spectral Synthesis Algorithm

For reproducibility, do not forget to cite the line database used, and the spectroscopic constants if running nonequilibrium calculations. See How to cite?


Developer Guide

Contribute

Want to contribute to RADIS? Join the Slack community and we'll help you through the process. Want to get started immediately? Nice. Have a look at the Developer Guide.

Contributors Slack

RADIS internals are also described in the full documentation

License

The code is available on this repository under GNU LESSER GENERAL PUBLIC LICENSE (v3) License


References

Links

  • Documentation: Documentation Status

  • Help: Gitter Slack Q&A forum

  • Articles: Article Spectral Synthesis Algorithm

  • Source Code: GitHub Contributors License

  • Test Status: Tests Coverage Benchmarks

  • PyPI Repository: PyPI Downloads

  • Interactive Examples: radis_examples Examples Binder

  • Fitroom (for advanced multidimensional fitting).

Other Spectroscopic tools

See awesome-spectra awesome-spectra


RADIS logo

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

radis-0.17.tar.gz (6.0 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

radis-0.17-py3-none-any.whl (6.1 MB view details)

Uploaded Python 3

File details

Details for the file radis-0.17.tar.gz.

File metadata

  • Download URL: radis-0.17.tar.gz
  • Upload date:
  • Size: 6.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for radis-0.17.tar.gz
Algorithm Hash digest
SHA256 f6a5a144ec24d4faddd2486f5488f7b48e712b75d2e019786eb50b226e65ada8
MD5 30caf5a0c99686c2c64392d412c8e302
BLAKE2b-256 c4810e9cea5a63f3494128df66c4678f431432a5d2d2edc0c92b28daf7d3d5bc

See more details on using hashes here.

Provenance

The following attestation bundles were made for radis-0.17.tar.gz:

Publisher: publish-Pypi.yml on radis/radis

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file radis-0.17-py3-none-any.whl.

File metadata

  • Download URL: radis-0.17-py3-none-any.whl
  • Upload date:
  • Size: 6.1 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for radis-0.17-py3-none-any.whl
Algorithm Hash digest
SHA256 d02e1dd47eda3d0083aaa667cfd01e5ad629a814501c91103cff49ab625ccb9d
MD5 9d9db249f46ced68f2fab0328f772ad6
BLAKE2b-256 ff2b38ce1f3b0c27766569384a43238c1f5d6e64deb166ac7281dbd8b5ad88ac

See more details on using hashes here.

Provenance

The following attestation bundles were made for radis-0.17-py3-none-any.whl:

Publisher: publish-Pypi.yml on radis/radis

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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