-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
Add a notebook based on this (working) Python example :
"""
Fun Facts About Spectroscopy
----------------------------
# The sun would not be visible if the 4.2 µm CO2 lineshape was truely lorentzian
"""
from radis import calc_spectrum
import matplotlib.pyplot as plt
import astropy.units as u
s = calc_spectrum(wavelength_min=0.3*u.um, wavelength_max=6*u.um,
molecule='CO2',
isotope='1,2,3',
pressure=1.01325, # bar
truncation=None,
Tgas=300, # K
mole_fraction=400e-6,
cutoff=0,
databank='hitran', # or use 'hitemp'
broadening_method="fft"
)
# note : the calculation is quite long (~190s on my laptop) because the FFT
# method used is not optimized for very large ranges
#%% Plot
s.plot('abscoeff', wunit='nm', yscale='log')
plt.axvspan(300, 700, alpha=0.3) # visible spectrum
# we get an absorption coefficient of about ~0.5 cm-1 in the visible range
# %%
# which means that the sky would be >99% more opaque for a layer of only ~ 10 cm
# (exp(-5) = 0.006 )
s.rescale_path_length(10).plot('transmittance_noslit', wunit='nm')
plt.axvspan(300, 700, alpha=0.3) # visible spectrum
plt.ylim((0, 1.1))
# plt.ylim((0, 1.1))Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
