Package ComboCode :: Package cc :: Package modeling :: Package objects :: Module Transition :: Class Transition
[hide private]
[frames] | no frames]

Class Transition

source code

A class to deal with transitions in GASTRoNOoM.

Instance Methods [hide private]
 
__init__(self, molecule, telescope=None, vup=0, jup=0, kaup=0, kcup=0, nup=None, vlow=0, jlow=0, kalow=0, kclow=0, nlow=None, offset=0.0, frequency=None, exc_energy=None, int_intensity_log=None, 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, vibrational='', path_gastronoom=None)
Initiate a Transition instance, setting all values for the quantummechanical parameters to zero (by default).
source code
string
__str__(self)
Printing a transition as it should appear in the GASTRoNOoM input file.
source code
bool
__eq__(self, other)
Compare two transitions and return true if equal.
source code
bool
__ne__(self, other)
Compare two transitions and return true if not equal.
source code
int
__hash__(self)
Return a hash number based on the string of the transition.
source code
string
getInputString(self, include_nquad=1)
Return a string giving the CC input line for this transition.
source code
string
getLineSpec(self)
Make a string that suits telescope.spec inputfile.
source code
float
getBeamwidth(self)
Calculate the beamwidth specific for the telescope.
source code
float
getEfficiency(self)
Calculate telescope beam efficiency.
source code
dict()
makeDict(self, in_progress=0)
Return a dict with transition string, and other relevant parameters.
source code
string
makeSphinxFilename(self, number='*', include_path=0)
Return a string in the sphinx filename format.
source code
float
getFrequency(self)
Get frequency of the transition from the radiat.dat files.
source code
float
getEnergyUpper(self, unit=<Quantity 1.0 1 / cm>)
Return the energy level of the upper state of this transition.
source code
float
getEnergyLower(self, unit=<Quantity 1.0 1 / cm>)
Return the energy level of the lower state of this transition.
source code
 
__setIndices(self)
Set the transition index of this transition from the spectroscopy file.
source code
str
makeAxisLabel(self, include_mol=1)
Make a label suitable to be used on an axis in a plot.
source code
string
makeLabel(self, inc_vib=1, return_vib=0)
Return a short-hand label for this particular transition.
source code
 
setModelId(self, model_id)
Set a model_id for the transition, identifying the model for SPHINX!
source code
string
getModelId(self)
Return the model_id associated with this transition.
source code
bool
isMolecule(self)
Is this a Molecule() object?
source code
bool
isTransition(self)
Is this a Transition() object?
source code
bool
isDone(self)
Return True if successfully calculated by sphinx, False otherwise.
source code
 
readSphinx(self)
Read the sphinx output if the model id is valid.
source code
 
resetData(self)
Reset the data read for this object.
source code
 
addDatafile(self, datadict, replace=0)
Add a datadict for this transition.
source code
 
readData(self)
Read the datafiles associated with this transition if available.
source code
 
setData(self, trans, replace=0)
Set data equal to the data in a different Transition object, but for the same transition.
source code
float
getVlsr(self, index=0)
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.
source code
float
getNoise(self, index=0)
Return the noise value of the FIRST data object in this transition, if available.
source code
float
getVexp(self, index=0)
Get the gas terminal velocity as estimated from a line profile fitting routine for the FIRST data object.
source code
float
getBestVlsr(self, index=0)
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
source code
float
getIntIntIntSphinx(self, units='si', cont_subtract=1)
Calculate the integrated intrinsic intensity of the sphinx line profile in SI or cgs units.
source code
float
getIntConIntSphinx(self, cont_subtract=1)
Calculate the integrated convolved intensity of the sphinx line profile over velocity.
source code
float
getIntTmbSphinx(self, cont_subtract=1)
Calculate the integrated Tmb of the sphinx line profile over velocity.
source code
float
getPeakTmbSphinx(self)
Get the peak Tmb of the sphinx line profile.
source code
(float,float)
getIntTmbData(self, index=0, use_fit=0, units='tmb')
Calculate the integrated Tmb of the data line profile over velocity.
source code
float
getPeakTmbData(self, index=0, method='mean', **kwargs)
Get the peak Tmb of the data line profile.
source code
 
