Image Subtraction


Once you have built the reference frame you are ready to apply image subtraction to all images. The reference image ref.fits will be convoluted with a kernel (spatially variable in general) in order to match as close as possible each image. This convoluted image is then subtracted to the current image, producing a series of subtracted images. There are a number of important parameters for image subtraction. These parameters are written  in the configuration file register2/default_config. The most straightforward parameters are the kernel size (half_mesh_size) and the size of the stamp (half_stamp_size). The stamp size is the of the area taken by the program around each object. You can select the number of these stamps by using the keywords nstamps_x and nstamps_y.  You can also sub-divide the frames and process them pieces by pieces. You can control this sub-dividing through the keywords nstamps_x (number of sub-divisions along the X axis) and nstamps_y.  The last fundamental parameter is the degree of spatial variations (deg_spatial) you will choose in order to fit the variations of the kernel coefficients as a function of the position in the image (see Alard 1999 for more details).  Unless your image is very under sampled or has unusually good sampling, it is unlikely you will have to change these parameters. If you change the kernel size and stamp size you may also find useful to change the gaussian sigma of the (3 Gaussians)*(2d polynomial) kernel expansion. The relevant parameters are the 3 sigma_gauss.

Now that you know about the parameters needed by the image subtraction program you can check the current configuration file (default_config), and run subtract.csh in order to create all the subtracted images. Just type:

./subtract.csh

Once the process is completed you can check the log file: images2/log_subtract

 mean: 0.994887 scatter: 0.064548 nfile0.fits
 mean: 0.954458 scatter: 0.098138 nfile1.fits

mean is the mean sigma of all the stamps selected to derive the kernel solution. Scatter is the scatter of the sigma distribution. And in the last column the name of image FITS file is given.
 
 

 Next: Detection of the variables