radis / spectro101 Goto Github PK
View Code? Open in Web Editor NEWTutorials for molecular spectroscopy
Home Page: https://github.com/radis/radis/wiki/%F0%9F%8E%93-Spectroscopy-101-with-RADIS
License: MIT License
Tutorials for molecular spectroscopy
Home Page: https://github.com/radis/radis/wiki/%F0%9F%8E%93-Spectroscopy-101-with-RADIS
License: MIT License
Idea : let's have a stand-alone website to add some Radis-based Tutorials & Fun-Facts on Spectroscopy
set-up basic website. For convenience we could start from the radis/Fitroom website (https://github.com/radis/fitroom/tree/main/docs) ; also based on Radis
Host it on the ReadTheDocs pages or Github pages?
Use nbsphinx : https://nbsphinx.readthedocs.io/en/0.6.1/subdir/gallery.html
https://radis.github.io/radis-lab/
(Note : would have to separate production from examples on radis-lab for fast editing & loading, see radis/radis-lab#13 )
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))
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.