2 MAPCCD

 MAPCCD is part of the aperture photometry suite of programs,
 and is normally used to provide the input to OPPHOT.  It 
 reads in a series of images of approximately the same field, and
 calculates the offsets between each frame and the first one,
 writing the result to an output file called offsets.dat.  The 
 names of images it cannot match are written into a file called 
 lost.dat.

 MAPCCD works by first finding all the points on the image that
 are a user supplied sigma above the sky.  It then makes you a
 pretty little plot of the positions of these points, and then
 decides which clusters of points are stars.  Having found these,
 it draws a circle at the center of each star, and places a box
 around the larger stars.  

 Next it finds the star with the brightest pixel, and fits it with
 a point spread function, to determine the shape of the PSF.  For
 the normal Gaussian model this means the full widths half maximum
 and orientation.Keeping these shape parameters fixed, it now
 determines the positions of each star.  It then tries to match
 the pattern ofstars to the pattern in the first frame you gave
 it.

 MAPCCD normally works well, if you have done the frame preparation
 properly.   Most problems seem to arise when using IR images which
 have a small field of view, and hence a small number of stars.  In
 these cases every star counts, and you should make sure you have
 deglitched out all the duff pixels as MAPCCD will reject any star
 with a nearby very low pixel.  

 About the only thing you can fiddle with is the sigma above sky to
 find events.  You shoud set this so that no more than around 20
 stars are found (200 is a disaster), since MAPCCD will consider its 
 work done when it has found 20 stars whose positions match between 
 the two frames.  For frames with only a small number of stars, you
 should choose sigma so that at least 3 stars are always found, as
 matches using only 2 stars should be treated with caution.

 The output file "offsets.dat" has the following format, repeated
 for every star.

 file_name
 X_offset  Y_offset  sky_counts  rotation stars  seeing

 The sky counts is a mean for the frame.  Rotation is the rotation
 between the frames in degrees.  Stars is the number of stars whose 
 positions matched between the frames, and seeing is the FWHM 
 of a Gaussian fit to 1 star.

 MAPCCD is a re-write of the original program, which was the
 first part of the CCD reduction programs (see the ARKHELP
 entry PHOTOMETRY OLD_SYSTEM).  The function is the same, but the
 output files are different, specifically you don't get the
 parameters of a Lorentzian fit to the point spread function.
 
 relatives: opphot
 elderly relatives: apphot, lorccd, intlccd, mltccd
 source code: arkdir:[for.opphot]
 contact: TN for the new version, RHDC (WBH) for the old one.
 keywords: ccd
 
