nmrglue.analysis.integration.ndintegrate(data, unit_conv, limits, unit='ppm', noise_limits=None)[source]

Integrate one nD data array within limits given in units. Data points must be equally spaced. Can only integrate one region per function call.

The integration error due to baseline noise is calculated as:

\[error = \sigma_{vol} = \sigma \sqrt{\prod_i^{d} n_{i}},\]

if the noise_limits are set.

Where: sigma is the standard deviation of the baseline noise. n is the number of bins in the integration range for each d dimensions.

See integrate for more information.

data: array like

1d array of intensity

unit_convs: [`fileiobase.unit_conversion`, ] list

list of unit_conversion object associated with each dim of data.

limits: array like

With shape (2,) or (d, 2). 1D Array with lower and upper integration limits for 1D . Or array with d rows of lower and upper integration limits for each dimension.

noise_limits: Optional[array like]

With shape(2, ). Array with lower and upper limits to section of data with only noise. A larger range will likely yield a more accurate estimate. It is unwise to use the very end of the spectrum for the noise range.


[value, …] integration values

if noise_limits is given:

[[value, error], …] where error a one sigma estimate of the error only from the spectrum noise