//img.uscri.be/pth/bedfa6129e4ae4af0d7a3b53158b63152a6c26f3
La lecture en ligne est gratuite
Le téléchargement nécessite un accès à la bibliothèque YouScribe
Tout savoir sur nos offres
Télécharger Lire

ASTRO 480- IRAF TUTORIAL Exercise 2

De
10 pages
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 ...
Voir plus Voir moins
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 1 Us 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 2 Now 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 3 da> 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 these files W ILL result in confusion and irregula r resul ts. Proven.  NOTE: At thi s stage you should c heck our outpu t “mag” f ile. If there are a large number of INDEF s present, then y ou have not done a good enough job so far. Find out where those INDEF s are occurring. Are they for the a irmass? For the filter used? For the magnitude and m agnitude error? Y ou need to twe ak parameters until y our outpu t file s hows f ewer than a dozen INDEF s. THIS IS I MPO RTANT! Select PS F template stars Fir st s et your psf parameters: da> epar daopars # g ive y our values a run f irst function = auto psfrad = ? # the radius w ithin w hich the stars, psf is defined fitrad = ? # region in which f itting performed Then s elect y our stars interactively: da> epar pstselect maxnpsf =5 # 5 is probably all you w ill need. interac = yes 4 Fi ve is a reasonable number of stars to use to make template.The f ainter they are, the m ore you need - all a matter of making a good model. Choose i solated, f airly bright stars. Now may be a good ti me to do a “ phelp pstselect.” da> pstselect m920004 Accept the defaults e choed or ch ange them . The program ac cepts the . mag file with the HIGH EST version number. MAK E S UR E YO U CAN S EE ALL OF EV ER Y WI NDOW . Select suitable psf stars (i .e. bright and isolated), saving e ach one as desired until you reach m axnpsf, save and quit. The steps are “a” fo r add w hen in the image, and “a” f or a ccept when in t he grap h as you e xamine the 3-D pro file. It i s best if y ou do not rush the program here. W e f ound that it takes a f ew seconds to activate the graphics window. You can delete a star from the list by putti ng the cursor over it and hitting “ d.” da> ls #Your d irectory s hould contain a m920004.pst.1 file!  T hought questions : Will you need to change so me o f the p arameters w hen dealing w ith the blue image? Since we w ill be graphing the visual magnitude against the B-V color, what we need to have is the same stars in both lists, and hope fully lots of them. But, this may come at the e xpense of throwing some o f the V stars out, or getting closer to the noise level in the B i mage. For observations of a globular cluster (w ith expo sure times and bandwidths of the filters roughly equal), w hy m ight w e expect more stars in the v isual bandpass than the blue? Now go back to page 2 to the and do t he steps again for m 920006. Generate the m odel PSF (sa me version numbers assume deletion of bad- run f iles ha s oc curred) There has to be the same numbe r o f lines in ea ch “ .lis” file. IRAF processes these lists on a line- by-line b asis. da> ls m92* .fits > im.lis # generate list of images da> ls *. mag.1 > mag.lis #generate correspondi ng list o f m ag f iles da> ls *. pst.1 > pst.lis # da> psf @im.lis @mag.lis @pst.lis interac- #ru n psf non- interactively NOTE: We ran the psf task two times, once f or e ach f ilter. W e could hav e done it a couple m ore times for the other two images (one more V, one m ore B), but you get the i dea. What w ould we have done i f we had 50 i mages instead! More time would have to b e spent e xamining the images. What we w ant the program to do i s m aintain the sa me order of stars and IDs . If that happened, then w e could list all of the images in a batch f ile and let the c omputer go . In this c ase, there are large enough x-y s hifts b etween i mages, and the number of stars selected uneve n betwe en f ilters to make this work w ell enough f or us to try. No w to ex amine the m odel PSF (so mething y ou should ALWAYS do under PSF fitting photometry!): da> lpar seepsf da> seepsf m920004.fits.psf.1 m920004.fits.psf.1s da> seepsf m920006.fits.psf.1 m920006.fits.psf.1s da> disp m920004.fits.psf.1s #displa y da> disp m920006.fits.psf.1s #displa y 5 Us e i mexam to ch eck that profile looks like that of single star (No sign of contamination from near neighbors) da> imexam Now do Problem #4. Perform PSF fitting photometry da> ls *psf.1.fits > psf.lis # generate list o f ps f f iles The next step finally produces the psf fitting photometry f iles *.als .1. PURE Magic. da> allstar @im.lis @mag.lis @psf.lis Now do Problem #5, and check your results with t hose of ano ther student and with your instructor. 6 M A TC H ! Matching the stars from y our resul ts You will need to obtain a program called “match.” Thi s program, wr itten in C and PE RL, is a terrific time saver. Following are the steps y ou should take to install the program in one of y our d irectories. Y ou w ill be deleting these f iles after you finish this exercise, but w e f igured the installatio n process is an important one for you to learn. NO TE: MATCH IS RU N UN DE R LINUX, NO T I RAF!  make a subdirectory in y our working directory called bin  download the “gzipped” tarball match-0.8 .tar.gz from http://spiff.rit.edu/match/ into the subdirectory bin  “unzip” and extract the f iles  read the on- line R EADM E for m atch- 0.8; it tells you ho w to install and check match-0.8 . (Note that there i s an error in this f ile. The line “- cd m atch- 0.6 ” should read “- cd m atch- 0.8”.)  follow the d irections in the R EADM E f ile, o mitting the h yphen that starts each line, throu gh the line “make ch eck.” Summarize here, as much as you c an unde rstand, what y ou think the . configure, m ake, and make check commands are doing. Have your instru ctor initial that you’ve tried to f igure things out: ___________ One of the extracted f iles i s called “match.html”. It describes ho w to use m atch to extract the information for stars that are “ matched” in both the visual and blue i mages ( in this c ase). You should read through the introduction, preparing the input, and usage sections of the manual. Th e following is a summary of some of the steps to help y ou: Within IRA F, extract the ID , XC EN TER, YC ENTER , MAG , AND M ER R from y our two *.als .1 f iles. Y ou should not run match in y our b in d irectory but rather in the d irectory where y our process ing h as be en occurri ng. Fi gure out how to do thi s b y calling up the m atch ex ecutable f ile using the abolute d irectory path! It can be written down in 1 line: Noting that the f irst column of the table is giv en the index number “0 ” the following command w orks fine f or our work if y ou extracted the information exa ctly as given (substitu te y our file names f or the italized names): match starsA.dat 1 2 3 starsB.dat 1 2 3 outfile= matched id1=0 id2=0 Compare the resul ts s ide-by-s ide ( make sure y our window i s ver y large) b y using the following command diff --side-by-side *mt* | less Re ferences Stetson, Pe ter B , “ DA O P H O T - A co mputer p rogram f or cr owded- field s tellar ph otometry”, 1 987 P A SP, 99, 1 91 A Ref erence Gui de t o th e I RA F/D A O P H O T Pa ckage, Lin dsey E. D avis, January 1 994 7 Blank 8 Na me:___________________________________________________________ Due Date:____________ IRAF E xercise V Score ________ / 35 1. <10 pts> Fill in the following table with the values f or daofind for 5 stars from e ach o f the B and V i mages. V f ilter x y Sk y M ean Sk y s igma FWHMps f Coun ts Averages: B filter Averages: 2. <5 pts> E dit datapars. Enter in this table both the v alues y ou got from your measurements and the values you w ill actually used after comparing your values to those on the instru ctor (on- line) list. R emember: W e are working with m920004 f irst and w ill come back to this table w hen you get to m920006. V filter B filter Your value Value used Your value Val ue used fwhmpsf: fwhmpsf: sigma: sigma: datamin: datamin: datamax: datamax: 3. <3 pts> W hat values do you think are appropriate f or: photpars.apert ures: __________ fitskypars.ann ulus: fitskypars.dann ulus: __________ 4. <2 pts> W hat values f or the FWHM did psf determine? V filter __________ B filter __________ 9 ́ ́ ́ 5. <5 pts> Compare the photometry in this e xercise with those of IRA F IV for the f ollowing stars and comment on the results, g iving explanations f or any discrepancies (s ay, of 0 .2 m agnitudes or more): Star ID X Y V B (IRA F IV) (approx) (approx) IRAF IV IRA F V IRA F IV IRA F V 6 8 13 18 20 6. <2 pts> Run the m atch program so that y ou have 2 lists o f stars: a li st o f those stars in the V filter that have matches in the B f ilter, and a list of those stars in the B f ilter that h ave m atches in the V filter. 7. <3 pts> Create the color- magnitude diagram for your results using SuperMon go. Y ou s hould be able to modify the m acro used in IRA F IV; i f not, then there is a sample linked from our homepage. Show your graph to y our instru ctor be fore printing. If your results are w ay o ff b ase, then y ou may have to go back, mod ify some of your parameters or c heck to m ake sure all p arameters are set correctly (usually the problem), and redo the photometry . Once you h ave a CMD that y ou are satisfied with, print it and attach to this sheet. 8. Here is a recently published CMD of M 92 . Compare your overall results w ith this diagram. Answer on the back of y our printed CMD of M 92. a. <1 pt> First, estimate on w hich part o f the diagram the stars from thi s exerci se lie . Indicate your guess clearly on thi s i mage. (It w ill help i f you ad just the X- and Y-ax is s cales o f y our SM graph to match thi s f igure.) b. <2 pts> Second, there i s, no doubt, an o ffset in V and in B-V b etween y our CMD and this one. Wh y i s this? (There i s probably more than one reason.) c. <2 pts> Wh y are there s o m any stars in this diagram that are s cattered and do not lie on the main- sequence or the sub- giant, g iant, or horizontal branches? A . R uelas-M ayorgaandL. J. S anchez R evistaM exicanadeA stronom ıayA strof ısica, 41, 507–5 22(2005) 10