setIntIntUnresolved(self, fn, dint, dint_err, vlsr, st_blends=None)
Set the integrated intensity for this transition measured in given filename.
source code
(float,float,list)
getIntIntUnresolved(self, fn='')
If already set, the integrated intensity can be accessed here based on filename (multiple measurements can be available for a single transition).
source code
float
getLoglikelihood(self, use_bestvlsr=1, index=0, normalise=1, vmin=0.0, vmax=0.0, use_fit=0)
Calculate the loglikelihood of comparison between sphinx and dataset.
source code
Method Details [hide private]

__init__(self, molecule, telescope=None, vup=0, jup=0, kaup=0, kcup=0, nup=None, vlow=0, jlow=0, kalow=0, kclow=0, nlow=None, offset=0.0, frequency=None, exc_energy=None, int_intensity_log=None, 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, vibrational='', path_gastronoom=None)
(Constructor)

source code 

Initiate a Transition instance, setting all values for the quantummechanical parameters to zero (by default).

Parameters:
  • molecule (Molecule()) - The molecule to which this transition belongs
  • telescope (string) - The telescope with which the transition is observed

    (default: None)

  • vup (int) - The upper vibrational level

    (default: 0)

  • jup (int) - The upper rotational level

    (default: 0)

  • kaup (int) - The upper level of the first projection of the ang mom

    (default: 0)

  • kcup (int) - The upper level of the second projection of the ang mom

    (default: 0)

  • nup (int) - if not None it is equal to Kaup and only relevant for SO/hcn-type molecules

    (default: 0)

  • vlow (int) - The lower vibrational level

    (default: 0)

  • jlow (int) - The lower rotational level

    (default: 0)

  • kalow (int) - The lower level of the first projection of the ang mom

    (default: 0)

  • kclow (int) - The lower level of the second projection of the ang mom

    (default: 0)

  • nlow (int) - if not None it is equal to Kalow, and only relevant for SO-type molecules

    (default: None)

  • offset (float) - The offset of the radiation peak with respect to the central pixel of the observing instrument. Only relevant for non-point corrected PACS/SPIRE or resolved data (so not relevant when the intrinsic line strengths are used from the models)

    (default: 0.0)

  • n_quad (int) - Number of impact par. in quadrature int(Inu pdp). Relevant for the ray-tracing of the line profiles

    (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)

  • frequency (float) - if not None the frequency of the transition is taken to be this parameter in Hz, if None the frequency of this transition is derived from the GASTRoNOoM radiative input file

    No indices are searched for if frequency is given here. Usually used only for line listing.

    (default: None)

  • exc_energy (float) - the excitation energy (cm-1, from CDMS/JPL) if you want it included in the Transition() object, not mandatory!

    (default: None)

  • int_intensity_log (float) - the integrated intensity of the line in logscale from CDMS/JPL, if you want it included in the Transition() object, not mandatory!

    (default: None)

  • vibrational (string) - In the case of line lists, this keyword indicates the type of vibrational excitation, relevant fi for H2O. Empty string if vibrational groundstate

    (default: '')

  • path_gastronoom (string) - model output folder in the GASTRoNOoM home

    (default: None)

__str__(self)
(Informal representation operator)

source code 

Printing a transition as it should appear in the GASTRoNOoM input file.

Returns: string
The Transition string

__eq__(self, other)
(Equality operator)

source code 

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.

Returns: bool
The comparison

__ne__(self, other)

source code 

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.

Returns: bool
The negative comparison

__hash__(self)
(Hashing function)

source code 

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.

Returns: int
The hash number:

getInputString(self, include_nquad=1)

source code 

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.

Parameters:
  • include_nquad (bool) - Include the nquad number at the end of the str

    (default: 1)

Returns: string
the input line for this transition

getLineSpec(self)

source code 

Make a string that suits telescope.spec inputfile.

Returns: string
The Line spec string

getBeamwidth(self)

source code 

Calculate the beamwidth specific for the telescope.

Returns: float
The beamwidth

getEfficiency(self)

source code 

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.

Returns: float
The beam efficiency

makeDict(self, in_progress=0)

source code 

Return a dict with transition string, and other relevant parameters.

Parameters:
  • in_progress (bool) - add an extra dict entry "IN_PROGRESS" if the transition is still being calculated.

    (default: 0)

Returns: dict()
The transition dictionary including all relevant, defining information

makeSphinxFilename(self, number='*', include_path=0)

source code 

Return a string in the sphinx filename format.

Parameters:
  • number (string) - the number in the filename (sph*, sph1 or sph2, hence can be *, 1, 2)

    (default: '*')

  • include_path (bool) - Include the full filepath.

    (default: 0)

