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
datandarray

Region of NMR spectrum to pick peaks from.

pthresfloat

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

nthresfloat

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

mseptuple 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_paramsbool, optional

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

lineshapeslist, 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.

edgetuple of ints, optional

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

diagbool, optional

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

c_strucndarray, 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_ndilint, optional

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

clusterbool, optional

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

tablebool, optional

True to return a table. False to return lists.

axis_nameslist. 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
locationslist, returned when table is False

Peak locations.

cluster_idslist, returned when table is False and cluster is True

Cluster numbers for peaks.

scaleslist, returned when table is False and est_params is True

Estimated peak scales (linewidths).

ampslist, returned when table is False and est_params is True

Estimated peak amplitudes.

tablerecarray, returned when table is True

Table of request peak parameters.