UniDec
Universal Deconvolution of Mass and Ion Mobility Spectra
Functions | Variables
UniDec.unidec_modules.MassSpecBuilder Namespace Reference

Functions

def make_mass_spectrum (array, zrange=(10, 50, mzrange=(2000, 10000, mz_bin_size=1, adductmass=1.00727647, psfun=0, noise=0, baseline=0, kwargs)
 
def get_zrange (params)
 
def get_mzrange (params)
 
def simple_params (masslist, intlist=None, resolution=1000, zwidth=2, rlist=None, kwargs)
 
def simple_spectrum (masslist, kwargs)
 

Variables

string __author__ = 'Michael.Marty'
 

Function Documentation

def UniDec.unidec_modules.MassSpecBuilder.get_mzrange (   params)
From paramaters defining mass spectrum, pick a reasonable m/z range.
:param params: P x 5 array of parameters [mass, mass fwhm, z avg, z std dev, intensity]
:return: m/z range [min m/z , max m/z]

Here is the call graph for this function:

Here is the caller graph for this function:

def UniDec.unidec_modules.MassSpecBuilder.get_zrange (   params)
From paramaters defining mass spectrum, pick a reasonable charge state range.
:param params: P x 5 array of parameters [mass, mass fwhm, z avg, z std dev, intensity]
:return: charge state range [min z , max z]

Here is the caller graph for this function:

def UniDec.unidec_modules.MassSpecBuilder.make_mass_spectrum (   array,
  zrange = (10, 50,
  mzrange = (2000, 10000,
  mz_bin_size = 1,
  adductmass = 1.00727647,
  psfun = 0,
  noise = 0,
  baseline = 0,
  kwargs 
)
Create a new mass spectrum.

First, create the mzaxis from mzrange and the possible charge states from zrange.
Then, add in peaks at the appropriate mz values for the parameters defined in array.
Then, normalize and add optional background and noise.
Finally, renormalize.

:param array: P x 5 array of parameters [mass, mass fwhm, z avg, z std dev, intensity]
:param zrange: Tuple of list define range of allowed charge states
:param mzrange: Tuple or list defining range of m/z values
:param mz_bin_size: delta mz of mzaxis
:param adductmass: Mass of electrospray adduct species
:param psfun: Peak shape function integer code
:param noise: Std deviation of random Gaussian noise to be added to normalized spectrum
:param baseline: Peak intensity of sinusoidal baseline to be added to normalized spectrum
:param kwargs: Keyword catcher
:return: Spectrum, ztab (new spectrum in N x 2 (m/z, intensity) and charge states allowed)

Here is the caller graph for this function:

def UniDec.unidec_modules.MassSpecBuilder.simple_params (   masslist,
  intlist = None,
  resolution = 1000,
  zwidth = 2,
  rlist = None,
  kwargs 
)
Set simple parameters [mass, mass fwhm, z avg, z std dev, intensity] for a mass list and optional arguments.
Average charge is defined as the native charge state. Other parameters are defaults.

:param masslist: list of masses in Da
:param intlist: list of intensities (default is None which gives all as 1)
:param resolution: Mass resolution (delta m/m), Overridden if rlist is not None
:param zwidth: Standard deviation of charge state distribution
:param rlist: List of resolution values for each corresponding mass.
If None, will use a single resolution for all defined by resolution.
:param kwargs: Extra keywords
:return: P x 5 array of parameters [mass, mass fwhm, z avg, z std dev, intensity]

Here is the caller graph for this function:

def UniDec.unidec_modules.MassSpecBuilder.simple_spectrum (   masslist,
  kwargs 
)
For a mass list, create the parameters and ranges for a simple default spectrum.
:param masslist: Mass values
:param kwargs: Keywords of parameters to pass to simple_params and make_mass_spectrum
:return: N x 2 spectrum (m/z, intensity)

Here is the call graph for this function:

Variable Documentation

string UniDec.unidec_modules.MassSpecBuilder.__author__ = 'Michael.Marty'