1) Find the size of the output grid from the maximum extent of the input data. 2) Loop through data. Find I,J coordinate of each point in the output grid. 3) Find out maximum number of points for an I,J position. 4) Put data onto grid in array (I,J,N) [REALS]. We also need to store positions of these data. We can either do it by storing the file number, bolometer and position (time) index OR we can just store some index in a merged data array that goes from 1..TOT_PTS. First method is easy but memory hungry. Second method is more efficient but does need some reconstruction to work out where the point was in the original data. Use the second method.
Once the data is gridded, it is first displayed and then despiked. Currently despiking is done on a simple sigma clipping basis for each bin.
SURF Programming Interface