Skip to content

Commit

Permalink
Merge pull request #415 from radis/develop
Browse files Browse the repository at this point in the history
0.12
  • Loading branch information
erwanp committed Dec 20, 2021
2 parents 8605d64 + 073d3ad commit b77cd75
Show file tree
Hide file tree
Showing 81 changed files with 2,821 additions and 1,640 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Expand Up @@ -27,7 +27,7 @@ __pycache__/
*.py[cod]
*.pyc
*.c
*.cpp
radis/cython/*.cpp

# IPython notebook checkpoints
*-checkpoint.ipynb
Expand All @@ -40,6 +40,7 @@ __pycache__/
env/
build/
develop-eggs/
develop-tests/
dist/
eggs/
lib/
Expand Down
5 changes: 3 additions & 2 deletions .travis.yml
Expand Up @@ -2,7 +2,7 @@ language: python
python:
# We don't actually use the Travis Python, but this keeps it organized.
#- "2.7" # not tested anymore starting from 0.9.19
- "3.7"
- "3.8"
os: linux

stages:
Expand Down Expand Up @@ -38,8 +38,9 @@ jobs:
- conda env create -n radis-env -f environment.yml
# Activate and install test-only dependencies
- source activate radis-env
- conda list
- pip install pytest-cov
- python setup.py install
- pip install -e . -v

script:
# Your test script goes here
Expand Down
2 changes: 2 additions & 0 deletions MANIFEST.in
@@ -1,6 +1,8 @@
include README.rst
include LICENSE
include radis/__version__.txt
include radis/lbl/gpu.cpp
include radis/lbl/gpu.h
include radis/phys/units.txt
include radis/test/files/*.txt
include radis/test/files/*.spec
Expand Down
33 changes: 33 additions & 0 deletions README.rst
Expand Up @@ -93,6 +93,39 @@ Typical output of `plot_diff <https://radis.readthedocs.io/en/latest/source/radi
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 :ref:`GPU Spectrum Calculation on RADIS <label_radis_gpu>` for more details on GPU acceleration.
---------------------------------------------------------------------

=======================================
Expand Down
2 changes: 1 addition & 1 deletion docs/PULL_REQUEST_TEMPLATE.md
Expand Up @@ -11,4 +11,4 @@ If you replace <Issue Number> with a number, GitHub will automatically link it.
If this pull request is unrelated to any issues, please remove
the following line. -->

Fixes #<Issue Number>
Fixes #<Issue Number>
2 changes: 1 addition & 1 deletion docs/_templates/layout.html
Expand Up @@ -13,4 +13,4 @@

</script>

{% endblock %}
{% endblock %}
15 changes: 15 additions & 0 deletions docs/_templates/searchbox.html
@@ -0,0 +1,15 @@
<div>
<h3>{{ _('Quick search') }}</h3>
<script>
(function() {
var cx = '011868766723427137892:jpmxeesvyix';
var gcse = document.createElement('script');
gcse.type = 'text/javascript';
gcse.async = true;
gcse.src = 'https://cse.google.com/cse.js?cx=' + cx;
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(gcse, s);
})();
</script>
<gcse:search></gcse:search>
</div>
2 changes: 1 addition & 1 deletion docs/conf.py
Expand Up @@ -84,7 +84,7 @@


def linkcode_resolve(domain, info):
""" for sphinx.ext.linkcode"""
"""for sphinx.ext.linkcode"""
if domain != "py":
return None
if not info["module"]:
Expand Down
2 changes: 1 addition & 1 deletion docs/dev/_architecture.rst
Expand Up @@ -38,7 +38,7 @@ are the input parameters of the different RADIS front-ends:

-------------------------------------------------------------------------

The Input databases are either automatically downloaded from [HITRAN-2016]_, or defined
The Input databases are either automatically downloaded from [HITRAN-2020]_, or defined
locally in a :ref:`Configuration file <label_lbl_config_file>`

-------------------------------------------------------------------------
Expand Down
Binary file added docs/examples/GPU_spectrum.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/features/description.rst
@@ -1,7 +1,7 @@
Description
===========

Written as a general purpose radiative solver, the code is built around the [HITRAN-2016]_,
Written as a general purpose radiative solver, the code is built around the [HITRAN-2020]_,
[HITEMP-2010]_ and [CDSD-4000]_ databases for molecules in their electronic ground state. Energy
levels are read from tabulated databases or calculated from Dunham developments.
Boltzmann, Treanor, and state specific vibrational distributions can be generated.
Expand Down
5 changes: 3 additions & 2 deletions docs/features/features.rst
Expand Up @@ -13,9 +13,9 @@ RADIS is both an infrared :ref:`line-by-line code <label_line_by_line>`
and a :ref:`post-processing library <label_spectrum>`.
It includes:

- Absorption and emission spectra of all [HITRAN-2016]_ and [ExoMol-2020]_ species under equilibrium calculations (:py:data:`~radis.db.MOLECULES_LIST_EQUILIBRIUM`)
- Absorption and emission spectra of all [HITRAN-2020]_ and [ExoMol-2020]_ species under equilibrium calculations (:py:data:`~radis.db.MOLECULES_LIST_EQUILIBRIUM`)
- Absorption and emission spectra of CO2 and CO for non-LTE calculations (see :py:data:`~radis.db.MOLECULES_LIST_NONEQUILIBRIUM` )
- Different Line Databases: support of [HITRAN-2016]_, [HITEMP-2010]_ and [CDSD-4000]_ line databases (see :py:data:`~radis.lbl.loader.KNOWN_DBFORMAT`)
- Different Line Databases: support of [HITRAN-2020]_, [HITEMP-2010]_ and [CDSD-4000]_ line databases (see :py:data:`~radis.lbl.loader.KNOWN_DBFORMAT`)
- Calculation of :ref:`Rovibrational Energies of molecules <label_examples_rovibrational_energies>`.
- Calculation of equilibrium and nonequilibrium :ref:`Partition Functions <label_examples_partition_functions>`.
- Spatially heterogeneous spectra (see :ref:`see line-of-sight <label_los_index>`)
Expand Down Expand Up @@ -90,6 +90,7 @@ Line Databases
List of supported line databases formats: :py:data:`~radis.lbl.loader.KNOWN_DBFORMAT` :

- [HITRAN-2016]_
- [HITRAN-2020]_
- [HITEMP-2010]_
- [CDSD-4000]_
- [ExoMol-2020]_
Expand Down
4 changes: 2 additions & 2 deletions docs/index.rst
Expand Up @@ -37,7 +37,7 @@ Quick Start
===========


Calculate a CO equilibrium spectrum from the [HITRAN-2016]_ database, using the
Calculate a CO equilibrium spectrum from the [HITRAN-2020]_ database, using the
:py:func:`~radis.lbl.calc.calc_spectrum` function. Lines are downloaded automatically
using Astroquery (based on [HAPI]_). Output is a
:ref:`Spectrum object <label_spectrum>`: ::
Expand Down Expand Up @@ -102,7 +102,7 @@ More examples
.. minigallery:: radis.Spectrum


The Quick Start examples automatically downloaded the line databases from [HITRAN-2016]_, which is valid for temperatures below 700 K.
The Quick Start examples automatically downloaded the line databases from [HITRAN-2020]_, which is valid for temperatures below 700 K.
For *high temperature* cases, you may need to use :ref:`other line databases <label_line_databases>` such as
[HITEMP-2010]_ (typically T < 2000 K) or [CDSD-4000]_ (T < 5000 K). These databases must be described in a ``~/radis.json``
:ref:`Configuration file <label_lbl_config_file>`.
Expand Down
2 changes: 1 addition & 1 deletion docs/lbl/_databases.rst
Expand Up @@ -17,7 +17,7 @@ Refer to :py:func:`~radis.io.query.fetch_astroquery` for more information.
You can also download the HITRAN databases files locally:

- HITRAN can be downloaded from https://hitran.org/lbl/. Expect
~80 Mb for CO2, or 50 Mb for H2O. Cite with [HITRAN-2016]_.
~80 Mb for CO2, or 50 Mb for H2O. Cite with [HITRAN-2020]_.

.. note::

Expand Down

0 comments on commit b77cd75

Please sign in to comment.