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

Class ContinuumDivision

source code


A class for dividing a spectrum by the continuum and comparing models and data.

Instance Methods [hide private]
 
__init__(self, star_grid=[], spec=[], franges=[2.6, 2.85, 3.3, 3.7], plot=0, func='power', cfg='')
Initializing a ContinuumDivision instance.
source code
 
show(self)
Show the model calculations in a plot.
source code
 
calcEqWidth(self, dtype, frindex)
Calculate the equivalent width after continuum division.
source code
 
prepareModels(self)
Prepare models for dust feature continuum division.
source code
 
prepareData(self)
Prepare data for dust feature continuum division.
source code
 
divideContinuum(self, w, f, dtype, frindex)
Divide flux by the continuum flux in a dust feature.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, star_grid=[], spec=[], franges=[2.6, 2.85, 3.3, 3.7], plot=0, func='power', cfg='')
(Constructor)

source code 

Initializing a ContinuumDivision instance.

Parameters:
  • star_grid (list[Star()]) - The parameter sets for which the fitting is done

    (default: [])

  • spec (list[Sed()]) - information concerning dust data available for star

    (default: [])

  • franges (list[float] or list[list[float]]) - The fitting ranges for this instance. 4 values in mic, delimiting 2 parts of the spectrum blueward and redward of the dust feature. Default is for 3.1 micron ice feature. Can also give a list of lists, in which case the franges are defined for every Star() and Sed() included, such that len(franges) == len(spec)+len(star_grid). The model franges are listed first, then the sed franges. Can also be given through the cfg file, and takes priority in that case.

    (default: [2.6,2.85,3.3,3.7])

  • plot (bool) - Show the continuum division and fitting plots.

    (default: 0)

  • func (string or list[string]) - The function used for fitting the continuum. Can be a list of functions as well, of len == len(star_grid) + len(spec) Can also be given through the cfg file, and takes priority in that case.

    (default: power)

  • cfg (string) - a configuration file for Plotting2.py.
Overrides: object.__init__

calcEqWidth(self, dtype, frindex)

source code 

Calculate the equivalent width after continuum division.

Parameters:
  • dtype (string) - data type (only 'model','sws' for now)
  • frindex (int) - The index in the franges list for this entry.

prepareModels(self)

source code 

Prepare models for dust feature continuum division.

The equivalent width of the feature is also calculated here.

prepareData(self)

source code 

Prepare data for dust feature continuum division.

For now only SWS is available.

The equivalent width of the feature is also calculated here.

divideContinuum(self, w, f, dtype, frindex)

source code 

Divide flux by the continuum flux in a dust feature.

Parameters:
  • w (list/array) - The wavelength grid
  • f (list/array) - The flux grid
  • dtype (string) - data type (only 'model','sws' for now)
  • frindex (int) - The index in the franges list for this entry.
  • plot (bool) - Show a plot of the continuum division