IsotopeModel#
- class pyopenms.IsotopeModel#
Bases:
InterpolationModelIsotope distribution approximated using linear interpolation
This models a smoothed (widened) distribution, i.e. can be used to sample actual raw peaks (depending on the points you query) If you only want the distribution (no widening), use either EmpiricalFormula::getIsotopeDistribution() // for a certain sum formula or IsotopeDistribution::estimateFromPeptideWeight (double average_weight) // for averagine
Peak widening is achieved by either a Gaussian or Lorentzian shape
- __init__() None#
- __init__(arg: pyopenms.IsotopeModel, /) None
Methods
__init__()Get the center of the Isotope model
Return the Averagine peptide formula (mass calculated from mean mass and charge -- use .setParameters() to set them)
getIntensity(pos)Access model predicted intensity at position 'pos'
Returns the interpolation class
Get the Isotope distribution (without widening) from the last setSamples() call
Get the offset of the model
Returns the interpolation class
setInterpolationStep(interpolation_step)Sets the interpolation step for the linear interpolation of the model
setOffset(offset)Set the offset of the model
setSamples(formula)Set sample/supporting points of interpolation
setScalingFactor(scaling)Sets the scaling factor of the model
Attributes
- AVERAGINE_NUM = 5#
- class Averagines(*values)#
Bases:
Enum- AVERAGINE_NUM = 5#
- C = 0#
- H = 1#
- N = 2#
- O = 3#
- S = 4#
- getMapping()#
Returns a dict mapping int values to enum member name strings.
- C = 0#
- H = 1#
- N = 2#
- O = 3#
- S = 4#
- getCenter() float#
Get the center of the Isotope model
This is a m/z-value not necessarily the monoisotopic mass
- getCharge() int#
- getFormula() pyopenms.EmpiricalFormula#
Return the Averagine peptide formula (mass calculated from mean mass and charge – use .setParameters() to set them)
- getIntensity(pos: float) float#
- getIntensity(coord: float) float
Access model predicted intensity at position ‘pos’
- getInterpolation() pyopenms.LinearInterpolation#
Returns the interpolation class
- getIsotopeDistribution() pyopenms.IsotopeDistribution#
Get the Isotope distribution (without widening) from the last setSamples() call
Useful to determine the number of isotopes that the model contains and their position
- getOffset() float#
Get the offset of the model
- getScalingFactor() float#
Returns the interpolation class
- setInterpolationStep(interpolation_step: float) None#
Sets the interpolation step for the linear interpolation of the model
- setOffset(offset: float) None#
Set the offset of the model
The whole model will be shifted to the new offset without being computing all over This leaves a discrepancy which is minor in small shifts (i.e. shifting by one or two standard deviations) but can get significant otherwise. In that case use setParameters() which enforces a recomputation of the model
- setSamples(formula: pyopenms.EmpiricalFormula) None#
Set sample/supporting points of interpolation
- setScalingFactor(scaling: float) None#
Sets the scaling factor of the model