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

radis, updated πŸ•₯ 2023-03-27 17:52:30

| |badge_pypi| |badge_pypistats| |badge_article1| |badge_article2| |badge_docs| |badge_binder| | |badge_slack| |badge_contributors| |badge_travis| |badge_coverage| |badge_code_quality| |badge_asv| |badge_license|


RADIS <https://radis.readthedocs.io/>__


RADIS is a fast line-by-line code for high resolution infrared molecular spectra (emission / absorption, equilibrium / non-LTE) based on HITRAN/HITEMP/ExoMol.

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

User guide, install procedure and examples are available on the RADIS Website <http://radis.readthedocs.io/>__:

=============== Getting Started ===============

Install

Assuming you have Python installed with pip then use this command to install::

pip install radis -v

if you want to install radis through conda then use this command to ::

conda install radis -c conda-forge

or with mamba::

mamba install radis

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 <https://radis.readthedocs.io/en/latest/dev/developer.html#label-install>__ .

Quick Start

Calculate a CO equilibrium spectrum from the HITRAN database, using the calc_spectrum <https://radis.readthedocs.io/en/latest/source/radis.lbl.calc.html#radis.lbl.calc.calc_spectrum> function. Output is a Spectrum object <https://radis.readthedocs.io/en/latest/spectrum/spectrum.html#label-spectrum>: ::

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')

.. figure:: https://radis.readthedocs.io/en/latest/_images/co_spectrum_700K.png :scale: 60 %

Advanced use

The Quick Start examples automatically downloads the line databases from HITRAN-2016 <https://radis.readthedocs.io/en/latest/references/references.html#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 <https://radis.readthedocs.io/en/latest/references/references.html#hitemp-2010> (typically T < 2000 K) or CDSD-4000 <https://radis.readthedocs.io/en/latest/references/references.html#cdsd-4000> (T < 5000 K). HITEMP can also be downloaded automatically, or can be downloaded manually and described in a ~/radis.json Configuration file <https://radis.readthedocs.io/en/latest/lbl/lbl.html#label-lbl-config-file>.

More complex examples <https://radis.readthedocs.io/en/latest/examples.html#label-examples> will require to use the SpectrumFactory <https://radis.readthedocs.io/en/latest/source/radis.lbl.factory.html#radis.lbl.factory.SpectrumFactory> class, which is the core of RADIS line-by-line calculations. calc_spectrum <https://radis.readthedocs.io/en/latest/source/radis.lbl.calc.html#radis.lbl.calc.calc_spectrum> is a wrapper to SpectrumFactory <https://radis.readthedocs.io/en/latest/source/radis.lbl.factory.html#radis.lbl.factory.SpectrumFactory> for the simple cases.

Compare with experiments

Experimental spectra can be loaded using the experimental_spectrum <https://radis.readthedocs.io/en/latest/source/radis.spectrum.models.html#radis.spectrum.models.experimental_spectrum> function and compared with the plot_diff <https://radis.readthedocs.io/en/latest/source/radis.spectrum.compare.html#radis.spectrum.compare.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 <https://radis.readthedocs.io/en/latest/source/radis.spectrum.compare.html#radis.spectrum.compare.plot_diff>__:

.. image:: docs/spectrum/cdsd4000_vs_hitemp_3409K.svg :scale: 60 % :target: https://radis.readthedocs.io/en/latest/spectrum/spectrum.html#compare-two-spectra :alt: https://radis.readthedocs.io/en/latest/_images/cdsd4000_vs_hitemp_3409K.svg

Refer to the Examples <https://radis.readthedocs.io/en/latest/examples/examples.html> section for more examples, and to the Spectrum page <https://radis.readthedocs.io/en/latest/spectrum/spectrum.html> for more post-processing functions.

GPU Acceleration

RADIS supports GPU acceleration for super-fast computation of spectra::

from radis import SpectrumFactory
from radis.tools.plot_tools import ParamRange

sf = SpectrumFactory(
    2100,
    2400,  # cm-1
    molecule="CO2",
    isotope="1,2,3",
    wstep=0.002,
)

sf.fetch_databank("hitemp")

s = sf.eq_spectrum_gpu_interactive(
    var="radiance",
    Tgas=ParamRange(300.0, 2500.0, 1100.0),  # K
    pressure=ParamRange(0.1, 2, 1),  # bar
    mole_fraction=ParamRange(0, 1, 0.8),
    path_length=ParamRange(0, 1, 0.2),  # cm
    slit_FWHM=ParamRange(0, 1.5, 0.24),  # cm-1
    emulate=False,  # runs on GPU
    plotkwargs={"nfig": "same", "wunit": "nm"},
)

