Welcome to iterfit

1.                    This folder is about using the Fast Fourier Transform method to iteratively least squares fit data.  The sample data set used is 3900 oscillating data points containing two obvious glitches.

2.                    The work began in the 1980’s as a method for fitting the background in nuclear spectra.  Least Squares by Iteration.htm.  A fit code using the original method is in fitbr4.zip.

3.                    A slightly better algorithm is derived as a Newton-Raphson minimization method in WeightedLeast SquaresbyIteration.htm – Note that the equations enlarge if clicked on --.  The results of a fit to the real part of the test glitch data, using this method are in  results2.htm. 

4.                    The results of a fit to the complex data are in Fit to complex data.htm.

5.                    A parameter l minimizes the size of the Fourier coefficients, the total power, in the fit.  This parameter is adjusted to make the final c2(l) equal to the number of data points.    The equations to make c2(l) = N are derived in WeightedLeast SquaresbyIterationLambda.htm .doc. – under development –

6.                    ..\optimization\Mixing.htm .doc Gives code for mixing the results of previous iterations and other guesses.  Especially valuable for mixing D(f) = transform of d(t), with Dw(f) = transform of wd(t).