Home | Trees | Indices | Help |
---|
|
Environment with several tools to perform statistics on the peak and integrated intensities of resolved molecular lines.
|
|||
|
|||
|
|||
|
|||
(float,float) |
|
||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
list[Star()] |
|
||
list[Star()] |
|
||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from Inherited from |
|
|||
Inherited from |
|
Initializing an instance of IntIntStats. Then run setInstrument, setModels and setIntensities. The rest of the class works interactively.
|
Set and read the data objects for this statistics module. In this case, a list of sample transitions in which the data will be read is the only input required. Make sure sample_transitions are copies of the originals, such as returned by Transition.extractTransFromStars().
|
The data intensities are stored in the dictionary self.dintint/self.dpeakint, the model intensities in self.mintint/self.mpeakint. They keys in the dictionaries are the Transition to which the sphinx or datafiles belong. The model values are lists in accordance with self.star_grid, the data values are single floats for the first dataset for the transition. In addition, the loglikelihoods are calculated. |
Determine the loglikelihood thresholds from the model grid, assuming the amount of free parameters in the model grid is known. The latter is given by STAT_LLL_P in the CC input. If a selection of models is given, and the index of a sample transition the max lll of the selection of models and threshold value based on that --- for this sample trans --- are returned. No values are remembered in this case.
|
Set a transition given by its index to be included or excluded in the proper best fit determination, through either integrated or peak Tmbs. The other option is to merely look at the 3 sigma level compared to the model peak value. By default, the script checks if dtmb is above 3 sigma in the dataset. Sometimes if dtmb is between 2 sigma and 3 sigma, one may want to include it properly anyway. Also if the peak Tmb determination is not very accurate just because of the noisy data, it may be necessary to include it regardless. This is possible here. Note that the state of the 'noisiness' has to be included when calling this method. False or True works, of course.
|
Change criterion for noisy lines. By default, the script checks if the peak of the line profile is above 3 sigma in the dataset. With this method, the factor can be changed. The integrated line strengths are also recalculated based on the new criterion.
|
Reset the line strengths of the data and calculate the ratio with model line strengths. Also recalculate the loglikelihood in this case. The fitted line profile is used in case the line is flagged as noisy by setting use_fit. The fit is either a gaussian or a parabolic fit as determined by LPTools.fitLP |
Include a transition in selecting the best fit models. By default, all transitions that have data and sphinx models associated with them are selected. Use the index of the transition to include them.
|
Exclude a transition in selecting the best fit models. By default, all transitions that have data and sphinx models associated with them are selected. Use the index of the transition to exclude them.
|
List all the transitions that have both data and sphinx models associated with them. Can be used to figure the index of each transition so you can in- or exclude them. Also indicates whether it is a noisy line or not. |
Change the default uncertainty for a given transition. Makes use of the template transition index! (see listTrans method) The value is given as a decimal number, i.e. x% / 100.
|
Set the loglikelihood below which models are considered best fit models Makes use of the template transition index! An automatically calculated value is determined as well from the lll values of all models. This assumes the amount of variable parameters in the model grid is known, and set through the CC input! (STAT_LLL_P)
|
Convenience method that runs setLogelikelihoodThreshold().
|
Print the statistics for all transitions and models.
|
Returns a list of Star() models for which the uncertainty criteria are satisfied for the selected transitions. Transitions can be selected or deselected by the includeTrans and excludeTrans methods. The uncertainty criteria are preset but can be changed by the setUncertainty method. Note that for lines in which the peak Tmb is less than 3*sigma, the goodness of fit is determined based on the comparison between peak of sphinx model and the 3*sigma level. Less: included, more: excluded. Note that the sphinx peak values are scaled down by the uncertainty on the data, to take into account data uncertainties as well.
|
Same function as selectBestFitModels, but uses only the loglikelihood statistic.
|
Determines whether a model lies within a 95% confidence interval around the best fitting model (per line). As the best fitting model is included in the arrays, at least one model within the range is to be expected. Based on Decin et al. 2007:
The 'output' is divided into three components. * Dictionary confidenceLLL (transitions as keywords) Gives the difference between the calculate loglikelihood and the threshold value * Dictionary condidenceLLL_verdict (transitions as keywords) Contains the result (1 or 0) for every model per transition * Array confidenceLLL_models Models that fit all included transitions |
Checks which lines are fitted by which models, using all four selection criteria. For every criterion, a list 'ocurrences_bfmxxx' is made. This list contains a sublist for each model, len(list) = # models. Every sublist contains a one or zero, indicating wether a line is fitted by the model according to the criterion, len(sublist) = # lines. The lists fittedLines_bfmxxx contain how often a line was modelled according to the criterion, len(list) = # lines. The lists fittedModels_bfmxxx contain the number of lines each model fitted according to the criterion, len(list) = # models. |
Checks which lines are fitted by which models according to the loglikelihood statistic. A list 'ocurrences_bfmlll' is made. This list contains a sublist for each model, len(list) = # models. Every sublist contains a one or zero, indicating wether a line is fitted by the model according to the criterion, len(sublist) = # lines. The list fittedLines_bfmlll contains how often a line was modelled according to the criterion, len(list) = # lines. The list fittedModels_bfmlll contains the number of lines each model fitted according to the criterion, len(list) = # models. |
Calculate the loglikelihood function per transition. Output similar to that of calcRatioxxxTmb. Output can be found in: * Dictionary line_lll: dictionary containing whether a line satisfies the condition or not. One list per transition, each list containing the verdict per model. * List model_lll: list containing the verdict per transition, per model. Number of lists = number of models. Length of each list = number of transitions. * List verdict_model_lll: list containing the verdict per transition, per model. Number of lists = number of models. Each list contains a single number. |
Calculate whether the loglikelihood function per transition kies within the confidence interval. Output similar to that of calcRatioxxxTmb. Output can be found in: * Dictionary line_lll_range: dictionary containing whether a line satisfies the condition or not. One list per transition, each list containing the verdict per model. * List model_lll_range: list containing the verdict per transition, per model. Number of lists = number of models. Length of each list = number of transitions. * List verdict_model_lll_range: list containing the verdict per transition, per model. Number of lists = number of models. Each list contains a single number. |
Calculate the ratio of the integrated main beam intensity per transition.
|
Calculate the ratio of the peak main beam intensity per transition.
|
Combine the ratio of the integrated and peak main beam intensity per transition.
|
Calculate the (reduced) chi squared of the integrated main beam intensities. Output can be found in:
|
Can only be perfomed after self.selectBestFitperLine(). Visualization of self.occurences_bfm(mode), self,verdict_(mode)_soft, and self.occurences_bfmlll. |
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Mon Nov 7 18:01:58 2016 | http://epydoc.sourceforge.net |