radis.tools.line_survey moduleΒΆ
Functions to plot line surveys
- LineSurvey(spec, overlay=None, wunit='cm-1', Iunit='hitran', medium='air', cutoff=None, plot='S', lineinfo=['int', 'A', 'El'], barwidth='hwhm_voigt', yscale='log', writefile=None, xunit=None, yunit=None)[source]ΒΆ
Plot Line Survey (all linestrengths above cutoff criteria) in Plotly (html)
- Parameters:
spec (Spectrum) β result from SpectrumFactory calculation (see spectrum.py)
overlay (tuple (w, I, [name], [units]), or list or tuples) β plot (w, I) on a secondary axis. Useful to compare linestrength with calculated / measured data:
LineSurvey(overlay='abscoeff')
wunit (
'nm','cm-1') β wavelength / wavenumber unitsIunit (
'hitran','splot') β Linestrength output units:'hitran': (cm-1/(molecule/cm-2))'splot': (cm-1/atm) (Spectraplot units [2])
Note: if not None, cutoff criteria is applied in this unit. Not used if plot is not βSβ
medium (
'air','vacuum') β show wavelength either in air or vacuum. Default'air'plot (str) β what to plot. Default
'S'(scaled line intensity). But it can be any key in the lines, such as population ('nu'), or Einstein coefficient ('A')lineinfo (list, or
'all') β extra line information to plot. Should be a column name in the databank (s.lines). For instance:'int','selbrd', etcβ¦ Default ['int']
- Other Parameters:
writefile (str) β if not
None, a valid filename to save the plot under .html format. IfNone, use thefigobject returned to show the plot.yscale (
'log','linear') β Default'log'barwidth (float or str) β
if float, width of bars, in
wunit, as a fraction of full-range; i.e.barwidth=0.01
makes bars span 1% of the full range. if
str, uses the column as width. Examplebarwidth = 'hwhm_voigt'
- Returns:
fig (a Plotly figure.) β If using a Jupyter Notebook, the plot will appear. Else, use
writefileto export to an html file.See typical output in [1]_
Examples
An example using the
SpectrumFactoryto generate a spectrum, using the Spectrumline_survey()method directlyfrom radis import SpectrumFactory sf = SpectrumFactory( wavenum_min=2380, wavenum_max=2400, mole_fraction=400e-6, path_length=100, # cm isotope=[1], export_lines=True, # required for LineSurvey! db_use_cached=True) sf.load_databank('HITRAN-CO2-TEST') s = sf.eq_spectrum(Tgas=1500) s.apply_slit(0.5) s.line_survey(overlay='radiance_noslit', barwidth=0.01, lineinfo="all")
See the output in Examples
Examples using Line SurveyΒΆ
References
See also