Transcription

User’s Manual forDAOPHOT IIThis manual is intended as a guide to the use of the digital stellar photometry reduction programDAOPHOT II: The Next Generation. Brief descriptions of the major routines are provided to aid theuser in the use of the program, and to serve as an introduction to the algorithms for programmerscalled upon to make modifications. A more complete understanding of the methods used can best beobtained by direct examination of the source code and the comment statements embedded therein.DAOPHOT Classic was originally constructed within the framework of a computer program givento Linda Stryker and the Dominion Astrophysical Observatory by Jeremy Mould (Caltech). Theaperture-photometry portion of the current program is still somewhat influenced by algorithms andsubroutines developed at Kitt Peak National Observatory, by way of the POORMAN code developedby Jeremy Mould and Keith Shortridge at Caltech. POORMAN was first made to run on the DAOVAX by Linda Stryker, and was modified and generalized by Ed Olszewski. Over the years, I havereplaced all of the subroutines with others of my own writing. In DAOPHOT II: The Next Generationall of the major algorithms and actual FORTRAN coding are my own, with the exception of thoseFigaro, IRAF, or Midas routines which are used for the image input and output. I am solely responsiblefor bugs and algorithm-related problems. If any such problems are found, please contact me; for majorproblems, hard-copy documentation of the circumstances and nature of the difficulty would be highlydesirable.***** NOTE *****This manual has been modified to reflect the new VMS/Unix IRAF/Midas compatible version ofDAOPHOT II: The Next Generation. If you are still running DAOPHOT Classic you will find manyplaces where this manual is inappropriate.2000 June 5Peter B. Stetson(604)363–[email protected] Astrophysical ObservatoryHerzberg Institute of Astrophysics5071 West Saanich RoadVictoria, British Columbia V8X 4M6Canada1

ContentsA. Introduction .3B. A Typical Run of DAOPHOT II .6C. Descriptions of Main Routines . 11I.DAOPHOT II itself . 11II.ATTACH . 12III.OPTIONS . 14IV.SKY . 19V.FIND . 20VI.PHOTOMETRY . 25VII.PICK and PSF . 29VIII.PEAK . 34IX.GROUP . 36X.NSTAR . 37XI.SUBSTAR . 29D. Additional Commands . 41XIII.MONITOR/NOMONITOR . 41XIV.SORT . 42XV.SELECT . 44XVI.OFFSET . 45XVII.APPEND . 46XVIII. DUMP . 47XIX.FUDGE . 49XX.ADDSTAR . 51XXI.LIST . 53XXII.HELP . 54XXIII. EXIT . 55E. ALLSTAR . 56Appendix I - Optional Parameters . 60Appendix II - The FIND Threshold . 61Appendix III - Deriving a PSF in a Crowded Field . 65Appendix IV - Data Files . 682

A. IntroductionDAOPHOT II is a computer program for obtaining precise photometric indices and astrometricpositions for stellar objects in two-dimensional digital images. It is intended to run as non-interactivelyas possible and, furthermore, the possibility that DAOPHOT II would be used at other places thanthe DAO was kept in mind as it was approaching its present form. Therefore DAOPHOT II performsno operations related to the display or manipulation of the digital image on an image-display system,even though at some stages in the data reduction it is useful to be able to examine the picturevisually. Picture-display operations and some other steps in the reduction procedure, such as editingintermediate data files or combining results from different frames to obtain instrumental colors, maybe done outside of DAOPHOT II using IRAF, Midas, or whatever software you have handy or feellike writing.It is assumed that (1) before running DAOPHOT II, the user will have performed all necessarypreparation of the images, such as flat-fielding, bias-level subtraction, and trimming worthless rows andcolumns from around the perimeter of the picture, and (2) the brightness data in the image are linearlyrelated to true intensities. The user is also assumed to have a priori knowledge of the following piecesof information: (1) the approximate size (full-width at half-maximum) of unresolved stellar objects inthe frame; (2) the number of photons corresponding to one analog-to-digital conversion unit; (3) thereadout noise per pixel; and (4) the maximum brightness level (in analog-to-digital units) at whichthe detector still operates linearly. These conditions being satisfied, DAOPHOT II will perform thefollowing primary tasks: (1) find star-like objects above a certain detection threshold, rejecting witha certain degree of reliability bad pixels, rows, and columns, and avoiding multiple hits on individualbright objects (although it continues to have some trouble with grossly saturated objects. I’m stillthinking about it.); (2) derive concentric aperture photometry for these objects, estimating a localsky brightness for each star from a surrounding annulus of pixels; (3) obtain a point-spread functionfor the frame from one star or from the average of several stars, in an iterative procedure intended tofit and subtract faint neighbor stars which contaminate the profile; (4) compute precise positions andmagnitudes for the program stars by fitting the point-spread function to each star, either individuallyor in simultaneous multiple-profile fits for up to 60 stars at a time; and (5) erase stars from thepicture by subtracting appropriately scaled point-spread functions corresponding to the positions andmagnitudes derived for the stars during the photometric reductions. ALLSTAR II is a separate standalone program which performs a much more sophisticated multiple-profile fit to all the stars in a framesimultaneously. Hereinafter I will include ALLSTAR II under the generic heading of DAOPHOT IIeven though it is, as I said, a separate, stand-alone program. In addition to the aforementioned tasks,DAOPHOT II contains routines to perform some bookkeeping operations more easily than may be thecase with standard facilities: e.g., estimating an average sky brightness for a frame, sorting the stars’output data according to their positions in the frame or their apparent magnitudes, and dividing thestars in the frame into natural groupings (for optimal multiple-star reductions with NSTAR). Thereis also a routine for adding artificial stars to the picture, at random, so that the effectiveness of thestar-finding and profile-fitting routines can be studied quantitatively in the particular circumstancesof your own picture. A few other global considerations of which you should be aware:(1) Although DAOPHOT II is designed to be non-interactive, in fact many of the operations run3

quickly enough that they are conveniently executed directly from the terminal or workstation.Only the multiple-star profile fits take long enough that they are more conveniently performed inbatch mode: they may require anywhere from a few CPU minutes to a few CPU hours per frame,depending upon the number of stars to be reduced, the degree of crowding, and — of course —the speed of your machine. If computer time is expensive for you, you may want to decide justhow many stars must be reduced in order to fulfill your basic mission. For instance, if your goalis to locate the principal sequences of some remote cluster, it may not be necessary to reduceevery last crowded star on the frame; instead, only a subset consisting of the less-crowded starsmight be reduced.(2) The derivation of the point-spread function can also be performed non-interactively with areasonable degree of success, but it may be to your advantage to check the quality of the profilefits visually on an image display before accepting the final product.(3) The shape of the point-spread function is assumed to be spatially constant or to vary smoothlywith position within the frame; it is assumed not to depend at all on apparent magnitude. Ifthese conditions are not met, systematic errors may result.(4) Although the star-finding algorithm is by itself not sophisticated enough to separate badly blendedimages (two stars whose centers are separated by significantly less than one FWHM), by iterativelysubstracting the known stars and searching for fainter companions, it is still possible to identifythe separate stars in such a case with a good degree of reliability: First, one runs the star-findingalgorithm, derives aperture magnitudes and local sky values for the objects just found, and obtainsa point-spread function in the manner described in an Appendix to this manual. Second, oneperforms a profile-fitting reduction run for these objects, and they are subtracted from the dataframe. This new picture, with the known stars subtracted out, is then subjected to the starfinding procedure; stars which were previously concealed in the profiles of brighter stars standout in this frame, and are picked up quite effectively by the star-finding algorithm. Sky valuesand aperture magnitudes for these new stars are obtained from the original data frame, and theoutput from this reduction is appended to the most recent photometry file for the original starlist. This augmented set of stars is then run through the profile-fitting code, and the entire list offitted stars can be subtracted from the original frame. The process through this point can easilybe set up in a command procedure (or script, or whatever your favorite rubrik is), and carriedout in batch mode while you are home sleeping or drinking beer or whatever. Finally, if absolutecompleteness is wanted, the star-subtracted picture can be examined on an image display. Anystars that were still undiscovered by the program can be picked out by eye and added to thestar list manually. Then one final reduction run may be performed. Visual examination is alsoa reasonable way to identify galaxies among the program objects — they are easily recognizable,with over-subtracted centers surrounded by luminous fuzz.My experience is that the number of stars found in the second pass (the automatic star-findingon the first subtracted frame) amounts to of order one-third the number of stars found in thefirst pass. The number of stars missed in the first two passes and later picked out by eye is oforder one to three percent of the total found in the first two passes. This procedure assumesthat computer time is cheap for you, and your own time is valuable. If the converse is the case,4

