DAOphot by Peter Stetson (P. Stetson, 1987, PASP, 99, 191) is a powerful package for point source, PSF fitting photometry in crowded fields.
You can edit tips on using DAOphot into this page.
A version of DAOphot exists inside IRAF but many people use the stand-alone version. This is written in Fortran. As compilers have mutated and g77 is no longer developed, it may be useful to compile it with gfortran.
Some tips on how to compile DAOphot with gfortran - these have not been extensively tested:
(Ubuntu Linux users can refer to these instructions which have been fully tested for Ubuntu 14.04 and Ubuntu 16.04 distributions).
Edit the Makefile:
- change "F77 = g77" to "F77 = gfortran"
- if you are compiling against a set of IRAF libraries that are old and/or compiled with g77, they will be compiled into 32 bit rather than 64 bit and you'll need to insure that you compile and link into 32-bit:
- add "-m32" to FFLAGS
- add "-m32" to LFLAGS
- add "-lg2c" to LFLAGS. This will allow you to link to libraries that may have been compiled with g77, such as older IMFORT/IRAF installations. You need libg2c on your system for this to work.
Edit the sourcefile "bothsubs.f" to change the line "character function message*80 (imgtyp, ier)" to "character*80 function message (imgtyp, ier)".
Edit the sourcefile "daomaster.f" This has a lot of lines that are commented out with a "D" or "d" in the first column rather than a "C," which is a really old non-standard Fortran compiler debug switch. Comment these out by adding a leading "C." An easy way to do this is with sed:
mv daomaster.f daomaster_old.f
sed s/^D/CD/ &amp;lt; daomaster_old.f | sed s/^c/cd/ &amp;gt; daomaster.f
Note that the wiki software is garbaging my attempts to show a less-than and greater-than for input and output redirects. Don't type all that amp;amp; stuff, just use the usual redirect symbols.
You can do the same thing (replace leading D with C) to the sourcefile montage2.f, otherwise it won't compile. Christopher Burns points out that you can use the gfortran flag "-fd-lines-as-comments" (add it to FFLAGS) and then you don't have to edit these lines.
Now try removing all old object files and making the executables:
make clean ; make all
The daophot executables should compile. montage2 won't compile until you edit the leading-D lines, but you can run DAOphot without that.
Ben Weiner, bjw at as.arizona.edu, May 2014