Preparation for Running a Psf Fit | |
Using the Psf Command | |
Using the Nstar Command | |
Using the Substar Command | |
Preparing the Psf Fit for Allstar | |
Using the Allstar Command |
When doing photometry on crowded star fields, such as globular clusters or open clusters, aperture photometry will not yield reliable results. It is better to use a Point Spread Function: a gaussian that can be fitted to all of the stars in the field in order to find their magnitudes. In addition to this tutorial, I recommended reading A User's Guide to Stellar CCD Photometry by Phillip Massey and Lindsey Davis. It will help you get better acquainted with the long process required in finding a good PSF fit.
Preparation for Running a PSF Fit
Before getting started with PSF fitting, you will have to run daofind
and/or tvmark to pick out the stars to you want to use for photometry.
Once the coordinate file is created, run phot in order to get a .mag file.
(See Aperture Photometry) You must have a photometry
file for psf to work.
Once all of this has been accomplished, exit the apphot package and enter
daophot at the di prompt.
Using the Psf Command
The psf command can be accessed by entering digiphot and then
daophot at the cl prompt. Now enter epar psf and set the
following parameters:
interac=yes | Run psf in interactive mode. It is the best way to create the psf function, because you will be able to choose the stars used. |
verify=yes | This makes IRAF prompt you for the critical parameters |
graphic=stdgraph | sets the graphic display |
display=stdimage | sets the image display |
Input phtometry file(s): | Enter in the name of the .mag file you created earlier. You must have a photometry file, or else psf will not work |
Input psf star list(s): | If you are starting from scratch, enter "" at the prompt. |
If you have allready run psf on the image, you can add on or delete psf stars from your original list. Just enter the name of the .pst file, or enter default. If default is chosen, IRAF will use the most recent (highest number) .pst file. | |
Output psf image(s): | If default is shown in parenthesis, press enter. This will create a numbered .psf.fits file. Alternatively, you can enter a different filename you want. |
Output psf star list(s): | If default is shown in parenthesis, press enter. This will create a numbered .pst file containing coordinates, magnitudes, ID number, and other information about the stars you have chosen to use for the psf fit. As always, you can enter a different filename if you want. |
Output psf star group file(s) | If default is shown in parenthesis, press enter. This will create a numbered .psg file containing information about the stars you have chosen for the psf fit along with their nearby neighbors, if applicable. You can enter a different filename if you want. |
Analytic PSF function (gauss): | "Gauss" should be in parenthesis; press enter. If not, enter gauss at the prompt. This determines the type of function used in the fitting the stars |
Order of variable PSF (0): | Press enter to accept "0", or enter 0 at the prompt |
PSF radius in scale units: | Determines the outer radius used to create the psf fit. A radial profile of the star will be created using this radius in order to fit the function. |
Massey and Davis suggest using 11 with a fitting radius of 3, or 13 with a fitting radius of 4 | |
Fitting radius in scale units: | The inner radius used to create the psf fit. Massey and Davis suggest using a fitting radius about the size of the FWHM; be generous. |
Minimum good data value (INDEF): | Press enter to accept "indefinite" unless you have an idea of what you want the min data value to be. |
Maximum good data value (INDEF): | Press enter to accept "indefinite" unless you have an idea of what you want the max data value to be. |
a | Adds a star to the psf list |
IRAF will display a surface plot of the star you have chosen along with coordinates and preliminary magnitudes from the photometry file you supplied. | |
Examine the plot, and decide whether or not you want to use this as a psf star. It should not have a flat top, which indicates saturation. The peak should appear pointy. The star should be evident above background noise. (It's best if the surface below the peak appears flat; however, this will depend on the uniformity of the background counts and the signal to noise ratio. You will not be able to achieve a smooth surface for some stars; just make sure the peak is easily recognizable above all the noise.) | |
To continue and accept the star for the psf list, press 'a'. If you have changed your mind, press 'd' and the star will not be added to the list | |
d | Deletes a star from the psf list |
Keep an eye on the IRAF command window. It will be telling you which stars are being added and deleted on the list. | |
l | Lists the current psf stars in the IRAF command window |
z | Rebuilds the psf list from scratch |
w | Writes the psf to the psf image file |
This is VERY IMPORTANT. You should press 'w' right before quitting, or else you will have to go back and run psf again. | |
q | Exits psf |
Using the Nstar Command
The command nstar can be accessed in the same package as psf by entering
digiphot and then daophot at the cl prompt. Nstar will fit the
psf function you have created to each of the stars in the group file (.psg) simultaneously.
First, look at the .psg list created by psf by entering ! more
filename at the IRAF command prompt. Note the stars that have neighbors
listed. (They will all have the same identifying numbers, although their id numbers from
the photometry file you used will also be displayed.) Look at the stars in your image and
determine a smaller PSF radius that will not overlap with neighboring stars. (Running
tvmark with the coordinates from your photometry file will aid you in identifying
which stars you need to evaluate.)
Now you can enter nstar filename at the IRAF command prompt, where
filename corresponds to the image you will be evaluating. You will receive the
following prompts:
Input groupfile: | If default is in parenthesis, press enter or to accept it or enter "default" at the prompt. This will cause the most recent .psg file to evaluated. Otherwise, enter the name of the file you want to be used. |
Output photometry file (default): | Press enter to accept default in parenthesis or enter "default" at the prompt. This will create a numbered .nst file containing photometry for the group stars. Alternatively, you may enter a different name for the outupt file. |
Output rejections file: | Enter "" at the prompt, because you do not need a rejections file. |
Recenter the stars (yes): | Press enter to accept the default of "yes" |
Refit the sky (no): | Press enter to accept the default of "no" |
Use group sky values (yes): | Press enter to accept the default of "yes" |
Psf radius in scale units: | Enter the smaller radius that you determined before executing the nstar command |
Fitting radius in cale units: | Enter the fitting radius you have been using |
Maximum group size number of stars (60): | Press enter to accept the default size of "60" |
Minimum good data value (INDEF): | Press enter to accept "indefinite" unless you have an idea of what you want the min data value to be |
Maximum good data value (INDEF): | Press enter to accept "indefinite" unless you have an idea of what you want the max data value you be |
Using the Substar Command
Substar will subtract the stars you have fitted with the psf function from
the original image. It runs in the same package as psf; just enter digiphot
and then daophot at the cl prompt.
Enter substar filename at the IRAF command prompt,
where filename corresponds to the image you are evaluating. You will receive the
following prompts:
Input photometry file (default): | Press enter to accept default in parenthesis or enter "default" at the prompt. This will use the most recent .nst file created by nstar. You can enter an alternative filename if you want. |
Input exclude file: | Enter "" at the prompt. You do not want to exclude any stars |
PSF image (default): | Press enter to accept default in parenthesis or enter "default" at the prompt. This will use the most recent .psf file. Alternatively, you can enter a different filename. |
Subtracted image (default): | Press enter to accept default in parenthesis or enter "default" at the prompt. This will cause a numbered .sub.fits file to be created. Alternatively, you can enter the filename you want to be used for the output. |
Psf radius: | Use the smaller radius that you determined before running nstar |
Minimum good data value (INDEF): | Press enter to accept "indefinite" unless you have an idea of what you want the min data value to be |
Maximum good data value (INDEF): | Press enter to accept "indefinite" unless you have an idea of what you want the max data value to be |
Preparing the Psf Fit for Allstar
Follow these steps in order to create the final psf fit:
Using the Allstar Command
Once you have obtained a good psf fit with stars that have no neighbors, you can run
allstar to fit the rest of the stars in your image. Allstar runs in the same
package as psf; just enter digiphot and then daophot at the cl
prompt.
Enter allstar filename at the IRAF command prompt, where filename
corresponds to the image you are working on. You will receive the following prompts:
Input photometry file (default): | Press enter to accept default in parenthesis or enter "default" at the prompt. This will use the most recent .mag file for the image. Alternatively, you can enter a filename of your choosing. |
PSF image (default): | Press enter to accept default in parenthesis or enter "default" at the prompt. This will use the most recent .psf file for the image. Alternatively, you can enter a filename of your choosing. |
Output photometry file (default): | Press enter to accept default in parenthesis or enter "default" at the prompt. This will create a numbered .als file containing magnitudes and information for all of your stars. Alternatively, you can enter a filename of your choosing. |
Subtracted image (default): | Press enter to accept default in parenthesis or enter "default" at the prompt. This will create a numbered .sub.fits file with all of the stars subtracted from your image (if they are in the .mag file). Alternatively, you can enter a filename of your choosing. |
Output rejections file: | Enter "" at the prompt. You do not need a rejections file. |
Recenter the stars (yes): | Press enter to accept the default of "yes" |
Use group sky values (yes): | Press enter to accept the default of "yes" |
Refit the sky (no): | Press enter to accept the default of "no" |
Psf radius in scale units: | Use the psf radius you decided on in the very beginning. (13 for a fitting radius of 4; 11 for a fitting radius of 3). |
Fitting radius in scale units: | Use the fitting radius you decided on in the very beginning. |
Maximum group size in number of stars (60): | Press enter to accept the default of "60" |
Minimum good data value (INDEF): | Press enter to accept "indefinite" unless you have an idea of what you want your min data value to be |
Maximum good data value (INDEF): | Press enter to accept "indefinite" unless you have an idea of what you want your max data value to be |