At Last !!
December 03, 2007

You are now ready to run DAOPHOT.

We are currently using the Aug 10 2005 version of the Daophot code.
To confirm you have access to the correct version, you should use this command and confirm you are have access to the correct version:
		> which daophot
The following page explain the usual 'by hand' method of running DAOPHOT. This is designed to be a bare bones cookbook and to show the researcher the basic uses of Daophot. It is by no means a lengthy discussion of technique and methodology. More detailed information and explainations can be found in the accompanying tutorial.

First, copy your .opt file to daophot.opt and your .als.opt file to allstar.opt for the frame you wish to run first.
		>cp obj215_1.opt daophot.opt
		>cp obj225_1.als.opt allstar.opt

Now, Let the Magic Begin ! To get started, simply type:
Daophot will open and look for daophot.opt. If it doesn't find the file, it will start asking you for parameters. You should hit enter three times and daophot will give up and close.
Daophot will read in these parameters and display them on the screen.
In the first prompt line which appears as DAOPHOT opens.

1. The first task is to attach the image:

		>at obj215_1
This tells the program which .fits file to load to be reduced. There is no need to specify the extension. Daophot is automatically set up to look for .fits files.

2. Now we want to find stars:

The find command is used to identify and compute approximate centroids for all dectections in the images. It creates a file of coordinates (here: obj215_1.coo). In general we want to keep the default file names.
		> fi

      		Number of Frames averaged, summed: 1,
      		File for positions (default obj215_1.coo): (confirm with enter)
The number of IDed stars now appears. Look at the number and see if it seems logical for your data, i.e. if you are looking at the Galactic bulge, then your image should have thousands of stars ...
If it seems reasonable, then accept the coordinate file.
      	Are you happy with this? y
I know, but what if it doesn't seem reasonable?
Well, then there is something wrong with your opt file or your data.

3. Now we want to obtain basic aperture photometry on our detections.

This will obtain sky values and concentric aperture photometry for all objects found by the star-finding routine. It creates a file with the extension .ap
Just hit enter to the following lines, in this routine the defaults are best.

4. First Pass PSF

Our aim is to create a PSF for this image. So now we want to pick a set of stars to form a PSF template.
The pick routine will select a set of candidate stars for the PSF stars. You will need to tell it (a) how many stars to find and (b) how faint you would like to select stars. This will create a list of stars in a .lst file.
		> pi
		Input file name (default obj215_1.ap): (confirm with enter)
		Desired number of stars, faintest magnitude: 80,25
		Output file name (default obj215_1.lst): (confirm with enter)

5. Fitting your first Point Spread Function.

This will determine a point spread function for the frame.
		> psf

		File with aperture results (defaults obj215_1.ap): (confirm with enter)
		File with PSF stars (defualt obj215_1.lst): (confirm with enter)
		File for the PSF (default obj215_1.psf): (confirm with enter)
This may take some time. Your display will update as it fits various parameters. In general we want to get the Chi value to be less than 2% or 0.02. This is accomplished by iteratively rejecting stars as we discussed in class.

The next part involves three steps with three different routines: GROUP, NSTAR, and SUBSTAR. This is an exercise in attempting to eliminate problems caused by neighboring stars.

6. Group neighboring stars.


		File with photometry (default obj215_1.nei): (confirm with enter)
		File with the PSF (default obj215_1.psf): (confirm with enter)
		Critical overlap: 1.0
		File for stellar groups (default obj215_1.grp): (comfirm with enter)
The "critical overlap" is a measure of how close two stellar profiles are allowed to be in the frame. Adjusting the critical overlap to any value greater than 1.0, indicates that crowding is going to be the most significant contribution to the errors in your magnitudes.

To continue in this process, we will need to ensure that the stars are broken into groups of 60 or less.

7. NSTAR -- refit magnitudes using the PSF


		File with the PSF (default obj215_1.psf): (confirm with enter)
		File with stellar groups (default obj215_1.grp): (confirm with enter)
		File for results (default obj 215_1.nst): (confirm with enter)

8. Subtract the Neighbor Stars Appropriately


		File with the PSF (default obj215_1.psf): (confirm with enter)
		File with photometry (default obj215_1.nst): (confirm with enter)
		Do you have stars to leave in? y
		File with star list (default obj215_1.lst): obj215_1.iter
		Name for subtracted image (default obj215_1s): obj215_1a
Substar will subtract the stars that interfer with the PSF stars and create a subtracted image. We will attch this image and then re-fit the PSF with the neighbor stars removed.

9. Attach the subtracted image.

		>at obj215_1a 
Now you will run the PSF again, but with the newly generated files.

10. Second Pass PSF


		File with aperture results (default obj215_1a.ap): obj215_1.nst
		File with PSF stars (default obj215_1.lst): obj215_1.iter
		File for the PSF (default obj215_1.psf): (confirm with enter)

			This file already exists: obj215_1.psf

		New output file name (default OVERWRITE): (confirm with enter)
		File with PSF stars and neighbors = obj215_1.nei

			This file already exists: obj215_1.nei

		New output file name (default OVERWRITE): (confirm with enter)

11. Leave Daophot

This will finish DAOPHOT, and now you need to apply your psf to all the stars in the frame.


			(and now you have entered allstar)

		OPT> (confirm with enter)

       			          Input image nameL obj215_1

		File with the PSF (default obj215_1.psf): (confirm with enter)
		Input file (default obj215_1.ap): (confirm with enter)
		File for results (default obj215_1.als): (confirm with enter)
		Name for subtracted image (default obj215_1s): (confirm with enter)
The program will star the iterations. When it is done, you are done.