## Getting Started

### Install

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 to upgrade the package later, please refer to the
detailed installation procedure or
report an issue.

### Quick Start

Calculate a CO equilibrium spectrum from the HITRAN database, using the
`calc_spectrum()`

function. Output is a
Spectrum object:

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
)
s.apply_slit(0.5, 'nm') # simulate an experimental slit
s.plot('radiance')

Calculate a CO *nonequilibrium* spectrum from the HITRAN database, with
arbitrary `units`

(on your first call, this will calculate and
cache the CO(X) rovibrational energies):

from astropy import units as u
s2 = 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,
)
s2.apply_slit(0.5, 'nm')
s2.plot('radiance', nfig='same') # compare with previous

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 a spectrum 's' calculated previously

Typical output of `plot_diff()`

(below: a CO2 spectrum
at 3400 K calculated with the [HITEMP-2010] and [CDSD-4000] line databases):

Refer to the Spectrum object guide for more post-processing functions
(rescale , crop,
remove baselines,
combine along the line-of-sight,
identify each line,
manipulate multiple spectra at once, etc.)

### In the browser (no installation needed!)

Alternatively, you can also run RADIS directly in the browser with the
RADIS Interactive Examples project.
For instance, run the Quick Start example on the link below:

Or start a bare RADIS online session: