Module Import alias identifier FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults Str NameLoad NameLoad Num body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad If CompareEq AttributeLoad NameLoad attr Num body Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword Num Assign NameStore ListComp TupleLoad Call NameLoad NameLoad NameLoad Call NameLoad NameLoad NameLoad comprehension TupleStore NameStore NameStore NameLoad Assign NameStore Call AttributeLoad NameLoad attr ListComp Call NameLoad NameLoad comprehension NameStore NameLoad Assign NameStore Call AttributeLoad NameLoad attr ListComp Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Call NameLoad NameLoad comprehension NameStore NameLoad Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad BinOpSub SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num Assign NameStore BinOpMult NameLoad NameLoad If CompareIsNot NameLoad NameLoad body Assign NameStore TupleLoad Call NameLoad SubscriptLoad NameLoad Index Num NameLoad Call NameLoad SubscriptLoad NameLoad Index Num NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Call NameLoad NameLoad Assign NameStore BinOpMult NameLoad Call AttributeLoad NameLoad attr BinOpSub SubscriptLoad NameLoad ExtSlice Slice Index Num SubscriptLoad NameLoad ExtSlice Slice Index Num If CompareIsNot NameLoad NameLoad body Assign NameStore BinOpMult BinOpDiv NameLoad SubscriptLoad NameLoad Index NameLoad NameLoad Assign NameStore BinOpMult BinOpDiv NameLoad SubscriptLoad NameLoad Index NameLoad NameLoad Return AttributeLoad Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad attr orelse If CompareIsNot NameLoad NameLoad body Assign NameStore BinOpMult BinOpDiv NameLoad SubscriptLoad NameLoad Index NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults Str NameLoad body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad TryExcept body Expr Call NameLoad NameLoad handlers ExceptHandler type NameLoad body Assign NameStore ListLoad NameLoad If CompareNotEq NameLoad Call NameLoad NameLoad body Assign NameStore Str Raise Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad If CompareEq AttributeLoad NameLoad attr Num body Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword Num If BoolOpAnd CompareNotEq SubscriptLoad AttributeLoad NameLoad attr Index Num NameLoad CompareNotEq SubscriptLoad AttributeLoad NameLoad attr Index Num Num body Assign NameStore Str Raise Call NameLoad NameLoad Assign NameStore ListComp TupleLoad Call NameLoad SubscriptLoad NameLoad Index Num NameLoad Call NameLoad SubscriptLoad NameLoad Index Num NameLoad comprehension TupleStore NameStore NameStore Call NameLoad NameLoad NameLoad Assign NameStore ListComp Call NameLoad NameLoad comprehension NameStore NameLoad Assign NameStore ListComp Call AttributeLoad NameLoad attr comprehension NameStore NameLoad Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr ListComp Call NameLoad BinOpSub SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num comprehension NameStore NameLoad Assign NameStore Call AttributeLoad SubscriptLoad NameLoad Index ListComp Call NameLoad SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num comprehension NameStore Call AttributeLoad NameLoad attr NameLoad attr Assign NameStore BinOpMult NameLoad NameLoad If CompareIs NameLoad NameLoad body Return NameLoad orelse Assign NameStore Call AttributeLoad NameLoad attr NameLoad If CompareEq AttributeLoad NameLoad attr Num body Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword Num If BoolOpAnd CompareNotEq SubscriptLoad AttributeLoad NameLoad attr Index Num NameLoad CompareNotEq SubscriptLoad AttributeLoad NameLoad attr Index Num Num body Assign NameStore Str Raise Call NameLoad NameLoad Assign NameStore ListComp TupleLoad Call NameLoad SubscriptLoad NameLoad Index Num NameLoad Call NameLoad SubscriptLoad NameLoad Index Num NameLoad comprehension TupleStore NameStore NameStore Call NameLoad NameLoad NameLoad Assign NameStore ListComp Call NameLoad NameLoad comprehension NameStore NameLoad Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr ListComp Call NameLoad BinOpSub SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num comprehension NameStore NameLoad Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index ListComp Call NameLoad SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num comprehension NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore BinOpMult NameLoad Call AttributeLoad NameLoad attr NameLoad Return Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad decorator_list
N/A N/A numpy np integrate N/A N/A data unit_conv limits unit noise_limits norm_to_range calibrate N/A ppm None None 1.0 N/A N/A 
    Integrate one 1D data array within limits given in units. Data points must
    be equally spaced.

    Functional form of integration is:

    .. math::
        value = \sum_a^b s(x_{i}) dx

    Where:
    s is the signal, a and b are the limits of integration and dx is the width
    of each bin.

    The integration error due to baseline noise is calculated as:

    .. math::
        error = \sigma_{vol} = \sigma \sqrt{n}

    if the noise_limits are set.

    Where:

    .. math::
        n =  \frac{|b-a|}{dx}+1

    sigma is the standard deviation of the baseline noise. n is the number
    of bins in the integration range.

    Parameters
    ----------
    data: array like
        1d array of intensity
    unit_conv: `fileiobase.unit_conversion` object
        unit_conversion object associated with data
    limits: array like
        With shape (2,) or (P, 2). Array with lower and upper integration
        limit. Or array with P rows of lower and upper integration limits.
    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.
    norm_to_range: Optional[int]
        If given, all values are normalized to the value determined within the
        range given by limits[norm_to_range, :]
    calibrate: Optional[float]
        If norm_to_range is given, the values are re-normalized so that the
        integral within limits[norm_to_range, :] equals some number.

    Returns
    -------
    array
        [value, ...] integration values

    if noise_limits is given:

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

     N/A limits N/A N/A np array limits N/A N/A N/A limits size 2 N/A N/A limits N/A N/A np expand_dims limits axis 0 N/A inds N/A N/A N/A unit_conv x0 unit N/A unit_conv x1 unit N/A N/A x0 x1 limits N/A inds N/A N/A np array N/A N/A sorted ind N/A ind inds N/A sum_slice N/A N/A np array N/A N/A N/A np sum N/A data N/A N/A slice ind N/A ind inds N/A scale N/A N/A unit_conv ppm_scale N/A dx N/A abs N/A N/A scale N/A 1 N/A scale N/A 0 N/A values N/A sum_slice dx N/A N/A noise_limits None N/A N/A noise_inds N/A N/A unit_conv N/A noise_limits N/A 0 unit N/A unit_conv N/A noise_limits N/A 1 unit N/A noise_inds N/A sorted noise_inds N/A std N/A N/A np std N/A data N/A N/A slice noise_inds N/A errors N/A std N/A N/A np sqrt N/A N/A inds N/A N/A N/A 1 N/A inds N/A N/A N/A 0 N/A N/A norm_to_range None N/A N/A errors N/A N/A errors N/A values N/A norm_to_range calibrate N/A values N/A N/A values N/A values N/A norm_to_range calibrate N/A N/A N/A N/A np vstack N/A values errors T N/A N/A N/A norm_to_range None N/A N/A values N/A N/A values N/A values N/A norm_to_range calibrate N/A values N/A ndintegrate N/A N/A data unit_conv limits unit noise_limits N/A ppm None N/A N/A 
    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:

    .. math::
        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.

    Parameters
    ----------
    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.

    Returns
    -------
    array
        [value, ...] integration values

    if noise_limits is given:

    array
        [[value, error], ...] where error a one sigma estimate of the error
        only from the spectrum noise
     N/A d N/A N/A np ndim data N/A N/A N/A N/A iter unit_conv N/A N/A N/A TypeError N/A N/A unit_conv N/A unit_conv N/A N/A d N/A len unit_conv N/A N/A mesg A unit_conversion object is needed for each dimension. N/A N/A ValueError mesg N/A limits N/A N/A np array limits N/A N/A N/A limits ndim 1 N/A N/A limits N/A N/A np expand_dims limits axis 0 N/A N/A N/A N/A N/A limits shape N/A 0 d N/A N/A N/A limits shape N/A 1 2 N/A N/A mesg A lower and upper limit is needed for each dimension. N/A N/A ValueError mesg N/A inds N/A N/A N/A uc N/A x N/A 0 unit N/A uc N/A x N/A 1 unit N/A N/A uc x N/A zip unit_conv limits N/A inds N/A N/A sorted x N/A x inds N/A ppm_scales N/A N/A N/A x ppm_scale N/A x unit_conv N/A dx N/A N/A np prod N/A N/A np array N/A N/A abs N/A N/A x N/A 1 N/A x N/A 0 N/A x ppm_scales N/A slice_sum N/A N/A N/A data N/A N/A N/A slice N/A x N/A 0 N/A x N/A 1 N/A x N/A N/A np flipud inds sum N/A value N/A slice_sum dx N/A N/A noise_limits None N/A N/A value N/A N/A noise_limits N/A N/A np array noise_limits N/A N/A N/A noise_limits size 2 N/A N/A noise_limits N/A N/A np expand_dims noise_limits axis 0 N/A N/A N/A N/A N/A noise_limits shape N/A 0 d N/A N/A N/A noise_limits shape N/A 1 2 N/A N/A mesg If given, a noise limit is needed for each dimension. N/A N/A ValueError mesg N/A noise_inds N/A N/A N/A uc N/A x N/A 0 unit N/A uc N/A x N/A 1 unit N/A N/A uc x N/A zip unit_conv noise_limits N/A noise_inds N/A N/A sorted x N/A x noise_inds N/A nm N/A N/A np prod N/A N/A np array N/A N/A abs N/A N/A x N/A 1 N/A x N/A 0 N/A x noise_inds N/A std N/A N/A np std N/A data N/A N/A N/A slice N/A x N/A 0 N/A x N/A 1 N/A x N/A N/A np flipud noise_inds N/A error N/A std N/A N/A np sqrt nm N/A N/A N/A np hstack N/A value error N/A