you may prefer to skip the second or even both automatic star-finding passes, and go directly tointeractive star identification.(5) A principal source of photometric error for the faint stars is the difficulty of defining what ismeant by the term “sky brightness” in crowded fields. This is not simply the practical difficultyof identifying “contaminated” pixels in the sky annulus so that they can be omitted from theaverage, although certainly this is a significant part of the problem. There is also an underlyingphilosophical ambiguity. For aperture photometry the term “sky brightness” encompasses notonly emission from the terrestrial night sky, from diffuse interplanetary and interstellar material,and from faint, unresolved stars and galaxies. It also includes the possibility of a contribution oflight from some bright star or galaxy. That is to say, for aperture photometry the relevant skybrightness is defined by the answer to the question, “If the particular star we are interested in werenot in the center of this aperture, what intensity would we measure there from all other sources ofbrightness on or near this line of sight?” If there is available a set of pixels whose brightness valuesare uncontaminated by the star we are trying to measure, but which are subject to all other sourcesof emission characteristic of that portion of the frame (including the possibility of a contributionfrom individual bright objects nearby), then we may answer the question: “Most probably theintensity would be such-and-such”. The specific value “such-and-such” is well predicted by themodal value of the brightnesses in the sample of sky pixels. This is why DAOPHOT II uses themode of the intensities within the sky annulus to define the value that should be subtracted fromthe intensities inside the star aperture; not because it is a “robust estimator of the local diffusesky brightness”, but because it is a sort of maximum-likelihood estimator — it yields the “mostprobable value of the brightness of a randomly-chosen pixel in this region of the picture”. In thecase of photometry from multiple simultaneous profile fits, on the other hand, the sky brightnessis defined by the answer to a different question altogether: “If none of the stars included in mystar list were in this region of the picture, what would the typical brightness be?” This is amuch harder question to answer, partly because the answer cannot be obtained by an empiricalmethod as simple as finding the mode of an observed distribution, and partly because the criteriafor including a star in the star list are hard to define absolutely. For instance, a faint star isfar easier to see in a clear-sky zone, where its contamination can be identified and then ignoredin the sky-brightness estimate, than it would be if it happened to lie near a much brighter starwhose intrinsic brightness we are trying to measure. Clearly then, when we detect a faint starin the sample sky region, the decision whether to include or reject that star’s photons in the skyestimate becomes some function of the magnitude of the star we are interested in measuring.Further, a serious attempt to estimate the sky brightness using probabilistic methods wouldrequire an accurate model for the full noise spectrum of the instrument, including the arrival rateand energy spectrum of cosmic rays, the surface density of stars and galaxies on the sky, theirapparent luminosity functions, and the variations of these quantities across the frame. Thus, adefinitive answer to the question “How bright is the sky here?” is exceedingly hard to obtainwith full statistical rigor. For the present we must be content with a merely adequate answer.I have discussed the problem of sky determination in such philosophical detail as a warningto the user not to regard DAOPHOT II (or any other program of which I am aware) as the final5

