Beispiel #1
0
def BillerBiemann(im, points=3, scans=1):

    """
    @summary: BillerBiemann Deconvolution

        Deconvolution based on the algorithm of Biller and Biemann (1974)

    @param im: An IntensityMatrix object
    @type im: pyms.GCMS.Class.IntensityMatrix
    @param points: Peak if maxima over 'points' number of scans (Default 3)
    @type points: IntType
    @param scans: To compensate for spectra skewing,
        peaks from 'scans' scans are combined (Default 1).
    @type scans: IntType

    @return: List of Peak objects
    @rtype: ListType

    @author: Andrew Isaac
    """

    rt_list = im.get_time_list()
    mass_list = im.get_mass_list()
    peak_list = []
    maxima_im = get_maxima_matrix(im, points, scans)
    numrows = len(maxima_im)
    for row in range(numrows):
        if sum(maxima_im[row]) > 0:
            rt = rt_list[row]
            ms = MassSpectrum(mass_list, maxima_im[row])
            peak = Peak(rt, ms)
            peak.set_pt_bounds([0,row,0])  # store IM index for convenience
            peak_list.append(peak)

    return peak_list
Beispiel #2
0
def BillerBiemann(im, points=3, scans=1):
    """
    @summary: BillerBiemann Deconvolution

        Deconvolution based on the algorithm of Biller and Biemann (1974)

    @param im: An IntensityMatrix object
    @type im: pyms.GCMS.Class.IntensityMatrix
    @param points: Peak if maxima over 'points' number of scans (Default 3)
    @type points: IntType
    @param scans: To compensate for spectra skewing,
        peaks from 'scans' scans are combined (Default 1).
    @type scans: IntType

    @return: List of Peak objects
    @rtype: ListType

    @author: Andrew Isaac
    """

    rt_list = im.get_time_list()
    mass_list = im.get_mass_list()
    peak_list = []
    maxima_im = get_maxima_matrix(im, points, scans)
    numrows = len(maxima_im)
    for row in range(numrows):
        if sum(maxima_im[row]) > 0:
            rt = rt_list[row]
            ms = MassSpectrum(mass_list, maxima_im[row])
            peak = Peak(rt, ms)
            peak.set_pt_bounds([0, row, 0])  # store IM index for convenience
            peak_list.append(peak)

    return peak_list