.. image:: https://raw.githubusercontent.com/dcmvdbekerom/radis/gpu_widget_new_branch/docs/examples/GPU_spectrum.png

Refer to GPU Spectrum Calculation on RADIS <https://radis.readthedocs.io/en/latest/lbl/lbl.html#calculating-spectrum-using-gpu>__ for more details on GPU acceleration.

======================================= 🌱 Try online (no installation needed!) =======================================

radis-app

A simple web-app for RADIS under development.

.. image:: https://user-images.githubusercontent.com/16088743/103406077-b2457100-4b59-11eb-82c0-e4de027a91c4.png :target: https://radis.app/ :alt: https://radis.app/

See more on GitHub <https://github.com/suzil/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 !

.. image:: https://user-images.githubusercontent.com/16088743/103448773-7d8f0200-4c9e-11eb-8bf1-ce3385519b77.png :target: https://radis.github.io/radis-lab/ :alt: https://radis.github.io/radis-lab/

🌱 Try it : https://radis.github.io/radis-lab/

See more on GitHub <https://github.com/radis/radis-lab>__


==== Cite ====

Articles are available at |badge_article1| |badge_article2|

For reproducibility, do not forget to cite the line database used, and the spectroscopic constants if running nonquilibrium calculations. See How to cite? <https://radis.readthedocs.io/en/latest/references/references.html#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 immediatly ? Nice. Have a look at the CONTRIBUTING.md <./CONTRIBUTING.md>__ guide.

|badge_contributors| |badge_slack|

You need to know more about Spectroscopy ? We're working on Tutorials to make spectroscopy available to everyone. For the moment, join the Slack channel <https://radis-radiation.slack.com/archives/C01N7R9728M>__ .

Architecture

RADIS internals are described in the Developer Guide <https://radis.readthedocs.io/en/latest/dev/developer.html>__

.. image:: https://radis.readthedocs.io/en/latest/_images/RADIS_flow_chart.svg :target: https://radis.readthedocs.io/en/latest/dev/architecture.html#label-dev-architecture :alt: https://radis.readthedocs.io/en/latest/_images/RADIS_flow_chart.svg

Matlab

Matlab users can seamlessly access Python modules

Here's what's you'll need:

  1. Setup Python ↔ Matlab interface.
  2. Install RADIS in Python as at the top of this Readme.
  3. From Matlab, verify everything is working by:
    ```
    py.radis.calc_spectrum()
    ```
    

License

The code is available on this repository under GNU LESSER GENERAL PUBLIC LICENSE (v3) <./LICENSE>_ |badge_license|

Support

If encountering any problem, first refer to the list of known Issues <https://github.com/radis/radis/issues?utf8=%E2%9C%93&q=is%3Aissue>__ on GitHub. We appreciate your feedback and suggestions!

For any question, please join the discussion channel on Gitter |badge_gitter|, Slack |badge_slack| or the Q&A Forum <https://groups.google.com/forum/#!forum/radis-radiation>__

Finally, you can also suggest or vote for new features below:

.. image:: https://feathub.com/radis/radis?format=svg :target: https://feathub.com/radis/radis


========== References ==========

Links

  • Documentation: |badge_docs|

  • Help: |badge_gitter| |badge_slack| Q&A forum <https://groups.google.com/forum/#!forum/radis-radiation>__

  • Articles: |badge_article1| |badge_article2|

  • Source Code: |badge_stars| |badge_contributors| |badge_license|

  • Test Status: |badge_travis| |badge_coverage| |badge_asv|

  • PyPi Repository: |badge_pypi| |badge_pypistats|

  • Interactive Examples: radis_examples <https://github.com/radis/radis-examples>__ |badge_examples| |badge_binder|

  • Fitroom <https://github.com/radis/fitroom>__ (for advanced multidimensional fitting).

Other Spectroscopic tools

See awesome-spectra <https://github.com/erwanp/awesome-spectra>__ |badge_awesome_spectra|


.. image:: https://github.com/radis/radis/blob/master/docs/radis_ico.png :target: https://radis.readthedocs.io/ :scale: 50 % :alt: RADIS logo

.. |CO2| replace:: CO\ :sub:2

.. |badge_docs| image:: https://readthedocs.org/projects/radis/badge/ :target: https://readthedocs.org/projects/radis/ :alt: Documentation Status

.. |badge_article1| image:: https://zenodo.org/badge/doi/10.1016/j.jqsrt.2018.09.027.svg :target: https://linkinghub.elsevier.com/retrieve/pii/S0022407318305867 :alt: Article

.. |badge_article2| image:: https://zenodo.org/badge/doi/10.1016/j.jqsrt.2020.107476.svg :target: https://linkinghub.elsevier.com/retrieve/pii/S0022407320310049 :alt: Spectral Synthesis Algorithm