Returns: string
The sphinx filename for this transition

getFrequency(self)

source code 

Get frequency of the transition from the radiat.dat files.

Returns: float
frequency in Hz

getEnergyUpper(self, unit=<Quantity 1.0 1 / cm>)

source code 

Return the energy level of the upper state of this transition.

Parameters:
  • unit (string/unit) - The unit of the returned values. Can be any valid units str from the astropy units module (energy), or the unit itself. 'cm-1' and 'cm^-1' are accepted as well.

    (default: 1./u.cm)

Returns: float
energy level in chosen unit

getEnergyLower(self, unit=<Quantity 1.0 1 / cm>)

source code 

Return the energy level of the lower state of this transition.

Parameters:
  • unit (string/unit) - The unit of the returned values. Can be any valid units str from the astropy units module (energy), or the unit itself. 'cm-1' and 'cm^-1' are accepted as well.

    (default: 1./u.cm)

Returns: float
energy level in chosen unit

__setIndices(self)

source code 

Set the transition index of this transition from the spectroscopy file.

The level indices for lower and upper level are also set.

makeAxisLabel(self, include_mol=1)

source code 

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.

Parameters:
  • include_mol (bool) - Include the molecule name in the label.

    (default: 1)

Returns: str
The label

makeLabel(self, inc_vib=1, return_vib=0)

source code 

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.

Parameters:
  • inc_vib (bool) - Include the vibrational state in the label. Is always True is self.vibrational is not None.

    (default: 1)

  • return_vib (bool) - Only return a label for the vibrational state. Does not work if vibrational is not None.

    (default: 0)

Returns: string
The transition label

setModelId(self, model_id)

source code 

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.

Parameters:
  • model_id (string) - The model id

getModelId(self)

source code 

Return the model_id associated with this transition.

None if not yet set.

Empty string if the model calculation failed.

Returns: string
The model id of this transition

isMolecule(self)

source code 

Is this a Molecule() object?

Returns: bool
Molecule()?

isTransition(self)

source code 

Is this a Transition() object?

Returns: bool
Transition()?

isDone(self)

source code 

Return True if successfully calculated by sphinx, False otherwise.

Returns: bool
Finished calculation?

resetData(self)

source code 

Reset the data read for this object. Datafiles will have to be added anew through addDataFile or setData.

addDatafile(self, datadict, replace=0)

source code 

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.

Parameters:
  • datadict (dict()) - the filenames and associated fit results
  • replace (bool) - Replace data if they had already been added before.

    (default: 0)

setData(self, trans, replace=0)

source code 

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.

Parameters:
  • trans (Transition()) - The other Transition() object, assumes the transition is the same, but possibly different sphinx models.
  • replace (bool) - Replace data if they had already been added before.

    (default: 0)

getVlsr(self, index=0)

source code 

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.

Parameters:
  • index (int) - The data list index of the requested noise value

    (default: 0)

Returns: float
the source velocity taken from the fits file OR Star.dat. 0 if data are not available. In km/s!

getNoise(self, index=0)

source code 

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.

Parameters:
  • index (int) - The data list index of the requested noise value

    (default: 0)

Returns: float
The noise value

getVexp(self, index=0)

source code 

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.

Parameters:
  • index (int) - The data list index of the requested noise value

    (default: 0)

Returns: float
vexp

getBestVlsr(self, index=0)

source code 

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.

Parameters:
  • index (int) - The data list index of the requested noise value

    (default: 0)

Returns: float
the best guess vlsr, or the initial guess if no sphinx or data are available [will return vlsr included in fitsfiles if available].

getIntIntIntSphinx(self, units='si', cont_subtract=1)

source code 

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!

Parameters:
  • cont_subtract (bool) - Subtract the continuum value outside the line from the whole line profile.

    (default: 1)

  • units (string) - The unit system in which the integrated intensity is returned. Can be 'si' or 'cgs'.

    (default: 'si')

Returns: float
The integrated intrinsic intensity of the line profile in SI or cgs units. (W/m2 or erg/s/cm2)

getIntConIntSphinx(self, cont_subtract=1)

source code 

Calculate the integrated convolved intensity of the sphinx line profile over velocity.

Returns None if no sphinx profile is available yet!

Parameters:
  • cont_subtract (bool) - Subtract the continuum value outside the line from the whole line profile.

    (default: 1)

