Home | Trees | Indices | Help |
---|
|
A class to deal with transitions in GASTRoNOoM.
|
|||
|
|||
string |
|
||
bool |
|
||
bool |
|
||
int |
|
||
string |
|
||
string |
|
||
float |
|
||
float |
|
||
dict() |
|
||
string |
|
||
float |
|
||
float |
|
||
float |
|
||
|
|||
str |
|
||
string |
|
||
|
|||
string |
|
||
bool |
|
||
bool |
|
||
bool |
|
||
|
|||
|
|||
|
|||
|
|||
|
|||
float |
|
||
float |
|
||
float |
|
||
float |
|
||
float |
|
||
float |
|
||
float |
|
||
float |
|
||
(float,float) |
|
||
float |
|
||
|
|||
(float,float,list) |
|
||
float |
|
|
Initiate a Transition instance, setting all values for the quantummechanical parameters to zero (by default).
|
Printing a transition as it should appear in the GASTRoNOoM input file.
|
Compare two transitions and return true if equal. The condition is the string representation of this Transition(). Note that the other properties included in the self.makeDict() dictionary are not compared. Those properties do not determine whether a transition is equal or not. In this sense equal refers to the quantum numbers, telescope and offset properties, ie the tags that go into the GASTRoNOoM model.
|
Compare two transitions and return true if not equal. The condition is the string representation of this Transition(). Note that the other properties included in the self.makeDict() dictionary are not compared. Those properties do not determine whether a transition is equal or not. In this sense equal refers to the quantum numbers, telescope and offset properties, ie the tags that go into the GASTRoNOoM model.
|
Return a hash number based on the string of the transition. The condition is the string representation of this Transition(). Note that the other properties included in the self.makeDict() dictionary are not compared. Those properties do not determine whether a transition is equal or not. In this sense equal refers to the quantum numbers, telescope and offset properties, ie the tags that go into the GASTRoNOoM model.
|
Return a string giving the CC input line for this transition. This includes N_QUAD by default, but can be excluded if needed. The shorthand naming convention of the molecule is used, as opposed to the str() method.
|
Make a string that suits telescope.spec inputfile.
|
Calculate the beamwidth specific for the telescope.
|
Calculate telescope beam efficiency. Telescope specific! The beam efficiency is included in the .spec files for GASTRoNOoM. This number however is not used in any calculations of the line profile and is included here for reference only. The numbers currently are correct only for HIFI.
|
Return a dict with transition string, and other relevant parameters.
|
Return a string in the sphinx filename format.
|
Get frequency of the transition from the radiat.dat files.
|
Return the energy level of the upper state of this transition.
|
Return the energy level of the lower state of this transition.
|
Set the transition index of this transition from the spectroscopy file. The level indices for lower and upper level are also set. |
Make a label suitable to be used on an axis in a plot. At the moment always returns a label typical for integrated line strength.
|
Return a short-hand label for this particular transition. These labels can be used for plot line identifications for instance. If self.vibrational is not None, it always concerns a line list and is included as well.
|
Set a model_id for the transition, identifying the model for SPHINX! May or may not be equal to the molecule's id, depending on the input parameters.
|
Return the model_id associated with this transition. None if not yet set. Empty string if the model calculation failed.
|
Is this a Molecule() object?
|
Is this a Transition() object?
|
Return True if successfully calculated by sphinx, False otherwise.
|
Reset the data read for this object. Datafiles will have to be added anew through addDataFile or setData. |
Add a datadict for this transition. Includes filenames as keys, and fit results as values (can be None, in which case the filename is excluded) The filenames are saved in self.datafiles, the fitresults in self.fittedlprof. If datadict has been given a valid value, the self.lpdata list is set back to None, so the datafiles can all be read again. When called for a SPIRE or PACS transition, no datafiles are added. The fit results include: The gas terminal velocity, its error, the soft parabola function and possibly the extra gaussian will be set. It is possible the SP is a gaussian instead, if a soft parabola did not work well (the no gamma parameter is included in the dictionary). The fit results are taken from the radio database which has the option to (re-)run the LPTools.fitLP method. If no fit results are available there, no data can be used for this instance of Transition(). Typically, the entry db[star_name][transition] is what is given here.
|
Set data equal to the data in a different Transition object, but for the same transition. Does not erase data if they have already been set in this object, unless explicitly requested. A check is ran to see if the transition in both objects really is the same. Sphinx model id may differ! Avoids too much overhead when reading data from files. The same is done for the fitresults from LPTools.fitLP() taken out of the Radio database.
|
Return the vlsr read from the fits file of a resolved-data object, or taken from the Star.dat file in case of unresolved data. Note that resolved data may also return vlsr from Star.dat if the vlsr in the data file is significantly different from the value in Star.dat. This is taken from the first lpdata object available by default, but can be chosen through the index keyword.. Returns 0.0 if not an unresolved line, and there are no data available. This is different from the getBestVlsr() method, which determines the best matching vlsr between data and sphinx, if both are available.
|
Return the noise value of the FIRST data object in this transition, if available. Note that None is returned if no data are available. A different index than the default allows access to the other data objects.
|
Get the gas terminal velocity as estimated from a line profile fitting routine for the FIRST data object. A different index than the default allows access to the other data objects.
|
If self.best_vlsr is None, the best source velocity will be guessed by comparing chi^2 values between different values for the source velocity May be different from input value vlsr, the original expected source velocity (from Star.dat)! By default, based on the first dataset in self.lpdata. Note that multiple datasets might be included. If so, a different index can be given to do the scaling based on a different data object. Scaling is done for only one datase. Since different datasets are for the same telescope, the same line and (usually) the same conditions, the source velocity is not expected to be different for the different datasets anyway. Method will attempt to call self.readData and readSphinx if either are not available. If data are still not available, the initial guess is returned. If data are available, but sphinx isn't, vlsr from the fits files is returned, and the initial guess is returned in case of txt files.
|
Calculate the integrated intrinsic intensity of the sphinx line profile in SI or cgs units. Velocity is converted to frequency before integration. Returns None if no sphinx profile is available yet!
|
Calculate the integrated convolved intensity of the sphinx line profile over velocity. Returns None if no sphinx profile is available yet!
|
Calculate the integrated Tmb of the sphinx line profile over velocity. Returns None if no sphinx profile is available yet!
|
Get the peak Tmb of the sphinx line profile. Returns None if no sphinx profile is available yet. Is equal to the mean of the 5 points around the center of the profile.
|
Calculate the integrated Tmb of the data line profile over velocity. Note that by default only the first of data profiles is used for this, if there are multiple profiles available for this transition. (i.e. multiple observations of the same transition with the same telescope) A different index than the default allows access to the other data objects. Makes use of the results from the LPTools.fitLP method taken from the Radio database upon adding datafiles. If no extra gaussian is used, the integrated data profile is returned. Otherwise, the soft parabola fit is integrated instead to avoid taking into account an absorption feature in the profile. The fitted line profile can be forced to be used for the integrated line strength. The uncertainty is also returned. Three options:
The fitting uncertainty is currently not yet implemented, nor the option to add the the flux calibration uncertainty to Radio.py. [TBI] Returns None if no data are available. CGS or SI units can be requested as well, where the profile is converted to Fnu before integration via Fnu = Tmb/(pi*tel_diameter**2/8/k_B). This does not work for PACS or SPIRE data.
|
Get the peak Tmb of the data line profile. Returns None if no sphinx profile or data are available yet. Is equal to the mean of the 5 points in the data profile around the center of the sphinx profile (ie in the same velocity bin as getPeakTmbSphinx). Makes use of the best_vlsr, so that is ran first. Note that by default only the first of data profiles is used for this, if there are multiple profiles available for this transition. (i.e. multiple observations of the same transition with the same telescope) A different index than the default allows access to the other data objects. This does not work for PACS or SPIRE data.
|
Set the integrated intensity for this transition measured in given filename. (in SI units of W/m2) A negative value is given for those lines suspected of being in a blend both by having at least 2 model transitions in a fitted line's breadth or by having a fitted_fwhm/intrinsic_fwhm of ~ 1.2 or more. The vlsr is also passed through this function as that is only available from the data objects (in this case the Spire or Pacs class). For unresolved lines, vlsr is read from Star.dat.
|
If already set, the integrated intensity can be accessed here based on filename (multiple measurements can be available for a single transition). Always set and returned in W/m2! Must have been set through setIntIntUnresolved()! Otherwise returns None. A negative value is given for those lines suspected of being in a blend both by having at least 2 model transitions in a fitted line's breadth or by having a fitted_fwhm/intrinsic_fwhm of ~ 1.2 or more.
|
Calculate the loglikelihood of comparison between sphinx and dataset. Gives a measure for the goodness of the fit of the SHAPE of the profiles. Note that by default only the first of data profiles is used for this, if there are multiple profiles available for this transition. (i.e. multiple observations of the same transition with the same telescope) A different index than the default allows access to the other data objects. Done for the dataset with given index! Makes use of the interpolated sphinx profile for the best vlsr, see self.getBestVlsr() if use_bestvlsr is True. If this keyword is False, interpolates the sphinx model for the vlsr from Star.dat or the fits file. Returns None if sphinx or data profile are not available. Rescales the sphinx profile according to the difference in integrated Tmb between dataset and sphinx profile.
|
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Mon Nov 7 18:01:57 2016 | http://epydoc.sourceforge.net |