nmrglue.analysis.peakpick.pick

nmrglue.analysis.peakpick.pick(data, pthres, nthres=None, msep=None, algorithm='connected', est_params=True, lineshapes=None, edge=None, diag=False, c_struc=None, c_ndil=0, cluster=True, table=True, axis_names=['A', 'Z', 'Y', 'X'])[source]

Pick (find) peaks in a region of a NMR spectrum.

Parameters :

data : ndarray

Region of NMR spectrum to pick peaks from.

pthres : float

Minimum peak height for positive peaks. None to not detect positive peaks.

nthres : float

Minimum peak height for negative peaks (typically a negative value). None to not detect negative peaks.

msep : tuple of ints, optional

N-tuple of minimum peak seperations along each axis. Must be provided if algorithm is ‘thresh’ or ‘thresh-fast’.

algorithm : {‘thres’, thresh-fast’, ‘downward’, ‘connected’}, optional

Peak picking algorithm to use. Default is ‘connected’.

est_params : bool, optional

True to perform an estimate of linewidths and amplitude for all peaks picked. False, the default, will return only the peak locations.

lineshapes : list, optional

A list of lineshape classes or string shortcuts for each dimension. If not specified Gaussian type lineshapes with a FWHM linewidth parameter is assumed in each dimension. This parameter if only used if est_params is True.

edge : tuple of ints, optional

Tuple to add to peak locations representing the edge of the region. None, the default, skips this addition.

diag : bool, optional

True to consider diagonal points to be touching in peak finding algorithm and clustering.

c_struc : ndarray, optional

Structure element to use when applying dilation on segments before applying clustering algorithm. None will apply a default square structure with connectivity one will be applied.

c_ndil : int, optional

Number of dilations to perform on segments before applying clustering algorithm.

cluster : bool, optional

True to cluster touching peaks. False does not apply clustering.

table : bool, optional

True to return a table. False to return lists.

axis_names : list. optional

List of axis names, the last n will be used for column name prefixes in table where n is the number of dimensions.

Returns :

locations : list, returned when table is False

Peak locations.

cluster_ids : list, returned when table is False and cluster is True

Cluster numbers for peaks.

scales : list, returned when table is False and est_params is True

Estimated peak scales (linewidths).

amps : list, returned when table is False and est_params is True

Estimated peak amplitudes.

table : recarray, returned when table is True

Table of request peak parameters.

Previous topic

nmrglue.analysis.peakpick.find_nseg_slice

Next topic

nmrglue.analysis.peakpick.add_edge

This Page