The ISFF despiking algorithm is taken from the paper, "A Statistical Data Screening Procedure," by Jorgen Hojstrup, Meas. Sci. Technol., 4, 1993, pg 153-157.

A data point is detected as a spike if it deviates from a forecasted point by a discrimination level, L, times the standard deviation:

Where x_{i} is the i^{th} data point, and x_{f} = x_{i-1} * c_{i} + ( 1 - c_{i} ) * m_{i}, is the forecasted data point.

For computing efficiency, the mean, m_{i}, auto correlation, c_{i}, and variance, v_{i}, are approximated by running statistics:

The statistics memory size, n, is adjusted periodically:

The input parameters to the despiker are the minimum probability of a spike, usually 1e-5, and a level adjustment factor, usually 2.5. Choosing a minimum probability of a spike selects an initial discrimination level, based on a Gaussian distribution. See plot of Discrimination Level vs Chosen Probability. Due to the finite size of the statistical sample, the discrimination level is then multiplied by the adjustment factor. The discrimation level is then periodically updated (every 25 points) by a factor based on the correlation, see plot of Correlation vs Discrimination level adjust factor.

L = [initial level] * [level adjustment] * [correlation factor]