solution to the problem of accurate stellar photometry in crowded fields. As it stands now, theaperture photometry routine is the only place in DAOPHOT II proper where sky brightness valuesare estimated; these estimates are based on the modal values observed in annuli around the stars, andthey are carried along for use by PEAK and NSTAR. ALLSTAR II has the capability (as an option)of iteratively re-determining the sky brightness value for each star, defined as the median value foundin pixels surrounding the star after all known stars have been subtracted from the frame using thecurrent, provisional estimates of their position and brightness. These sky brightnesses are assumed tobe adequate for the purposes of defining and fitting point-spread functions, but of course this is onlyapproximately true. The extent to which this false assumption affects the observational results andthe astrophysical conclusions which you derive from your frames can best be estimated, at present,by the addition of artificial stars of known properties to your pictures, with subsequent identificationand reduction by procedures identical to those used for the program stars.6

B. A Typical Run of DAOPHOT IIBefore you run DAOPHOT II: The Next Generation you must arrange for your pictures to existon the computer’s disk in a format acceptable to the program. On the DAO VAXen the standardformat for images intended for processing with DAOPHOT is the Caltech data-structure (.DST) file,and routines exist for copying data from a number of different formats, including FITS, to this typeof file. On our Unix machines we use IRAF for image manipulation and IRAF image files (*.imh and*.pix) for image storage. At ESO there exists a version of DAOPHOT II that operates on Midasformat image files on a variety of hardwares. If you don’t happen to be at the DAO, then you willhave to check with your local curator of DAOPHOT II to learn how to put your data into the properformat. In all that follows, I shall assume that you are either at DAO, or are using an unadulteratedDAO/VMS/Unix version of DAOPHOT II. See your local curator for changes that are specific to yourfacility.I will now talk you quickly through the separate steps in reducing a typical data frame, frombeginning to end. I suggest that you read quickly through this section and the following chapters onthe major and minor routines in DAOPHOT II, and then come back and reread this section morecarefully. Words written in boldface CAPITALS will be DAOPHOT II commands, which you mayissue in response to a “Command:” prompt.I. From a system prompt run DAOPHOT II. Either read or don’t read the latest news (if it’s evenoffered to you). The values of certain user-definable parameters will be typed out. Check theirvalues! You might want to change some of them.II. Use OPTIONS to change the values of any of the optional reduction parameters. (This step is,itself, optional.)III. Use ATTACH to tell the program which picture you want to reduce. (In the VMS version, youdo not need to include the filename-extension, .DST, when you specify the filename, but you mayif you like. In the Unix IRAF version, your life will be simpler if you do not include the .imhextension.)IV. You might want to use SKY to obtain an estimate of the average sky brightness in the picture.Write this number down in your notes. This step is not really necessary, because FIND belowwill do it anyway.V. Use FIND to identify and compute approximate centroids for small, luminous objects in thepicture. One of the “user-definable optional parameters” which you are permitted to define isthe significance level, in standard deviations, of a luminosity enhancement in your image whichis to be regarded as real. Two other parameters which you must define are the readout noiseand gain in photons (or electrons) per data number which are appropriate to a single exposurewith your detector. When you run FIND, it will ask you whether this particular image is theaverage or the sum of several individual exposures. From the available information, FIND willthen compute the actual brightness enhancement, in data numbers above the local sky brightness,which corresponds to the significance level you have specified. See the section on FIND and theAppendix on “The FIND Threshold” for further details. According to a parameter set by theuser, FIND will also compute a “Lowest good data-value”: any pixel whose brightness value is7

