Determine the best fit solution and re-fit each line with that solution
The following steps are used to determine the best wavelength solution: 1. The coefficients of the solution to each row are fit by a line 2. The coefficients for each row are then replaced by the best-fit values 3. The wavelenght zeropoint is then re-calculated for each row