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

Class Instrument

source code


Instrument-specific calculations.

Instance Methods [hide private]
 
__init__(self, star_name, instrument_name, oversampling, code='GASTRoNOoM', path=None, intrinsic=1, path_linefit='', blend_factor=1.2)
Initializing an instance of Instrument.
source code
 
readTelescopeProperties(self)
Read the telescope properties from Telescope.dat.
source code
list[string]
makeModelList(self, star_grid, id_type)
Return a list of all model id's in the star_grid.
source code
list[string]
getDataFilenames(self, searchstring='')
Retrieve the data filenames that you wish to be plotted.
source code
 
setData(self, data_filenames=[], searchstring='')
Read data from given filenames and remember them.
source code
 
readData(self)
Read in data, taking special care of NaNs.
source code
list[array]
readLineFit(self, **kwargs)
Read the data from the line fit procedure.
source code
 
intIntMatch(self, trans_list, ifn)
Match the wavelengths of integrated intensities with transitions.
source code
(list,list)
mergeSphinx(self, star)
Merge Sphinx output line profiles on a zero-continuum.
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_name, instrument_name, oversampling, code='GASTRoNOoM', path=None, intrinsic=1, path_linefit='', blend_factor=1.2)
(Constructor)

source code 

Initializing an instance of Instrument.

Parameters:
  • star_name (string) - The name of the star from Star.py
  • instrument_name (string) - The name of the instrument (SPIRE or PACS)
  • oversampling (int) - The instrumental oversampling, for correct convolution of the Sphinx output.
  • code (string) - The radiative transfer code used to model the data

    (default: 'GASTRoNOoM')

  • path (string) - Output folder in the code's home folder. Used to locate eg PACS database. If None, no model info required (eg for line measurement matching/identification)

    (default: None)

  • 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 Pierre, assuming his syntax). The folder is located in $path_pacs$/$star_name$/. If no folder is given, no linefits are processed.

    (default: '')

  • blend_factor (float) - The relative factor with respect to the intrinsic instrumental FWHM that is compared with the fitted Gaussian FWHM to determine whether an emission line may be blended.

    (default: 1.2)

Overrides: object.__init__

readTelescopeProperties(self)

source code 

Read the telescope properties from Telescope.dat.

This currently includes the telescope size in m, and the default absolute flux calibration uncertainty.

makeModelList(self, star_grid, id_type)

source code 

Return a list of all model id's in the star_grid.

Parameters:
  • star_grid (list[Star()]) - The grid of parameter sets
  • id_type (string) - the type of model id (MCMAX or GASTRONOOM or PACS)
Returns: list[string]
the model_ids

getDataFilenames(self, searchstring='')

source code 

Retrieve the data filenames that you wish to be plotted.

Parameters:
  • searchstring (string) - the searchstring conditional for selecting data files.

    (default: '')

Returns: list[string]
the data filenames found in the search

setData(self, data_filenames=[], searchstring='')

source code 

Read data from given filenames and remember them.

The data are saved as wavelength and flux lists in the object.

Parameters:
  • data_filenames (list[string]) - The data filenames. If empty, auto-search is done

    (default: [])

  • searchstring (string) - the searchstring conditional for the auto-search

    (default: '')

readData(self)

source code 

Read in data, taking special care of NaNs.

Four colums are taken as input! wave - contsub - original - continuum

Two columns still works, but may result in errors in other places in the code.

Data are always read in Jy versus micron, for both SPIRE and PACS.

readLineFit(self, **kwargs)

source code 

Read the data from the line fit procedure.

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

    (default: dict())

Returns: list[array]
The line fit columns are returned.

intIntMatch(self, trans_list, ifn)

source code 

Match the wavelengths of integrated intensities with transitions.

Checks if a blend might be present based on the data, as well as the available transitions.

Note that if a line is observed multiple times in the same band (eg in a line scan), it cannot at this moment be discerned. In other words, there is no point including a line fitted twice in two line scans, as it will not be taken into account for the int matching algorithm.

Parameters:
  • trans_list (list[Transition()]) - The list of transitions for which the check is done.
  • ifn (int) - The index of the filename in self.data_filenames. This is done per file!

mergeSphinx(self, star)

source code 

Merge Sphinx output line profiles on a zero-continuum.

For now only done in wavelength units of micron for PACS/SPIRE spectra.

Parameters:
  • star (Star()) - The Star object for which all lines are collected + merged
Returns: (list,list)
wave list in micron and flux list in Jy