astropy:docs

AbsorptionSpectrum

class omnifit.spectrum.AbsorptionSpectrum(wn, od, **kwargs)[source] [edit on github]

Bases: omnifit.spectrum.spectrum.BaseSpectrum

A class specialized in representing absorption spectra of the type often used in ice spectroscopy.

The functionality of this class is otherwise identical to BaseSpectrum, except it contains an additional method for plotting the optical depth spectrum in either microns and kayser units, both of which it stores as additional attributes. Upon initialisation it uses the kayser units as its x axis units.

Attributes

All the attributes stored in BaseSpectrum, plus the following:  
wn (astropy.units.Quantity) The data on the x-axis of the spectrum, expressed in kayser (reciprocal wavenumber) units.
wl (astropy.units.Quantity) The data on the x-axis of the spectrum, expressed in microns.
od (astropy.units.Quantity) The data on the y-axis spectrum, expressed as optical depth units (using omnifit.utils.unit_od).

Constructor for the AbsorptionSpectrum class.

Parameters:

wn : astropy.units.Quantity

The absorption spectrum frequency data. Unlike BaseSpectrum, the initialisation of AbsorptionSpectrum requires this to be in the specific units of reciprocal wavenumber. However, if it is in a quantity convertable to kayser, conversion will be attempted while a warning is given to notify the user of this.

od : astropy.units.Quantity

The absorption spectrum optical depth data. Unlike BaseSpectrum, the initialisation of AbsorptionSpectrum requires this to be in the specific units of optical depth units (from omnifit.utils.unit_od).

**kwargs : Arguments, optional

Additional initialisation arguments can be passed to BaseSpectrum using this. Note that x and y are defined using the other initialisation parameters of AbsorptionSpectrum.

Methods Summary

plotod(ax,in_wl=False,**kwargs) Plot the optical depth spectrum as either a function of reciprocal wavenumber or wavelength to the given axis.

Methods Documentation

plotod(ax, in_wl=False, **kwargs)[source] [edit on github]

Plot the optical depth spectrum as either a function of reciprocal wavenumber or wavelength to the given axis.

Parameters:

axis : matplotlib.axis

The axis which the plot will be generated in.

in_wl : bool, optional

If set to true, the x axis of the plotting axis will be in wavelength; otherwise it will be in reciprocal wavenumbers.

**kwargs : Arguments, optional

This can be used to pass additional arguments to matplotlib.pyplot.plot, which is used by this method for its plotting.

Page Contents