less than some number of standard deviations below the mean sky value will be regarded as bad,and will be ignored by FIND and by all subsequent reduction stages.VI. Use PHOTOMETRY to obtain sky values and concentric aperture photometry for all objectsfound by the star-finding routine.VII. Use PICK to select a set of reasonable candidates for PSF stars. PICK first sorts the stars bymagnitude, and then rejects any stars that are too close to the edge of the frame or to a brighterstar. It will then write a user-specified number of good candidates to a disk file for use by PSF.VIII. Use PSF to define a point-spread function for the frame. In crowded fields this is a subtle,iterative procedure requiring an image processing system; it is outlined in detail in the Appendixon “Obtaining a Point-Spread Function”. Consider, then, that this step is a self-contained loopwhich you will go through several times.IX. GROUP, NSTAR, and SUBSTAR; or ALLSTAR. GROUP divides the stars in the aperturephotometry file created in step VI above into finely divided “natural” groups for reduction with themultiple-star PSF-fitting algorithm, NSTAR. NSTAR will then produce improved positionsand instrumental magnitudes by means of multiple-profile fits, and SUBSTAR may then beused to subtract the fitted profiles from the image, producing a new image containing the fittingresiduals. Alternatively, you could feed the aperture-photometry file directly to ALLSTAR, whichwill reduce all the stars in the image simultaneously and produce the star-subtracted picturewithout further ado.X. Use ATTACH to specify the star-subtracted picture created in step IX as the one to work on.XI. Use FIND to locate new stars which have become visible now that all the previously-known starshave been subtracted out.XII. Use ATTACH again, this time specifying the original picture as the one to work with, anduse PHOTOMETRY to obtain sky values and crude aperture photometry for the newly-foundstars, using the coordinates obtained in step XI. (You are performing this operation on theoriginal picture so that the sky estimates will be consistent with the sky estimates obtained forthe original star list.)XIII. Use GROUP on the new aperture-photometry file you just created. Use GROUP again on theprofile-fitting photometry file created in step IX (this step is unfortunately necessary to put boththe old and new photometry into files with the same format, so that you can . . .). Use APPENDto combine the two group files just created into one.XIV. GROUP SELECT SELECT GROUP SELECT SELECT . . . NSTAR SUBSTAR, or ALLSTAR: If for some reason you prefer NSTAR to ALLSTAR (I suredon’t), the file just created in step XIII needs to be run through GROUP once again to sortthe combined starlist into the best groupings for the next pass of NSTAR. Watch the table ofgroup sizes that gets created on your terminal very carefully. The multiple-PSF fitting routineis at present capable of fitting no more than 60 stars at a time. If any of the groups createdby GROUP is larger than 60 stars, the SELECT command can be used to pick out only thosegroups within a certain range of sizes. You would run8

(1) SELECT once to pick out those groups containing from 1 to 60 stars, putting them in theirown file. You could discard all groups larger than 60 if you only wanted a representative, asdistinguished from a complete, sample. Alternatively, you could run(2) SELECT again to pick out those groups containing 61 or more stars, putting them in theirown file. Then you would run(3) GROUP with a larger critical overlap on the file created in (2), to produce a new groupfile with smaller groups. The photometry for these stars will be poorer than the photometryfor the less-crowded stars picked out in XIV-1.Return to (1) and repeat until (a) all stars are in groups containing less than or equal to 60 stars,or (b) (preferred, and cheaper) enough stars are in groups smaller than 60 that you feel you canperform your basic astronomical mission. Then,(4) NSTAR as many times as necessary to reduce the group files just created, and(5) SUBSTAR as many times as necessary to subtract the stars just reduced from the dataframe.Or , you could get around the whole thing just by running the APPENDed group file throughALLSTAR.XV. EXIT from DAOPHOT II. Display the star-subtracted picture created in step XIV on yourimage-display system. Look for stars that have been missed, and for galaxies and bad pixelsthat have been found and reduced as if they were stars. If desired, create a file containingthe coordinates of stars you wish to add to the solution and run PHOTOMETRY on thesecoordinates. To make one more pass through the data, you should run this aperture photometryfile through GROUP, run the previous NSTAR or ALLSTAR results through GROUP (again,necessary in order to get both the old and new stars into files with the same format), APPENDthese files together, and return to step XIV. Repeat as many times as you like, and have the timefor.XVI. EXIT from DAOPHOT and examine your picture on the image-display system. Choose severalminimally-crowded, bright, unsaturated stars. Make a copy of the output file from your verylast run of NSTAR or ALLSTAR and, with a text editor, delete from this file the data lines forthose bright stars which you have just chosen. Run DAOPHOT, ATTACH your original pictureand invoke SUBSTAR to subtract from your picture all the stars remaining in the edited datafile. With equal ease, you can also create a file containing only the stars you want to retain —you could even use the file containing the list of PSF stars — and you can tell SUBSTAR tosubtract all the stars from the image except the ones listed here. In either case, the stars whichyou have chosen will now be completely alone and uncrowded in this new picture — measurethem with the aperture PHOTOMETRY routine, using apertures with a range of sizes up tovery large. These data will serve to establish the absolute photometric zero-point of your image.***** NOTE *****This has been the reduction procedure for a program field, assumed to contain some hundredsor thousands of stars, most of which you are potentially interested in. The reduction procedure for9

