Averaging and Deglitching

Commands used for averaging and deglitching are as follows:

AVerage/b
arguments: x bin size (integer)
           y bin size (integer)
Performs averaging of the data array by putting the data into bins. Each x bin size by y bin size set of data is placed in a single pixel in the new data array, and the next set of data to be binned does not overlap with the previous one. Thus for an original data array of size NxM, the new data array will have size N/(x bin size) and M/(y bin size).

AVerage/r
arguments: x aver size (integer)
           y aver size (integer)
Performs a running average of the data array. Each x aver size by y aver size set of data is placed in a single pixel in the new data array, and the next set of data to be averaged is located one pixel away from the previous one. Thus for an original data array of size NxM, the new data array will have size N-1 and M-1.

AVerage/x
arguments: x,y size of averaging window (odd integers)
           weighting (1=constant,2=linear,3=gaussian) (integer)
if weighting=1:      no further parameters
if weighting=2:      edge weight in x (0->1) (real)
                     edge weight in y (0->1) (real)
if weighting=3:      standard dev. in x (real)
                     standard dev. in y (real)
Performs averaging of the image array by convoluting it with the specified form (constant, linear, or gaussian) and using the specified parameters.

AVerage/i
arguments: x,y size of averaging window (integers)
Performs running average on the image array using the specified parameters.

GLitch (note: use GLitch/d to perform this operation on data array)
arguments: threshold (real)
           max. glitch width (pixels; y-direction) (integer)
           min. glitch length (pixels; x-direction) (integer)
Performs deglitching of the image array. Glitches whose magnitude exceeds threshold times the maximum range of values in the image array are searched for. The size of the glitches is given by width x length. These values are then replaced by values formed by interpolating the data on either side of the glitch.

GLitch/d
arguments: threshold (real)
           max. glitch width (rows; y-direction) (integer)
           min. glitch length (columns; x-direction) (integer)
Performs deglitching of the data array. Glitches whose magnitude exceeds threshold times the maximum range of values in the data array are searched for. The size of the glitches is given by width x length. These values are then replaced by values formed by interpolating the data on either side of the glitch.

MOdify/r
arguments: row (integer)
if row=-1:  discriminator level (real)
                   number of passes (integer)
Modifies contents of specified row, by replacing it with the average of the twos immediately before and after it. If row=-1, then this action is applied to all rows which differ from the average of the ones one either side by more than discriminator level. This procedure is repeated number of passes times. (This function is similar to that of GLitch/d above).

MOdify/p
arguments: discriminator level (real)
           number of passes (integer)
Modifies contents of data array replacing specific pixels with the contents of those surrounding it if the pixel differs by more than discriminator level from the average of those around it. This procedure is repeated number of passes times. (This function is similar to that of GLitch/d above).