Returns: float
The integrated convolved intensity of the line profile in erg km/s/s/cm2

getIntTmbSphinx(self, cont_subtract=1)

source code 

Calculate the integrated Tmb of the sphinx line profile over velocity.

Returns None if no sphinx profile is available yet!

Parameters:
  • cont_subtract (bool) - Subtract the continuum value outside the line from the whole line profile.

    (default: 1)

Returns: float
The integrated model Tmb profile in K km/s

getPeakTmbSphinx(self)

source code 

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.

Returns: float
The peak Tmb of the sphinx line profile

getIntTmbData(self, index=0, use_fit=0, units='tmb')

source code 

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 default absolute flux calibration uncertainty from Telescope.dat
  • The above + the fitting uncertainty [TBI]
  • The abs flux cal uncertainty set in Radio.py + the fitting uncertainty [TBI]

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.

Parameters:
  • index (int) - The data list index of the requested noise value

    (default: 0)

  • use_fit (bool) - Force the use of the fitted line profile.

    (default: 0)

  • units (str) - The unit of the integrated line strength. Can be returned in K Km/s (tmb), erg/s/cm2 (cgs) or w/m2 (si).

    (default: 'tmb')

Returns: (float,float)
The integrated line strength and the relative uncertainty in the requested units.

getPeakTmbData(self, index=0, method='mean', **kwargs)

source code 

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.

Parameters:
  • index (int) - The data list index of the requested noise value

    (default: 0)

  • method (str) - The method applied: either 'mean' or 'fit'. Mean derives the peak value from the mean of the npoints flux points around the vlsr. Fit takes the central peak flux at from the fit.

    (default: 'mean')

  • kwargs (dict) - Extra keywords passed on to the LPTools method for peak determination.

    (default: {})

Returns: float
The peak Tmb of the sphinx line profile

setIntIntUnresolved(self, fn, dint, dint_err, vlsr, st_blends=None)

source code 

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.

Parameters:
  • fn (string) - The data filename that contains the measured integrated intensity.
  • dint (float or string) - The value for the integrated intensity in W/m2. If the line is part of a blend that has already been added, this may also say 'inblend'. All transitions involved in the blend are then given by st_blends.
  • dint_err (float) - The fitting uncertainty on the intensity + absolute flux calibration uncertainty of 20%. Relative value!
  • vlsr (float) - The source velocity with respect to the local standard of rest in cm/s.
  • st_blends (list[Transition()]) - List of sample transitions involved in a line blend detected by finding multiple central wavs in a wavelength resolution bin

    (default: None)

getIntIntUnresolved(self, fn='')

source code 

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.

Parameters:
  • fn (string) - The data filename that contains the measured integrated intensity. Can be set to '' or None if simply the first entry in the keys() list is to be used. Mostly only one line strength is associated with the object anyway.

    (default: '')

Returns: (float,float,list)
The integrated intensity measured in unresolved data for this filename, in SI units of W/m2, and the fitting uncertainty + absolute flux calibration uncertainty (relative value!), and the blends if applicable.

getLoglikelihood(self, use_bestvlsr=1, index=0, normalise=1, vmin=0.0, vmax=0.0, use_fit=0)

source code 

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.

Parameters:
  • use_bestvlsr (bool) - Use the fitted best-guess for the v_lsr when determining the velocity grid for the model. If not, the vlsr from the Star.dat file or the fits file is used.

    (default: 1)

  • index (int) - The data list index of the requested noise value

    (default: 0)

  • normalise (bool) - Normalise the data and model lines to the integrated line strength of the observed line.

    (default: 1)

  • vmin (float) - The minimum value in km/s of the spectral line window. Ideally this is the same for all lines under consideration. If an invalid spectral window is given (vmax==vmin, or vmin>vmax), the spectral window is taken from the line fit results. This leads to a different window for each line under consideration, and is not recommended for calculating the loglikelihood.

    (default: 0.0)

  • vmax (float) - The maximum value in km/s of the spectral line window. Ideally this is the same for all lines under consideration. If an invalid spectral window is given (vmax==vmin, or vmin>vmax), the spectral window is taken from the line fit results. This leads to a different window for each line under consideration, and is not recommended for calculating the loglikelihood.

    (default: 0.0)

  • use_fit (bool) - Force the use of the fitted line profile.

    (default: 0)

Returns: float
The loglikelihood