function ssa

Calculates the simple shift-and-add of all images in the x datacube. If x is a fits file, a memory saving method will be used to do the ssa. If x is a string, this points to a text file where an arbitrary amount of fits filenames is given as a list. The first image in each of these files will be used for the ssa. If sky, flat, dpl, mask are given, they will be used. An optional keyword method can be given: method = 0 : Shift the brightest pixel to xcen, ycen method = 1 : Integer shift the centroid to xcen, ycen method = 2 : Subpixel shift the centroid to xcen, ycen If method < 0, the same is done as if method were set to 0, but the brightest pixel is searched in a smoothed version of the image. The smoothing is done by convolving with a gaussian of fwhm the negative of method.

Syntax
result = ssa(X, XCENTER, YCENTER, SKY, FLAT, DPL, MASK [, METHOD] [, /resize])

Arguments
X:   A FITS datacube
XCENTER:   The pixel where to shift in the first dimension
YCENTER:   The pixel where to shift in the second dimension
SKY:   A sky to be subtracted
FLAT:   A flatfield to be multiplied
DPL:   A dead pixel list to be applied
MASK:   The peak pixel will be searched for in an image multiplied by this mask
METHOD:   Optional, controls how the SSA will be done:
METHOD = 0:   Shift the brightest pixel to XCENTER, YCENTER (default)
METHOD = 1:   Integer shift the centroid to XCENTER, YCENTER
METHOD = 2:   Subpixel shift the centroid to XCENTER, YCENTER
METHOD < 0:   the same is done as if METHOD were set to 0, but the brightest pixel is searched in a smoothed version of the image. The smoothing is done by convolving with a gaussian of fwhm the negative of method.


Switches
/resize:   The resulting images will be resized in the way, that in each direction the respective extend of MASK is added twice.