Package ComboCode :: Package cc :: Package tools :: Package readers :: Module RadiatReader :: Class RadiatReader
[hide private]
[frames] | no frames]

Class RadiatReader

source code


Class for working with radiat files from GASTRoNOoM's input.

Inherits from MolReader, which provides the basic methods for managing spectroscopic data. This class replaces some of those methods to be applied to spectroscopic data given in GASTRoNOoM's input format. This is the former Radiat class, integrated with the new Reader structure.

Note that RadiatReader is independent from MlineReader. MlineReader reads the mline spectroscopic output data, which should in principle be identical to the input data read with RadiatReader from MOLECULE_radiat.dat and MOLECULE_indices.dat.

Collision rate input data are read with CollisReader.

Instance Methods [hide private]
new empty dictionary

__init__(self, fn, ny, nline=None, *args, **kwargs)
Initializing an instance of the RadiatReader class.
source code
 
read(self)
Read the MOLECULE_radiat file and set a dictionary for the instance with all the information.
source code

Inherited from cc.tools.readers.MolReader.MolReader: getLEnergy, getLI, getLWeight, getTEinsteinA, getTFrequency, getTI, getTLower, getTUpper

Inherited from cc.tools.readers.SpectroscopyReader.SpectroscopyReader: get

Inherited from cc.tools.readers.Reader.Reader: getFile, readFile

Inherited from dict: __cmp__, __contains__, __delitem__, __eq__, __ge__, __getattribute__, __getitem__, __gt__, __iter__, __le__, __len__, __lt__, __ne__, __new__, __repr__, __setitem__, __sizeof__, clear, copy, fromkeys, has_key, items, iteritems, iterkeys, itervalues, keys, pop, popitem, setdefault, update, values, viewitems, viewkeys, viewvalues

Inherited from object: __delattr__, __format__, __reduce__, __reduce_ex__, __setattr__, __str__, __subclasshook__

Class Variables [hide private]

Inherited from dict: __hash__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, fn, ny, nline=None, *args, **kwargs)
(Constructor)

source code 

Initializing an instance of the RadiatReader class.

Additional args and kwargs are passed to the dict creation (parent of Reader)

The number of levels and transitions are saved as instance properties.

Parameters:
  • fn (string) - The radiat filename, including filepath.
  • ny (int) - The number of levels included in the spectroscopy
  • nline (int) - The number of transitions included in the spectroscopy. If default, nline isn't known and is determined from the radiat file itself.

    (default: None)

Returns:
new empty dictionary

Overrides: object.__init__

read(self)

source code 

Read the MOLECULE_radiat file and set a dictionary for the instance with all the information.

Done on creation of an instance of the class.