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

Class LineList

source code

Reading, managing and parsing of line lists taken from online databases.

Instance Methods [hide private]
 
__init__(self, fn, x_min=1e-10, x_max=10000000000.0, unit='micron', min_strength=None, max_exc=None)
Creating a LineList object.
source code
 
makeCatInt(self, numeral)
Return an integer matching the given string from the catalog (to deal with 'A#' numerals).
source code
 
__parseCatalog(self, data)
Parse Line Lists of standard format, such as for JPL or CDMS.
source code
 
__readCDMS(self)
Read data from CDMS line list catalogs for a specific molecule.
source code
 
__readJPL(self)
Read data from JPL line list catalogs for a specific molecule.
source code
 
read(self)
Start reading all requested line list data.
source code
 
getLineList(self)
Return the loaded line list, with frequencies in MHz.
source code
list[Transition]
makeTransitions(self, molecule, telescope=None, offset=0.0, n_quad=100, fraction_tau_step=0.01, min_tau_step=0.0001, write_intensities=0, tau_max=12.0, tau_min=-6.0, check_tau_step=0.01)
Make a list of transitions from the line list that was read.
source code
Method Details [hide private]

__init__(self, fn, x_min=1e-10, x_max=10000000000.0, unit='micron', min_strength=None, max_exc=None)
(Constructor)

source code 

Creating a LineList object.

Parameters:
  • fn (str) - The full path and filename to the spectroscopy file. Must contain either the CDMS or the JPL string.
  • x_min (float) - Minimum value for reading data in frequency/wavelength If default, the lowest frequency is the one in the file.

    (default: 1e-10)

  • x_max (float) - Maximum value for reading data in frequency/wavelength If default, the highest frequency is the one in the file

    (default: 1e10)

  • unit (string) - Unit of x_min/x_max (micron,GHz,MHz,Hz). Any astropy.constants unit works. This can also be a Unit() class object.

    (default: 'micron')

  • min_strength (float) - if None all are included, else only lines with strengths above this value are included (log scale, nm2*Mhz)

    (default: None)

  • max_exc (float) - if None all are included, else only lines with excitation energies below this value are included (cm-1)

    (default: None)

makeCatInt(self, numeral)

source code 

Return an integer matching the given string from the catalog (to deal with 'A#' numerals).

Parameters:
  • numeral (string) - The numeral to be converted to integer

__parseCatalog(self, data)

source code 

Parse Line Lists of standard format, such as for JPL or CDMS.

Parameters:
  • data (list[string]) - The content of the inputfile, no replaced spaces or delimiter used when reading with DataIO.readFile!

makeTransitions(self, molecule, telescope=None, offset=0.0, n_quad=100, fraction_tau_step=0.01, min_tau_step=0.0001, write_intensities=0, tau_max=12.0, tau_min=-6.0, check_tau_step=0.01)

source code 

Make a list of transitions from the line list that was read.

Default transitions parameters are the same as those used in Transition.Transition.__init__().

Requires a Molecule() object to be passed to the method call.

Parameters:
  • molecule (Molecule()) - The molecule for these transitions
  • telescope (string) - The telescope that observed given line

    (default: None)

  • offset (float) - The offset from center pixel of observed transition

    (default: None)

  • n_quad (int) - The number of grid points in the formal integration when calculating the line profile in sphinx.

    (default: 100)

  • fraction_tau_step (float) - tau_total*fraction_tau_step gives min. delta_tau in strahl.f. If too low, min_tau_step will be used.

    (default: 1e-2)

  • min_tau_step (float) - minimum of delta_tau in strahl.f

    (default: 1e-4)

  • write_intensities (bool) - set to 1 to write the intensities of first 50 impact-parameters at the end of sphinx

    (default: 0)

  • tau_max (float) - maximum optical depth used for the calculation of the formal integral

    (default: 12.)

  • tau_min (float) - maximum optical depth used for the calculation of the formal integral

    (default: -6.)

  • check_tau_step (float) - check.par.in sphinx if step in tau not too large

    (default: 0.01)

Returns: list[Transition]
The transitions