Background Subtraction and Smoothing

Commands used for background subtraction and smoothing are as follows:

BAck
arguments: number of parameters (integer <=8)
           response (1=yes,0=no,-1=previous)
if response=0,     specified parameters (reals)
Performs background subtraction to the data array. The background is computed as a least-squares fit to the data using a polynomial in x (rows) and y (columns). The parameters being the prefactors for the terms: constant, x, y, y**2, y**3, y**4, y**5, y**6. If response=0 the user if prompted for specified parameters, and if response=1 the program will use the fit parameters from the previous most recent execution of BAck.

BAck/c
arguments: no. regions (integer)
           min,max cols (integers)  |  repeat for specified no. regions
           min,max rows (integers)  |
           number of parameters (integer <=8)
           response (1=yes,0=no,-1=previous)
if response=0,     specified parameters (reals)
Performs background subtraction to the data array, as described above. The background is computed using only the regions specified, and the background subtraction is applied to the entire data array.

BAck/g
arguments: x0,y0,fwhm,amp (reals)
Performs background subtraction of a gaussian to the data array. The gaussian has the form amp*exp(-((j-y0)**2+(i-x0)**2)/(2.*sigma**2)) where j and i are indices for the rows and columns, respectively, of the data array. The width sigma is given by sigma=fwhm/2.*sqrt(2.*alog(2.)).

CURvature
arguments: number of parameters (integer <=7)
           response (1=yes,0=no,-1=previous)
if response=0,     specified parameters (reals)
Performs curving background subtraction to the data array. The background is computed as a least-squares fit to the data using a polynomial in x (rows) and y (columns). The parameters being the prefactors for the terms: constant, x, x**2, y, y**2, x*y, x**3 If response=0 the user if prompted for specified parameters, and if response=1 the program will use the fit parameters from the previous most recent execution of BAck.

CURvature/c
arguments: no. regions (integer)
           min,max cols (integers)  |  repeat for specified no. regions
           min,max rows (integers)  |
           number of parameters (integer <=7)
           response (1=yes,0=no,-1=previous)
if response=0,     specified parameters (reals)
Performs curving background subtraction to the data array, as described above. The background is computed using only the regions specified, and the background subtraction is applied to the entire data array.

SMooth
no arguments
Performs smoothing of the data array, by computing the average of each row of data, and subtracting that average from the row.

SMooth/c
arguments: no. regions (integer)
           min,max cols (integers)  |  repeat for specified no. regions
           min,max rows (integers)
Performs smoothing of the data array according to the specified regions (or channels). For the specified rows, the average of the regions given by the specified ranges of columns is computed, and then this value is subtracted from all the data on the given row.

SMooth/h
arguments: no. parameters (integer, max is 5)
Performs smoothing of the data array, by computing a polynomial fit using the specified no. of parameters to each row of data, and subtracting that fit from the row.

SMooth/hc
arguments: no. parameters (integer, max is 5)
           no. regions (integer)
           min,max cols (integers)  |  repeat for specified no. regions
           min,max rows (integers)
Performs polynomial smoothing of the data array according to the specified regions (or channels). For the specified rows, the polynomial fit of the regions given by the specified ranges of columns is computed, and then this fit is subtracted from all the data on the given row.

SPLine
arguments: no. regions (integer)
           min,max cols (integers)  |  repeat for specified no. regions
           min,max rows (integers)  |
           delta z (real)           |
Performs smoothing of the data array by computing a type of spline fit consisting of the average of the data in the specified regions, and linearly interpolating between these values in regions where no data is specified. For each row, the average of the regions given by the specified ranges of columns is computed, and then this value plus the specified delta z is subtracted from all the data in that row.

SPline Derivative
arguments: no. regions (integer)
           min,max cols (integers)  |  repeat for specified no. regions
           min,max rows (integers)  |
           delta z (real)           |
Performs smoothing of the data array by computing a type of spline fit consisting of the average of the data (offset by delta z) in the specified regions. Both a constant value and an optimal first derivative term are subtracted from each line of data.