Assuming you have Python installed with the Anaconda distribution just use:
That’s it! You can now run your first example below.
If you encounter any problem or if you need to upgrade, please refer to the
detailed installation procedure. If you don’t have a Python
environment, try 🌱 RADIS Online first !
fromradisimportcalc_spectrums=calc_spectrum(1900,2300,# cm-1molecule='CO',isotope='1,2,3',pressure=1.01325,# barTgas=700,# Kmole_fraction=0.1,path_length=1,# cmdatabank='hitran',# or use 'hitemp')s.apply_slit(0.5,'nm')# simulate an experimental slits.plot('radiance')
Calculate a CO nonequilibrium spectrum from the HITRAN database, with
arbitrary units (on your first call, this will compute and
store the CO(X) rovibrational energies):
fromastropyimportunitsasus2=calc_spectrum(1900/u.cm,2300/u.cm,molecule='CO',isotope='1,2,3',pressure=1.01325*u.bar,Tvib=700*u.K,Trot=300*u.K,mole_fraction=0.1,path_length=1*u.cm,databank='hitran',# or use 'hitemp')s2.apply_slit(0.5,'nm')s2.plot('radiance',nfig='same')# compare with previous
📣 starting from radis==0.9.30 you can also download HITEMP and ExoMol directly. Just use databank='hitemp'
or databank='exomol' in the initial example. This will automatically download, unzip and setup the database
files in a ~/.radisdb folder.
More complex examples will require to use the SpectrumFactory
class, which is the core of RADIS line-by-line calculations.
RADIS is built on the shoulders of many state-of-the-art packages and databases. If using RADIS
to compute spectra, make sure you cite all of them, for proper reproducibility and acknowledgement of
the work ! See How to cite?
This is the core of RADIS: it calculates the spectral densities for a homogeneous
slab of gas, and returns a Spectrum object. Calculations
are performed within the SpectrumFactory class.
calc_spectrum() is a high-level wrapper to
SpectrumFactory for most simple cases.
This module takes several Spectrum objects
as input and combines then along the line-of-sight (SerialSlabs())
or at the same spatial position (MergeSlabs()), to reproduce
line-of-sight experiments. The module allows combination of Spectra such as:
This module contains the Spectrum object itself, with several methods that can be
applied after the Spectrum was calculated: rescale, apply instrumental slit function,
store or retrieve from a Spectrum database, plot or compare with another Spectrum object.