Atomic spectrum #0: Calculate an atomic spectrumΒΆ
In this example, the NIST and Kurucz databases are used to compute an atomic spectrum. The same partition function is employed. The Lorentzian broadening is assumed equal for all lines.

/home/docs/checkouts/readthedocs.org/user_builds/radis/checkouts/latest/radis/misc/warning.py:434: UserWarning: The required columns for NIST don't match those of existing moleculear databases, so all columns are being loaded
warnings.warn(WarningType(message))
Added NIST-N_II database in /home/docs/radis.json
- Downloading energy1.pl?spectrum=N_II&units=0&format=3&output=0&level_out=on&g_out=on (1/1)
Downloading: 0.00B [00:00, ?B/s]
Downloading: 3.90kB [00:00, 120kB/s]
24.74s - Loaded database
/home/docs/checkouts/readthedocs.org/user_builds/radis/checkouts/latest/radis/misc/warning.py:434: UserWarning: wavenumber shift not given in database: assumed 0 shift
warnings.warn(WarningType(message))
/home/docs/checkouts/readthedocs.org/user_builds/radis/checkouts/latest/radis/misc/warning.py:434: UserWarning: The required columns for Kurucz don't match those of existing moleculear databases, so all columns are being loaded
warnings.warn(WarningType(message))
Attempting to download http://kurucz.harvard.edu/atoms/0701/gf0701.all
Error downloading http://kurucz.harvard.edu/atoms/0701/gf0701.all: Unable to access the resource (HEAD request). Expected HTTP status code 200, got 404 for URL: http://kurucz.harvard.edu/atoms/0701/gf0701.all. Please verify the URL and your network access permissions.
Attempting to download http://kurucz.harvard.edu/atoms/0701/gf0701.pos
Added Kurucz-N_II database in /home/docs/radis.json
/home/docs/checkouts/readthedocs.org/user_builds/radis/checkouts/latest/radis/misc/warning.py:434: UserWarning: wavenumber shift not given in database: assumed 0 shift
warnings.warn(WarningType(message))
(<Figure size 640x480 with 2 Axes>, [<Axes: >, <Axes: xlabel='Wavelength (nm)'>])
def broad_arbitrary(**kwargs):
"""An arbitrary broadening formula for the Lorentzian component"""
HWHM = kwargs["pressure_atm"] * (296 / kwargs["Tgas"]) ** 0.7
shift = None
return HWHM, shift
from radis import SpectrumFactory, plot_diff
sf = SpectrumFactory(
wavelength_min=498,
wavelength_max=508,
species="N_II",
wstep=0.01,
path_length=1, # cm
pressure=20, # atm
mole_fraction=0.1,
verbose=0, # to keep output quiet
lbfunc=broad_arbitrary,
pfsource="nist",
)
# NIST
sf.fetch_databank("nist")
s_NIST = sf.eq_spectrum(Tgas=10000, name="NIST")
# Kurucz
sf.fetch_databank("kurucz")
s_KURUCZ = sf.eq_spectrum(Tgas=10000, name="Kurucz")
plot_diff(
s_NIST,
s_KURUCZ,
"radiance_noslit",
wunit="nm", # "nm" or "cm-1"
)
Total running time of the script: (0 minutes 25.956 seconds)