As tronomy 480 - IRAF Tutoria l and Exerci se VIntroduction to DAOphotPSF fitting and DAOphotAdvantages to PSF fittingThe original motivation f or psf fitting m ethods was f or crowded f ield photometry , w here often stellar i mages are blended, and any reasonable s ize aperture might include m ore than one star. DAOphot was d eveloped by Peter Stetso n at the Dominion Astrophysical O bservatory, Victoria B C, for precise ground-based photometry in the crowded f ields of globula r clusters. It h as s ince been incorporated into I RAF a s the PS F f itting package there. I f you w ant to know all the gory d etails see Stetso n (1987). Howev er, even for uncrowded environments psf methods may still y ield improved s ignal- to- noise- >10% co mpared to aperture photometry, since m ore of the available information i s b eing used. Th e profiles of stars from the grou nd have been found to c onsist o f an approximately Gaussi an core, due to s eeing (which m ay w ell vary), plus large w ings decreas ing only a s an inverse square in intensity, largely a result of atmospheric scattering o ff dust and a erosols, plus d irt and scratches in the optical s ystem. U se of profile fitting techniques can remov e mo st of the variations due to seeing changes, as w ell as enabling larger e ffective radii to be used.Procedure (in DAOphot)Here i s a summar y o f the procedure one must follow . 1) Find all the stars on the frame above a user set brightness ...
As tronomy 480 - IRAF Tutoria l and Exerci se V
Introduction to DAOphot
PSF fitting and DAOphot
Advantages to PSF fitting
The original motivation f or psf fitting m ethods was f or crowded f ield photometry , w here often stellar i mages are
blended, and any reasonable s ize aperture might include m ore than one star. DAOphot was d eveloped by Peter
Stetso n at the Dominion Astrophysical O bservatory, Victoria B C, for precise ground-based photometry in the
crowded f ields of globula r clusters. It h as s ince been incorporated into I RAF a s the PS F f itting package there. I f
you w ant to know all the gory d etails see Stetso n (1987). Howev er, even for uncrowded environments psf
methods may still y ield improved s ignal- to- noise- >10% co mpared to aperture photometry, since m ore of the
available information i s b eing used. Th e profiles of stars from the grou nd have been found to c onsist o f an
approximately Gaussi an core, due to s eeing (which m ay w ell vary), plus large w ings decreas ing only a s an
inverse square in intensity, largely a result of atmospheric scattering o ff dust and a erosols, plus d irt and
scratches in the optical s ystem. U se of profile fitting techniques can remov e mo st of the variations due to seeing
changes, as w ell as enabling larger e ffective radii to be used.
Procedure (in DAOphot)
Here i s a summar y o f the procedure one must follow .
1) Find all the stars on the frame above a user set brightness threshold. The routine daofind in daophot
convolves a Gauss ian profile (of approximately the correct FW HM- psf) with each pixel, and can therefore
discriminate b etween e xtended sources, stars, c osmic ra ys and CCD de fects.
2) Run apertu re photometry upon all the stars.
3) Deselect stars too close to the edge, or too faint and not within a group. Choose a set of bright, isolated stars
spread across the frame – the psf stars.
4) Build a semi- empirical model psf. Ea ch of the psf stars is scaled according to its aperture magnitude
estimate, the weighted average is then fitted with a suitable analytic function, and a look- up table computed of
the residuals (interpolating between the remainder value for each pixel). The analytic functions used are chosen
from bivariate Gauss ian, Mof fat or Lorent z functions (or you can set it to auto and it finds the best). An
iterative procedure may be required to produce a `clean' psf in some cases, whereby psf modelling and fitting is
performed, faint neighbors of psf stars are identified on a frame with the psf stars subtracted, fitted themselves
and subtracted and the procedure repeated.
5) U sing the centroid of a star as the profile center, and sky level as determined for aperture photometry, the
PSF model is shifted and scaled to fit the observed stellar image by non-linear least- squares. The scaling yields
the magnitude estimate.
To cope with the blending of stellar PSF s, the stars are grouped together before fitting if there is overlap, and
each star in a group is fitted at the same time. Altho ugh the psf is modelled over a large radius (t ypically twice
the FWH M), one may choose the central region over which the fitting is done; ~1x FWHMps f works well, i.e.
the same a s the radius used for the preced ing apertu re photometry.
Thought Questions: R ead over these 6 summaries and see if you can (m entally) translate from
“astrospeak” to “student- speak.” W hat does “F WH M” refer to? Why is this quantity important? W hy
might we expect “ seeing” to produce a Gaussi an curve from the light produced b y a po int source?
3/2 1/ 08 IRA F5.odt 1Us ing DAOphot
In this assignment you will be asked to log your data onto the worksheet attached at the end. Because the final
results depend crucially on your answers at the beginning, make sure you check your parameters with your
instructor, TA, or the web page on-line. For clarity, here is a flowchart showing the various steps involved.
Rev iew these steps and consider wh ether or not they se em reasonable. We'll go through them (along w ith s ome
intermediate steps) w ith the M 92 dataset.
Generate coordinate list for all of the stars
(daofind)
Perform aperture photometry
(phot)
Select PSF template stars
(pstselect)
Generate model PSF
(psf)
Perform PSF fitting photometry
allstar
Fi gure 1. PSF fitting p hotometry flowchart
Thro ughout this handout, w e will use “m920004” a s the i mage you w ork on. However, this could just be any
fully proces sed ( i.e. bias- and dark- subtracted, and QE corrected) i mage that y ou want to do photometry on;
especially one w ith m any, many stars in the field.. Make sure you use only the fully processed M92 f iles here.
Generating the star coordinate list (No te t he k ey at the left as you will need t o r epeat t hese steps for
m920006 once you finish with m920004 .)
Fir st y ou need to set the ch aracteristics of the CCD image d ata in the datapars file; daoedit i s a useful task for
this, providing you with information on the FWHM psf of stars, sk y mean and sky s igma.
ecl> digiphot
di> daophot # Did you “unlear n” it f irst?
di> disp m920004 1
da> daoedit m920004
? # list cursor options
# WHAT PARAMET ER SETS AR E USED?
r # produce radial plot for star, F WHMps f, sky m ean and s igma
# tabula ted in graphi cs w indow.
a # g ives you an on- screen record
2Now do Problem #1, repeating t he steps for 5 stars in ea ch filter. Select isolated stars over a range of
brightnesses to g et representative values. (We are getting set up to determine param eter values for the task
datapars. The values we s et are crucial for the success of DAOphot! After you determine your values, check
them ag ainst those shown on- line to make sure that y ours are not only reasonable but also ones that w ill work.)
Note: The se param eter files require e ither the i mage header k eyword OR the actual value for so me
parameters. You usually do not need to provide both.
The other critical parameters you need to set in datapars are:
sigma # sk y sigma
datamin # adv ise skymean – INDEF w orks
datamax # look at s ome of the brightest stars in the i mage; usual ly I NDE F works f ine
readnoise # readnoise = 10 electrons per pixel f or thi s CCD ch eck this in the i mheader
epadu # ga in = 14 for these data
Find the actual image h eader keywords f or the following parameters and enter them in datapars:
exposure _______________
airmass _______________
filter _______________
obstime utmiddle
Now do Problem #2, filling in the table. Do not run d aofind quite y et.
Thought questions: You should, for deeper unde rstanding, try so me o f y our own values for data m in,
datamax, etc. In the futu re, you will need to get s ome intuitive s ense of how these param eters a ffect y our
results.
Wh y w ould w e ev en w ant to set a datamax value? Under w hat conditions w ould setting this v alue be
required? Th ink hard about this .
After y ou h ave f illed out the table with your v alues, c ompare those values w ith an instructor's cop y of the
datapars listing to s ee y our values are reasonable.
Cautionary N ote: You will m ost likely need to run d aofind many times un til you get results that y ou are
satisfied with. Ea ch ti me y ou run it, m ore output f iles are g enerated. The best thing to do i s delete those
files before reru nning daofind s o that all f iles are version “ .1” as in m920004.coo.1 . Tr ust your instructor on
this f ine point of working within I RAF .
da> daofind m920004 #defaults should b e oka y- threshold m ay s ometimes require ad justment
HIT THE SPACEBAR TO ACTIVATE THE PHOTOM ETR Y. You will then “ q” and “w” just like qphot.
da> tvmark 1 m920004.coo.1 mar=cir rad=3 # m ark ID'd stars on image
Want to get f ancy? Do phelp tvmark and find out how you c an ch ange the m arks. There are m any options,
including numbering the stars.
da> txdump >> m920004.coo #genera te simple ascii coordinate list. unlearn???
m920004.coo.1 #respond to prompt
xc, yc #respond to
3da> tvmark 1 m920004.coo mar=cir rad=4 # ch eck results
In m920004.coo y ou now have a list o f all stars upon w hich daophot thinks it can perform ps f f itting. If only a
few stars w ere selected, then perhaps s ome of the parameter v alues need to be a djusted. W hat do y ou think?
Perform aperture photometry : This part of the tutorial and exercise is extremely impor tant! Ma ke sure
you understand what is going on.
The task phot uses a number of different p arameter f iles: its v ery o wn photpars, the general CCD/image one
(datapars), one for centering (c enterpars) and yet another f or the sky f itting (f itskypars). Y ou need to edit e ach
of these. R emember, it is usually an e xcellent idea to “unlear n” ea ch parameter set be fore entering in your
values. (Ac cept the defaults a s as given, unless ite mized below.)
da> epar photpars
apertures= ? # choo se an appropriate aperture size f or relatively f aint stars
da> epar centerpars
calgorithm = centroid #calgori
cbox = 5.0
da> epar fitskypars
salgorithm = mode #salgori
annulus = ? # choo se s ensible values here to start w ith
dannulus = ?
Now do Problem #3. Af ter m arking down your choices, compare them with those of a classmate and t hen
your instructor befo re proc eeding.
da> lpar phot # W hat’s there? Do you se e w hat other tasks are called?
da> phot m920004 m920004.coo # outpu t file m 920004.mag.1 (s ame as qphot)
Get a listing of the files in your d irectory. If you run phot more than once, you g et m ore than one “.mag” file for
an i mage. The second file is names “ .m ag.2” and i f you ru n phot again, you get a “.mag.3” etc. Th e program
will not overwrite a mag file. This also happ ens to the . coo files and the .als files, and so on. W e STR ON GLY
recommend that y ou either move the previous output f iles to a subdirectory or delete them altogether. Having
multiple versions of