.. |badge_stars| image:: https://img.shields.io/github/stars/radis/radis.svg?style=social&label=Star :target: https://github.com/radis/radis/stargazers :alt: GitHub

.. |badge_contributors| image:: https://img.shields.io/github/contributors/radis/radis.svg :target: https://github.com/radis/radis/graphs/contributors :alt: Contributors

.. |badge_license| image:: https://img.shields.io/badge/License-LGPL3-blue.svg :target: ./License.md :alt: License

.. |badge_travis| image:: https://img.shields.io/travis/radis/radis.svg :target: https://travis-ci.com/radis/radis :alt: Tests

.. |badge_coverage| image:: https://codecov.io/gh/radis/radis/branch/develop/graph/badge.svg :target: https://codecov.io/gh/radis/radis :alt: Coverage

.. |badge_code_quality| image:: https://img.shields.io/lgtm/grade/python/g/radis/radis.svg?logo=lgtm&logoWidth=18) :target: https://lgtm.com/projects/g/radis/radis/alerts :alt: Code Quality

.. |badge_asv| image:: http://img.shields.io/badge/benchmarked%20by-asv-blue.svg?style=flat :target: https://github.com/radis/radis-benchmark :alt: Benchmarks

.. |badge_pypi| image:: https://img.shields.io/pypi/v/radis.svg :target: https://pypi.python.org/pypi/radis :alt: PyPI

.. |badge_pypistats| image:: https://img.shields.io/pypi/dw/radis.svg :target: https://pypistats.org/packages/radis :alt: Downloads

.. |badge_examples| image:: https://img.shields.io/github/stars/radis/radis-examples.svg?style=social&label=Star :target: https://github.com/radis/radis-examples :alt: Examples

.. |badge_awesome_spectra| image:: https://img.shields.io/github/stars/erwanp/awesome-spectra.svg?style=social&label=Star :target: https://github.com/erwanp/awesome-spectra :alt: Examples

.. |badge_binder| image:: https://mybinder.org/badge.svg :target: https://radis.github.io/radis-lab/ :alt: https://radis.github.io/radis-lab/

.. |badge_gitter| image:: https://badges.gitter.im/Join%20Chat.svg :target: https://gitter.im/radis-radiation/community :alt: Gitter

.. |badge_slack| image:: https://img.shields.io/badge/slack-join-green.svg?logo=slack :target: https://radis.github.io/slack-invite/ :alt: Slack

Issues

Bug Report: Is the HITRAN data in Radis corrected?

opened on 2023-03-29 09:16:00 by zysssss

πŸ› Describe the bug

The molecular spectral line intensity in the HITRAN database as a function of temperature was measured experimentally at 298 K. Therefore, if calculations need to be performed at different temperatures, temperature correction of the spectral line intensity is required.The spectral line intensity in the HITRAN database is measured at standard atmospheric pressure, so if calculations need to be made at different pressures, pressure correction of spectral line intensity is required.

πŸ’‘ Possible solutions

The HITRAN database is corrected before calculation.

🎲 Radis version

radis online

πŸ’» Operating system

Windows

loader.py

opened on 2023-03-24 09:15:26 by mragank02

Line 1768, the small change of "path" to "filtered_path"

When I tried to run the code, the "h5" was deleted and error was shown that the desired "h5" file was not found. I got the follwoing error:

Loading Line databank Opening file C:\Users\mraga\Databases\cdsd4000\CDSD4000_4150_5650\cdsd_01768_01770.h5 (format=CDSD 4000, cache=True) Last Modification time: Mon Feb 20 15:58:05 2023 File C:\Users\mraga\Databases\cdsd4000\CDSD4000_4150_5650\cdsd_01768_01770.h5 deprecated: Metadata in file C:\Users\mraga\Databases\cdsd4000\CDSD4000_4150_5650\cdsd_01768_01770.h5 dont match expected values. See comparison below: Expected File Key Expected Got


last_modificationMon Feb 20 15:58:05 2023 Mon May 31 07:59:56 2010

