astropy:docs

CDESpectrum

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

Bases: omnifit.spectrum.spectrum.AbsorptionSpectrum

A class specialized in representing CDE-corrected absorption spectra.

The functionality of this class is otherwise identical to AbsorptionSpectrum (and by extension, BaseSpectrum), except it contains an additional method for plotting the complex refractive index data, which it also stores in additional attributes as part of the class instance. Also stored are various additional data returned by the CDE correction, as documented below.

Attributes

All the attributes stored in AbsorptionSpectrum, plus the following:  
m (numpy.ndarray) The complex refractive index spectrum of the data.
cabs (numpy.ndarray) The spectrum of the absorption cross section of the simulated grain.
cabs_vol (numpy.ndarray) The spectrum of the absorption cross section of the simulated grain, normalized by the volume distribution of the grain. This parameter is the equivalent of optical depth in most cases.
cscat_vol (numpy.ndarray) The spectrum of the scattering cross section of the simulated grain, normalized by the volume distribution of the grain.
ctot (numpy.ndarray) The spectrum of the total cross section of the simulated grain.

Constructor for the CDESpectrum class.

Parameters:

wn : astropy.units.Quantity or numpy.ndarray

The absorption spectrum frequency data. If given as astropy.units.Quantity, they must either be in kayser (reciprocal wavenumbers) or convertable to kayser. If given as numpy.ndarray, they are assumed to be in kayser.

m : numpy.ndarray

The complex refractive index spectrum of the data.

**kwargs : Arguments, optional

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

Methods Summary

plotnk(ax_n,ax_k,**kwargs) Plot the complex refractive indices as function of wavenumber to the two given matplotlib axes.

Methods Documentation

plotnk(ax_n, ax_k, **kwargs)[source] [edit on github]

Plot the complex refractive indices as function of wavenumber to the two given matplotlib axes.

Parameters:

ax_n : matplotlib.axis

The axis which the plot of n will be generated in.

ax_k : matplotlib.axis

The axis which the plot of k will be generated in.

**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