Package ComboCode :: Package cc :: Package modeling :: Package profilers :: Module Opacity
[hide private]
[frames] | no frames]

Module Opacity

source code

Module for calculating the opacity.

Author: R. Lombaert

Classes [hide private]
  Opacity
An interface for an opacity profile and any type of extinction quantity.
Functions [hide private]
spline1d
read_opacity(x, species, index=1, unit='cm', *args, **kwargs)
Read the opacities with the KappaReader and interpolate.
source code
Variables [hide private]
  __package__ = 'ComboCode.cc.modeling.profilers'
Function Details [hide private]

read_opacity(x, species, index=1, unit='cm', *args, **kwargs)

source code 

Read the opacities with the KappaReader and interpolate.

Returns a tuple with the original grid, and the interpolation object. Used by the Opacity class to set an interpolation object for a .opac/.particle file through species given in usr/Dust.dat.

Additional args and kwargs can be passed to the interpolate method.

Parameters:
  • x (array) - The x grid requested for the interpolation. Note that this is a dummy variable to allow Profiler to work with this function.
  • species (string) - The dust species (from Dust.dat)
  • index (int) - The index of the kappas in the .opacity/.particle file. 0: extinction, 1: absorption, 2: scattering

    (default: 1)

  • unit (str/u.Unit()) - The unit of the wavelength. Can be given as u.Unit() object or as a string representation of those objects. Can range from length, to frequency, and energy

    (default: cm)

Returns: spline1d
The interpolator for the mass extinction/absorption/scattering coefficients. (in cgs!)