a standard-star frame, which may contain only some tens of objects, only a few of which you areinterested in, may be different. It may be that you will want to run FIND on these frames, andlater on match up the stars found with the ones you want. Or perhaps you would rather examinethese frames on the image-display system, use the cursor to measure the coordinates of the stars youare interested in, and create your own coordinate file for input into PHOTOMETRY (step VI). Inany case, for your standard fields it is possible that you won’t bother with profile fits, but will justuse the aperture photometry (employing a growth-curve analysis) to define the stars’ instrumentalmagnitudes.10

C. Descriptions of Main Routines(In approximate order of use)I. DAOPHOT II itselfWhen you run DAOPHOT II, the first thing that may occur is the typing out on your terminalof a brief message, notifying you that some information to your advantage is now available. If thismessage has changed since the last time you ran the program, answer the question with a capital orlower-case “Y CR ”. The program will then type out the text of the entire message, a section at atime. It will pause at the end of each section of the message to allow you to read what it’s writtenbefore it rolls off the screen, or to escape to the main program without reading the rest of the message.When you reach the main part of the program, the current values of the optional reduction parameterswill appear on your screen (see the Appendix on Optional Parameters, and the OPTIONS commandbelow). When you see the “Command:” prompt, the program is ready to accept the commandsdescribed below.11

II. ATTACHIf you want to work on a digital picture, the first thing you should do is specify the disk filenameof that picture with the ATTACH command: COMPUTER TYPES:YOU ENTER: Command:AT filename Your picture’s header comment (if any) Picture size:nnn nnn ------------------- or, COMPUTER TYPES:YOU ENTER: Command:AT Enter file name:filename Your picture’s header comment (if any) Picture size:nnn nnn Some commands, the ones which operate only on data files, (e.g. SORT, OFFSET, APPEND),and others which set the optional parameters (OPTIONS, MONITOR, NOMONITOR) may beissued to DAOPHOT II without a prior ATTACH command having been given. The program willrefuse to let you tell it to perform tasks requiring a picture file (e.g., FIND, PHOTOMETRY,PSF, GROUP, NSTAR) unless a picture has been ATTACHed.In all implementations of DAOPHOT II of which I am aware, if the extension part of your picture’sfilename is the standard one for that image format (’.DST’ for Caltech data structures, ’.imh’ for IRAF,’.bdf’ for Midas) it may be omitted. If it is not the standard extension (or, on VMS machines, if youwish to specify other than the most recent version of the image file), the filename-extension must beincluded in the ATTACH command.The ATTACH command is the only one in DAOPHOT II which allows the user to includeadditional information (viz. a filename) on the command line. All other commands are issued simplyand without modification — the routines will then prompt the user for any necessary input.This is also a good time to point out that DAOPHOT II commands are case insensitive:commands and parameter options (see below) may be entered using either upper or lower caseletters, even on Unix machines. On VMS machines filenames are also case insensitive: FILE.EXTand file.ext refer to the same file. On Unix machines FILE.EXT, file.ext, FILE.ext, FiLe.ExT, etc.are all different. Finally, for Unix afficionados, I have taught DAOPHOT II to recognize a string of12

characters terminated with a colon (“ : ”) at the beginning of a filename as a directory name, à laVMS. Thus, if in your .cshrc file or some similar location, you have a statement likesetenv ccd 89/ccd-datathen while running DAOPHOT II in some other directory, you can refer to an image or other file,obs137, in this directory as ccd: obs137. In fact, I recommend that you do so, because all file namesused

Appendix III - Deriving a PSF in a Crowded Field . 65 Appendix IV - Data Files . 68 2. A. Introduction DAOPHOT II is a computer program for obtaining precise photometric indices and astrometric . is also a routine for adding arti