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=0.07, 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

  • wunit ('nm', 'cm-1') – wavelength / wavenumber units

  • Iunit ('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 ('Aul')

  • 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. If None, use the fig object returned to show the plot.

  • yscale ('log', 'linear') – Default 'log'

Returns

  • fig (a Plotly figure.) – If using a Jupyter Notebook, the plot will appear. Else, use writefile to export to an html file.

  • See typical output in [1]_

Examples

An example using the SpectrumFactory to generate a spectrum:

from 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)

See the output in Examples

References

1

RADIS Online Documentation (LineSurvey)

2

SpectraPlot