Package ComboCode :: Package cc :: Package data :: Package instruments :: Module Spire :: Class Spire
[hide private]
[frames] | no frames]

Class Spire

source code


Environment with several tools for Spire molecular spectroscopy managing.

Instance Methods [hide private]
 
__init__(self, star_name, resolution, oversampling, path=None, intrinsic=1, path_linefit='')
Initializing an instance of Spire().
source code
 
prepareSphinx(self, star_grid, redo_sphinx_prep=0)
Prepare Sphinx SPIRE models by checking if the convolved spectrum is already present in the Spire object and if not calling convolveSphinx.
source code
array
getSphinxConvolution(self, star, fn)
Return the sphinx convolution and return if it has already been done.
source code
 
__convolveSphinx(self, star)
Convolve the Sphinx output with the SPIRE resolution.
source code
list[array]
readLineFit(self)
Read the data from the line fit procedure done with Maries Hipe script.
source code

Inherited from cc.data.instruments.Instrument.Instrument: getDataFilenames, intIntMatch, makeModelList, mergeSphinx, readData, readTelescopeProperties, setData

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_name, resolution, oversampling, path=None, intrinsic=1, path_linefit='')
(Constructor)

source code 

Initializing an instance of Spire().

Parameters:
  • star_name (string) - Name of the star from Star.dat
  • resolution (float) - The spectral resolution of the SPIRE apodized spectra
  • oversampling (int) - The SPIRE instrumental oversampling, for correct convolution of the Sphinx output. This is the oversampling factor for the apodized spectra!
  • path (string) - Output folder in the code's home folder

    (default: 'codeSep2010')

  • intrinsic (bool) - Use the intrinsic Sphinx line profiles for convolving with the spectral resolution? Otherwise the beam convolved line profiles are used.

    (default: 1)

  • path_linefit (string) - The folder name for linefit results from Hipe (created by Maries script, assuming her syntax). The folder is located in $path_pacs$/$star_name$/. If no folder is given, no linefits are processed.

    (default: '')

Overrides: object.__init__

prepareSphinx(self, star_grid, redo_sphinx_prep=0)

source code 

Prepare Sphinx SPIRE models by checking if the convolved spectrum is already present in the Spire object and if not calling convolveSphinx.

Parameters:
  • star_grid (list[Star()]) - list of Star() instances
  • redo_sphinx_prep (bool) - redo the sphinx prep, regardless of whether this Spire instance already did it once, for instance in case the star_grid changed

    (default: 0)

getSphinxConvolution(self, star, fn)

source code 

Return the sphinx convolution and return if it has already been done.

Returns None if the convolution is not available.

Parameters:
  • star (Star()) - The Star() object
  • fn (str) - The filename of the dataset (band) for which the convolution is to be returned.
Returns: array
The sphinx convolution result. (wavelength,flux)

__convolveSphinx(self, star)

source code 

Convolve the Sphinx output with the SPIRE resolution. The convolution is done in wave number (cm^-1).

Parameters:
  • star (Star()) - The Star() object for which Sphinx profiles are loaded

readLineFit(self)

source code 

Read the data from the line fit procedure done with Maries Hipe script.

Assumes structure and syntax as given in the example file /home/robinl/Data/SPIRE/rdor/lineFit/lineFitResults

The line fit results are saved in self.linefit as a np.recarray.

The relative FWHM is given with respect to the intrinsic SPIRE resolution for unapodized spectra, i.e. 0.04 cm^-1.

The columns include (with unit indicated): band freq_in (GHz), freq_fit (GHz), wave_fit (micron), line_flux (W/m2), line_flux_err (W/m2), line_flux_rel (ratio), line_peak (W/m2 m), fwhm_fit_freq (GHz), fwhm_fit (micron), fwhm_rel

Parameters:
  • kwargs - Extra keywords for the readCols method.

    (default: dict())

Returns: list[array]
The line fit columns are returned.
Overrides: cc.data.instruments.Instrument.Instrument.readLineFit