Package ComboCode :: Package cc :: Package modeling :: Package tools :: Module DustOpacity :: Class CustomOpacity
[hide private]
[frames] | no frames]

Class CustomOpacity

source code

An interface for creating custom opacity files by taking the original and tinkering with it.

Instance Methods [hide private]
 
__init__(self, species)
Initializing an instance of the custom opacities interface.
source code
 
setSpecies(self, species)
Change the species of the current CustomOpacity instance.
source code
 
makeOpa(self, mode='ZERO', **args)
Making custom .particle files.
source code
 
doZERO(self, wl=10.0)
Replace all opacities by zero below a cut-off wavelength.
source code
 
doFUNCTION(self, wl_min=10.0, wl_max=20.0, function='linear')
Replace all opacities by an extrapolation below a cut-off wavelength.
source code
 
doHONY(self, wl1=1.0, wl2=2.0, wl3=10.0, a_mod=0.05, q_cst=1.0)
Replace all opacities below a cut-off wavelength with values as assumed by Hony et al (2003, 2004)
source code
 
doZHANG(self, wl=10.0, a_mod=0.05, q_cst=1.6, metallic=True)
Replace all opacities below a cut-off wavelength with values as assumed by Zhang et al (2009)
source code
Method Details [hide private]

__init__(self, species)
(Constructor)

source code 

Initializing an instance of the custom opacities interface.

Parameters:
  • species (string) - the species short name

setSpecies(self, species)

source code 

Change the species of the current CustomOpacity instance.

Parameters:
  • species (string) - the species short name

makeOpa(self, mode='ZERO', **args)

source code 

Making custom .particle files.

Every method called here will put the results in self.output_data.

Parameters:
  • mode (string) - type of extrapolation (ZERO,FUNCTION,HONY,ZHANG)

    (default: 'ZERO')

  • args (dict) - Optional keywords required for the other methods of the class

doZERO(self, wl=10.0)

source code 

Replace all opacities by zero below a cut-off wavelength.

Parameters:
  • wl (float) - the wavelength of the discontinuity to zero

    (default: 10.0)

doFUNCTION(self, wl_min=10.0, wl_max=20.0, function='linear')

source code 

Replace all opacities by an extrapolation below a cut-off wavelength.

Parameters:
  • wl_min (float) - lower boundary interpolation range and the cutoff wavelength for the extrapolation

    (default: 10.0)

  • wl_max (float) - upper boundary interpolation range

    (default: 20.0)

  • function (string) - type of function used for the inter/extrapolation See Interpol.pEval for function types

    (default: 'linear')

doHONY(self, wl1=1.0, wl2=2.0, wl3=10.0, a_mod=0.05, q_cst=1.0)

source code 

Replace all opacities below a cut-off wavelength with values as assumed by Hony et al (2003, 2004)

Parameters:
  • wl1 (float) - first discontinuity in micron

    (default: 1.0)

  • wl2 (float) - second discontinuity in micron

    (default: 2.0)

  • wl3 (float) - third discontinuity in micron

    (default: 10)

  • a_mod (float) - model grain size, 0.01 according to Hony 2004 in micron

    (default: 0.05)

  • q_cst (float) - constant extinction efficiency at wavelengths < wl1

    (default: 1.0)

doZHANG(self, wl=10.0, a_mod=0.05, q_cst=1.6, metallic=True)

source code 

Replace all opacities below a cut-off wavelength with values as assumed by Zhang et al (2009)

Parameters:
  • wl (float) - wavelength of the discontinuity

    (default: 10.0)

  • a_mod (float) - model grain size, following Zhang et al 2009

    (default: 0.05)

  • q_cst (float) - the constant extinction efficieny at short wavelengths

    (default: 1.6)

  • metallic (bool) - if metallic dust, cut off wavelength is calculated differently than if dielectric dust (ie metallic=0)

    (default: True)