mt.max_getpvalue¶
-
max_getpvalue(maxima, f, n_exact=1000, step=0.05, correct=True, **kwargs)[source]¶ Get the p-values for the maxima for a given expected distribution.
- Parameters
maxima (pd.DataFrame) – Pandas DataFrame with the information of the maxima. Has to contain at least the column ‘Intensity’.
f (function) – Theoretical distribution of the maxima, f.
n_exact (int, optional) – Number of maxima where the p-value is computed directly. After the
n_exactmost intense values, the p-values are computed in an array with stepstepand then interpolated. This introduces a small error in the computation but greatly speeds up the procedure.step (float, optional) – Step of the array where the p-values are exactly computed after the first
n_exactmaxima.correct (bool, optional) – If
True, check that the pvalues are decreasing with intensity and, if it is not the case, change the value accordingly.
- Returns
The same Pandas DataFrame as the input
maxima, but with an additional columnpvalues.- Return type
pd.DataFrame