Deleting it! Traceback (most recent call last): File "C:\Users\mraga\Mragank_tuto_CO2_CDSD.py", line 32, in sf.load_databank('CDSD4000_4150_5650', load_energies=True, load_columns='all') File "C:\Users\mraga\anaconda3\lib\site-packages\radis\lbl\loader.py", line 1625, in load_databank self.df0 = self._load_databank( File "C:\Users\mraga\anaconda3\lib\site-packages\radis\lbl\loader.py", line 2354, in _load_databank df = load_and_concat(database) File "C:\Users\mraga\anaconda3\lib\site-packages\radis\lbl\loader.py", line 2242, in load_and_concat df = cdsd2df( File "C:\Users\mraga\anaconda3\lib\site-packages\radis\api\cdsdapi.py", line 283, in cdsd2df df = parse_hitran_file(fname, columns) File "C:\Users\mraga\anaconda3\lib\site-packages\radis\api\tools.py", line 45, in parse_hitran_file data = _read_hitran_file( File "C:\Users\mraga\anaconda3\lib\site-packages\radis\api\tools.py", line 130, in _read_hitran_file return np.fromfile(fname, dtype=dt, count=count) FileNotFoundError: [Errno 2] No such file or directory: 'C:\Users\mraga\Databases\cdsd4000\CDSD4000_4150_5650\cdsd_01768_01770.h5' 4:40

So basically, it deleted the file by itself and gave me the error that the file was not found! . . .

Description

This pull request is to address ...

Fixes #

Bug Report: Issue installing radis on M1 Mac

opened on 2023-03-21 21:23:23 by kevinmonisit

πŸ› Describe the bug

Specifications: MacOS Ventura 13.0 Macbook Pro, M1 Python 3.9.2 Pip 23.0.1

When running the command pip3 install -r requirements.txt, I will get the following error:

```bash Installing build dependencies ... done Getting requirements to build wheel ... error error: subprocess-exited-with-error

Γ— Getting requirements to build wheel did not run successfully. β”‚ exit code: 1 ╰─> [10 lines of output] ld: library not found for -lhdf5 clang: error: linker command failed with exit code 1 (use -v to see invocation) cpuinfo failed, assuming no CPU features: 'flags' * Using Python 3.9.2 (v3.9.2:1a79785e3e, Feb 19 2021, 09:08:59) * Found cython 0.29.33 * USE_PKGCONFIG: True .. ERROR:: Could not find a local HDF5 installation. You may need to explicitly state where your local HDF5 headers and library can be found by setting the HDF5_DIR environment variable or by using the --hdf5 command-line option. [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error ```

This is similar to the bug that I found while trying to install radis-app. See https://github.com/suzil/radis-app/issues/683

πŸ’‘ Possible solutions

The solution that helped was bash brew install hdf5 export HDF5_DIR=/opt/homebrew/opt/hdf5 export BLOSC_DIR=/opt/homebrew/opt/c-blosc

I got the solution from here: https://stackoverflow.com/questions/73029883/could-not-find-hdf5-installation-for-pytables-on-m1-mac

Seems to be an error specific to hdf5, homebrew, and M1 Macs. I noticed that I did not have hdf5 already installed on my Mac.

Should this be added to the README.md for any future M1 users of Radis?

🎲 Radis version

Latest version on GitHub

πŸ’» Operating system

MacOS

πŸš€ Feature:

opened on 2023-03-19 13:44:20 by Rockyuo666

πŸ”– Feature description

How to accelerate the compute time when I use radis for multi spectrum calculating with different Tvib、Trot、mole fraction and pressure? The time of Calculated nonequilibrium populations and Checked nonequilibrium parameters cost much time when running, How can I reduce its time.

πŸ‘‰ Why you want this feature!!

I want to use radis for multiprocessing computeing for different spectrum, but the time consuming is unacceptable.

Upper bound version constraint on Numpy?

opened on 2023-02-16 13:44:36 by nollety

I was wondering why does radis sets an upper bound version constraint on Numpy in its setup file?

πŸ› Describe the issue

When adding radis to a Python environment where a version of Numpy larger than 1.22.3 is required (either from the current project, or from other dependencies), the package manager is going to run into a resolution error as radis requires numpy<=1.22.3.

🎯 Expected behavior

Usually, it is not recommended to have upper bound version constraint for dependencies, but I don't know there are specific reasons here to avoid Numpy versions larger than 1.22.3?

πŸ’‘ Possible solutions

Unless radis is incompatible with numpy>1.22.3, we could simply update the constraint set by this line in the setup.py file (similarly in the development conda environment file) to: python "numpy>=1.22.3" (perhaps a typo changed > into <?)

If I change numpy>=1.22.3 to numpy, in environment.yml and let conda determine what version of Numpy to install, it picks 1.23.5 (latest version at the time of writing is 1.24.2). If I run the tests with this change, I have all tests passing.


Tip : you can vote for New Features on https://feathub.com/radis/radis Also check for the Long Term Todo List

Docs are broken

opened on 2023-02-06 09:37:48 by erwanp

Error 1

πŸ› Describe the bug

Docs are broken : https://readthedocs.org/projects/radis/builds/19302835/

Apparently due to missing test file : FileNotFoundError: Test filetrimmed_1857_VoigtCO_Minesi.matdoes not exist

```

Extension error: Here is a summary of the problems encountered when running the examples

Unexpected failing examples: /home/docs/checkouts/readthedocs.org/user_builds/radis/checkouts/develop/examples/plot_compare_CO_geisa_hitran.py failed leaving traceback: Traceback (most recent call last): File "/home/docs/checkouts/readthedocs.org/user_builds/radis/checkouts/develop/examples/plot_compare_CO_geisa_hitran.py", line 37, in s_geisa = calc_spectrum(conditions, databank="geisa", name="GEISA's CO") File "/home/docs/checkouts/readthedocs.org/user_builds/radis/envs/develop/lib/python3.8/site-packages/radis/lbl/calc.py", line 534, in calc_spectrum generated_spectrum = _calc_spectrum_one_molecule( File "/home/docs/checkouts/readthedocs.org/user_builds/radis/envs/develop/lib/python3.8/site-packages/radis/lbl/calc.py", line 800, in _calc_spectrum_one_molecule sf.fetch_databank(conditions) File "/home/docs/checkouts/readthedocs.org/user_builds/radis/envs/develop/lib/python3.8/site-packages/radis/lbl/loader.py", line 1364, in fetch_databank df, local_paths = fetch_geisa( File "/home/docs/checkouts/readthedocs.org/user_builds/radis/envs/develop/lib/python3.8/site-packages/radis/io/geisa.py", line 174, in fetch_geisa df = ldb.load( TypeError: load() got an unexpected keyword argument 'isotope'

/home/docs/checkouts/readthedocs.org/user_builds/radis/checkouts/develop/examples/plot_newfitting_Tgas-molfrac.py failed leaving traceback: Traceback (most recent call last): File "/home/docs/checkouts/readthedocs.org/user_builds/radis/checkouts/develop/examples/plot_newfitting_Tgas-molfrac.py", line 35, in data = scipy.io.loadmat(getTestFile(data_file), simplify_cells=True)["CO_resu_Voigt"] File "/home/docs/checkouts/readthedocs.org/user_builds/radis/envs/develop/lib/python3.8/site-packages/radis/test/utils.py", line 77, in getTestFile raise FileNotFoundError( FileNotFoundError: Test file trimmed_1857_VoigtCO_Minesi.mat does not exist. Choose one of: - hitran_CO_fragment.par - geisa_CO2_fragment.par - co2_cdsd_hamiltonian_fragment.levels - CO_Tgas1500K_mole_fraction0.01.spec - geisa_CO_fragment.par - hitran_co2_626_bandhead_4165_4200nm.par - hitran_co_3iso_2000_2300cm.h5 - cdsd_hitemp_09_fragment.txt - geisa_O2_fragment.par - calc_N2C_spectrum_Trot1200_Tvib3000_slit0.1.txt - synth-NH3-1-500-2000cm-P10-mf0.01-p1.spec - hitran_co2_626_bandhead_4165_4200nm.h5 - CO_Tgas1500K_mole_fraction0.5.spec - Corentin_0_100cm_DownSampled_20cm_10pctCO2_1-wc-gw450-gr300-sl1500-acc5000-.spec - hitran_2016_H2O_2iso_2000_2100cm.par - hitran_co_3iso_2000_2300cm.par - hitran_CO2_fragment.par - geisa_H2O_fragment.par - N2C_specair_380nm.spec - CO2abscoeff_300K_4150_4400nm.txt - slitfunction.txt - cdsd_hitemp_09_fragment.h5 - CO2_measured_spectrum_4-5um.spec - cdsd_hitemp_09_header.txt - SpecDatabase_Test - calc_N2C_spectrum_Trot1200_Tvib3000.txt or use force=True ```

πŸ’‘ Possible solutions

@TranHuuNhatHuy you added this test file (it does appear in https://github.com/radis/radis/tree/develop/radis/test/files ) . However to appear in the Docs it should also be included in the MANIFEST.in file.

Easy fix

🎲 Radis version

latest

πŸ’» Operating system

Windows


Error 2

There is also another error :

```

Unexpected failing examples: /home/docs/checkouts/readthedocs.org/user_builds/radis/checkouts/develop/examples/plot_compare_CO_geisa_hitran.py failed leaving traceback: Traceback (most recent call last): File "/home/docs/checkouts/readthedocs.org/user_builds/radis/checkouts/develop/examples/plot_compare_CO_geisa_hitran.py", line 37, in s_geisa = calc_spectrum(conditions, databank="geisa", name="GEISA's CO") File "/home/docs/checkouts/readthedocs.org/user_builds/radis/envs/develop/lib/python3.8/site-packages/radis/lbl/calc.py", line 534, in calc_spectrum generated_spectrum = _calc_spectrum_one_molecule( File "/home/docs/checkouts/readthedocs.org/user_builds/radis/envs/develop/lib/python3.8/site-packages/radis/lbl/calc.py", line 800, in _calc_spectrum_one_molecule sf.fetch_databank(conditions) File "/home/docs/checkouts/readthedocs.org/user_builds/radis/envs/develop/lib/python3.8/site-packages/radis/lbl/loader.py", line 1364, in fetch_databank df, local_paths = fetch_geisa( File "/home/docs/checkouts/readthedocs.org/user_builds/radis/envs/develop/lib/python3.8/site-packages/radis/io/geisa.py", line 174, in fetch_geisa df = ldb.load( TypeError: load() got an unexpected keyword argument 'isotope' ```

Releases

0.14 2022-11-08 05:43:32

Description

The major release 0.14 after 0.13, brings essential fixes to the interface, and the final implementations of the Google Summer of Code 2022 new features with gallery examples.

Main changes : - non air mixtures automatically taken into account when using Hitran #495 - fitting modules examples #520 - Radis now uses a common API with Exojax to fetch databases

Pull Request Link: https://github.com/radis/radis/pull/532

What's Changed

Features: * Implement all new fitting modules and accompanied gallery examples into RADIS by @TranHuuNhatHuy in https://github.com/radis/radis/pull/520 * add explicit warning/error message if line with 0-cm-1 broadening by @erwanp in https://github.com/radis/radis/pull/524 * Allow astropy units to be used in crop() by @TranHuuNhatHuy in https://github.com/radis/radis/pull/526 * Removing completed TODO in radis/lbl/calc.py by @mdrodelo in https://github.com/radis/radis/pull/527 * Add/common api by @erwanp in https://github.com/radis/radis/pull/480 * Non air diluent 2 by @Supriya1702 in https://github.com/radis/radis/pull/495 * number of trans files in H3O_p/Exomol error manually fixed by @HajimeKawahara in https://github.com/radis/radis/pull/531

Docs: * Additional illustrative gallery examples for new fitting module by @TranHuuNhatHuy in https://github.com/radis/radis/pull/522 Screenshot from 2022-11-08 03-18-34 * Add some small docs/examples by @TranHuuNhatHuy in https://github.com/radis/radis/pull/518

New Contributors

  • @mdrodelo made their first contribution in https://github.com/radis/radis/pull/527
  • @HajimeKawahara made their first contribution in https://github.com/radis/radis/pull/531

Full Changelog: https://github.com/radis/radis/compare/0.13.1...0.14

0.13.1 2022-08-28 21:19:26

Description

Intermediary version between 0.13 and 0.14, brings important fixes to the experimental GPU mode, many other interface fixes, as well as the first implementations of the Google Summer of Code 2022 new features.

Pull Request : https://github.com/radis/radis/pull/517

What's Changed

Features: * Fetch hitran update by @Supriya1702 in https://github.com/radis/radis/pull/505 : you can now fetch non-air broadening parameters, as well as any other parameter available in the HITRAN database. ```python from radis.io.hitran import fetch_hitran

df = fetch_hitran("CO",["n_CO2","gamma_CO2"]) print(df) print(df.columns) ``` image

Performance: * Chunk size implementation for DIT Algorithm loops for Broadening by @sagarchotalia in https://github.com/radis/radis/pull/489 : allows to compute extreme amount of lines on limited RAM systems. * update chunksize test to make it faster - and RT minor perf improvement by @erwanp in https://github.com/radis/radis/pull/503

Interface: * Added warning and help improvement for get_population, update line survey, add example by @minouHub in https://github.com/radis/radis/pull/512

Fixes: * Updated numpy<=1.22.3 and fixed linting by @anandxkumar in https://github.com/radis/radis/pull/490 * fix specutils i/o when dealing with wavelngths by @erwanp in https://github.com/radis/radis/pull/499 * Fix gpu by @dcmvdbekerom in https://github.com/radis/radis/pull/514 : GPU sliders now work in Radiance mode * Fix HDF5/ api issues by @erwanp in https://github.com/radis/radis/pull/487 * Fixing the case when the chunksize is too small by @sagarchotalia in https://github.com/radis/radis/pull/500

Docs: * update physics constants to NIST CODATA standards, update docs by @erwanp in https://github.com/radis/radis/pull/498 * Added the Radis Website Link by @sonikarajesh in https://github.com/radis/radis/pull/475 * Whitespaces fix by @Supriya1702 in https://github.com/radis/radis/pull/481 * Remove RTD special vaex handling by @erwanp in https://github.com/radis/radis/pull/502 * ✨ we now have a Youtube Video Channel image

Refactor: * DBManager Refactor and simplification of ExoMol MdBMol by @erwanp in https://github.com/radis/radis/pull/465 : first step before Common-API with Exojax. * Refactor extra molecular parameters by @erwanp in https://github.com/radis/radis/pull/516 . Simplification of the radis.config file.

Full Changelog: https://github.com/radis/radis/compare/0.13.0...0.13.1


πŸ“£ Other News

  • Extreme amounts of change and improvement in Radis-App, have a look . Web app : https://radis.app/ ; Source Code : https://github.com/suzil/radis-app
  • We presented Radis at the ASA-HITRAN 2022 conference. The records from the conference are not available, but a rehearsal video is available in our new Youtube channel above. We discuss the history, goals, features, algorithms, latest changes and future of Radis.

0.13.0 2022-05-16 22:42:20

Spring release 🌱

Pull request details : https://github.com/radis/radis/pull/472

πŸ”¬ (Physics) Features

  • 462 adding GEISA database support by @TranHuuNhatHuy

python s = calc_spectrum(1000 / u.cm, 10000 / u.cm, molecule="CH4", mole_fraction=1900e-9, isotope='1,2,3', wstep='auto', pressure=1.01325 * u.bar, Tgas=296 * u.K, path_length=100 * u.cm, databank='geisa', # GEISA-2020 verbose=False, export_lines=True, ) import matplotlib.pyplot as plt plt.figure(figsize=(12,6)) s.plot("xsection", yscale='log', nfig='same') s.line_survey() image

GEISA database can be accessed as a Pandas DataFrame using fetch_geisa() : python from radis.io.geisa import fetch_geisa df = fetch_geisa("H2O") print(df) ``` wav int airbrd ... ierrT Tdpnself ierrU 0 0.052583 2.154000e-33 0.0923 ... 0.0 -0.99 -0.99 1 0.181997 2.486000e-35 0.0399 ... 0.0 -0.99 -0.99 2 0.184013 8.470000e-36 0.0399 ... 0.0 -0.99 -0.99 3 0.187637 5.255000e-29 0.0900 ... 0.0 -0.99 -0.99 4 0.363402 2.041100e-33 0.0800 ... 0.0 -0.99 -0.99 ... ... ... ... ... ... ... 362217 25332.871900 8.100000e-28 0.1056 ... 0.0 -0.99 -0.99 362218 25333.215510 1.560000e-28 0.1078 ... 0.0 -0.99 -0.99 362219 25334.143900 4.750000e-28 0.0905 ... 0.0 -0.99 -0.99 362220 25335.071700 8.260000e-28 0.1102 ... 0.0 -0.99 -0.99 362221 25336.948790 7.170000e-29 0.1125 ... 0.0 -0.99 -0.99

[362222 rows x 31 columns] ```

βš™οΈUser-interface

  • 467 radiance & emisscoeff units are now consistent with waverange unit ; i.e. plotting in cm-1 will yield a default radiance in ~mW/cm2/sr/cm-1 while plotting in nm will yield a default radiance in ~mW/cm2/sr/nm @AllanHOlesenBW (major refactor under the hood)

  • 448 normalize options

  • 471 line-survey works for multiple molecules

```python from radis import calc_spectrum import astropy.units as u

s4 = calc_spectrum(1950 / u.cm, 1980 / u.cm, mole_fraction={'CH4':1900e-9, 'CO2':400e-6}, isotope='1,2,3', pressure=1.01325 * u.bar, Tgas=296 * u.K, path_length=100 * u.cm, databank='geisa', verbose=False, export_lines=True)

s4.line_survey(overlay='abscoeff', barwidth=0.001)

```

image

πŸƒ Performance improvement

  • 464 : less RAM usage when generating ExoMol database files.

πŸ› Bug fixes

  • 454

  • 458

  • 464 : fix ExoMol parsing errors

πŸ“ Documentation


Detail

  • fix emisscoeff units conversion by @erwanp in https://github.com/radis/radis/pull/455
  • Fixes Hitemp whitespace parsing by @erwanp in https://github.com/radis/radis/pull/458
  • Set input field instead dropdown by @arunavabasu-03 in https://github.com/radis/radis/pull/459
  • Exomol api update by @erwanp in https://github.com/radis/radis/pull/464
  • Normalize() return norm factor and units option by @CorentinGrimaldi in https://github.com/radis/radis/pull/448
  • Fix/ci env by @erwanp in https://github.com/radis/radis/pull/468
  • update linesurvey & plot by @erwanp in https://github.com/radis/radis/pull/466
  • Add GEISA database by @TranHuuNhatHuy in https://github.com/radis/radis/pull/462
  • Updated references.rst by @sonikarajesh in https://github.com/radis/radis/pull/453
  • Add consistent units by @erwanp in https://github.com/radis/radis/pull/467
  • geisa docs & line-survey by @erwanp in https://github.com/radis/radis/pull/471

Full Changelog: https://github.com/radis/radis/compare/0.12.1...0.13.0

0.12.1 2022-04-13 12:13:33

Fix of 0.12.0

Main physics change: - the default lineshape optimization routine is changed ; the new one being more robust. It will improve accuracy for extremelly thin lineshapes. ( https://github.com/radis/radis/issues/421 and https://github.com/radis/radis/pull/422)

What's Changed

Features :

  • Implement astropy unit conversion to rescale_path_length() by @TranHuuNhatHuy in https://github.com/radis/radis/pull/445
  • update defaults (vaex as default HDF5 library, DIT weights=simple as default optimization routine) by @erwanp in https://github.com/radis/radis/pull/422

Fixes :

  • Gpu widget bug fix by @dcmvdbekerom in https://github.com/radis/radis/pull/419
  • fixes invalidindex error by @erwanp in https://github.com/radis/radis/pull/428
  • Updated travis.yml for micromamba by @Supriya1702 in https://github.com/radis/radis/pull/426
  • fix HCN import in ExoMol by @minouHub in https://github.com/radis/radis/pull/420
  • fix lineshapes issues at low pressure of https://github.com/radis/radis/issues/421
  • Adding SideButtons to the SideBar by @sonikarajesh in https://github.com/radis/radis/pull/433
  • Added link to Spectra Database by @sagarchotalia in https://github.com/radis/radis/pull/435
  • fix: lint errors by @gagan-aryan in https://github.com/radis/radis/pull/436
  • Fixed inaccessible links in several documents by @TranHuuNhatHuy in https://github.com/radis/radis/pull/437
  • Add some improvements in fetch_*() documentations by @TranHuuNhatHuy in https://github.com/radis/radis/pull/442
  • Templates updated by @arunavabasu-03 in https://github.com/radis/radis/pull/438
  • Fix syntax with truncation=None option by @Supriya1702 in https://github.com/radis/radis/pull/447
  • fix Readthedocs build (attempt 1) by @erwanp in https://github.com/radis/radis/pull/449

New Contributors

  • @Supriya1702 made their first contribution in https://github.com/radis/radis/pull/426
  • @sonikarajesh made their first contribution in https://github.com/radis/radis/pull/433
  • @sagarchotalia made their first contribution in https://github.com/radis/radis/pull/435
  • @TranHuuNhatHuy made their first contribution in https://github.com/radis/radis/pull/437
  • @arunavabasu-03 made their first contribution in https://github.com/radis/radis/pull/438

Full Changelog: https://github.com/radis/radis/compare/0.11.1...0.12.1

0.12.0 2021-12-20 08:59:57

0.12.0

Christmas release πŸŽ… , adding GPU support as well as many new small features and improvements, and an important bug fix for HITRAN users.

See PR #415


Changes since 0.11.1 (November 2021) :

πŸ”¬ (Physics) Features

nothing new

βš™οΈUser-interface

  • 380 GPU widgets are released ! πŸŽ‰

https://user-images.githubusercontent.com/16088743/121789972-f34ab280-cbda-11eb-99b0-d7ba019d80d5.mp4

  • 414 : support for cross-sections

```

s = radis.test_spectrum() s.plot("xsection")

COspectrum2502421670720 new quantities added: ['xsection'] ``` image

  • 413 automatically compute spectral array if possible ; no need to "update".

```

will always work if possible :

s.take("abscoeff"/"emisscoeff"/"xsection"/"transmittance_noslit"/ etc.) s.plot("abscoeff"/"emisscoeff"/"xsection"/"transmittance_noslit"/ etc.) s.get("abscoeff"/"emisscoeff"/"xsection"/"transmittance_noslit"/ etc.) ```

  • 412

  • 409 custom user download , requested by @Springder

πŸƒ Performance improvement

  • 380 unleashes the power of the GPU !

πŸ› Bug fixes

  • 416 important : all large-range HITRAN calculations of 0.11 may have had missing lines

  • 408

  • 410

πŸ“ Documentation

  • 404

  • 289

  • 406

🏁 CI / Dev / Tests

nothing new

πŸ—οΈ Refactor / change in architecture

nothing new

Full Changelog: https://github.com/radis/radis/compare/0.11.1...0.12.0

0.11.1 2021-11-15 15:34:04

Hotfix of 0.11.0

What's Changed

  • First fix post release by @erwanp and @minouHub in https://github.com/radis/radis/pull/402
  • 0.11.1 by @erwanp in https://github.com/radis/radis/pull/403

Full Changelog: https://github.com/radis/radis/compare/0.11.0...0.11.1

RADIS

Fast molecular spectra

GitHub Repository Homepage

spectroscopy spectra infrared hitran hitemp plasma plasma-physics combustion radiation astrophysics exoplanets closember