DOLPHOT Continued

DOLPHOT

I am going to work through the Dolphot tutorial here. I am just going to do it step by step. I will post the text of the tutorial and annotate in italics what I am doing as I go.

2 Installation To install DOLPHOT, you must decide on a location where you want the files to reside, and uncompress and unpack the distribution into that directory. A basic installation of DOLPHOT requires about 3.5 Mb for the sources and binaries.

I unpacked the zip file onto my desktop, it is now a folder called dolphot2.0

2.1 Makefile The Makefile contains several lines at the beginning which may be edited for your particular system. The first two lines select the C and FORTRAN compiler options; the FORTRAN option is used solely for the purposes of linking against PGPLOT libraries (see below). For most modern systems, “gcc” suffices for both.

I entered gcc for both of the first two options (C and fortran compilers)

Note that behavior of compilers and make utilities can vary from system to system. It is strongly recommended that you use gcc as your compiler, and the Gnu make utility (gmake or gnumake) for compiling DOLPHOT. If “make” does not point to the appropriate gnu make binary, you will need to explicitly call “gmake” or “gnumake” from the command line. In addition, the definition of “MAKE” in the base makefile will need to be changed to whatever the appropriate name is.

It sounds like it will be better for me in the long run to figure this out in the base files as opposed to having to figure out the command line calling of these directories. I’m reading this manual to learn more about the make utility.

BASE DIR should be set to the directory containing Makefile if using gnu’s make utility, but if not it can be set directly (for example, export BASE DIR = /data0/dolphot2.0).

The makefile is in the dolphot folder so I set the basedir in that makefile to /Users/rorylowe/Desktop/dolphot2.0

DOLPHOT contains some programs that can make use of PGPLOT, if it is installed on your system. (PGPLOT is graphing library written by Tim Pearson, and can be obtained at http://www.astro.caltech.edu/ tjp/pgplot/) If PGPLOT is installed, these lines should be uncommented and the appropriate directory locations used. The first definition (PGHEAD) should point to the location of cpgplot.h. The second must at minimum give the location of libpgplot and libcpgplot (as well as specifying those libraries with “-lpgplot” and “-lpgplot”. More libraries and/or directories may be needed. (One can often copy the commands used to compile cpgdemo when installing pgplot.)

I am going to try without installing pgplot for now and leave those lines commented

The default compilation flags are -O3 (for optimization) and -Wall (to show all normal warnings). Depending on your machine and compiler, you may wish to use different options. A common flag is -m64 to compile into 64-bit binaries if your system does not do this by default. If you will be installing the ACS, WFC3, WFPC2, or WFIRST modules, see the seperate documentation for information regarding the camera-specific compilation op- tions. This also affects the Tiny Tim lines in Makefile.

I am also going to try not doing this for now. Although it could be necessary to use the WFC3 module eventually.

If you will be using very large data sets, you may need to increase the maximum number of images and stars detected. These can be done by setting MAXNIMG and MAXNSTARS appropriately.

I’ll leave these blank for now

Finally are two debugging lines that will cause any floating point errors to either be printed to screen or cause the program to terminate. The first (NAN PRINT) is enabled by default; the latter (NAN CRASH) is not. It is recommended to keep the print statements since these are useful for knowing if there is a problem with your photometry. Note that the compilers and make utilities on some machines do not conform to standards. Here are some problems that have been reported by users, as well as fixes 4 • Problem: make does not understand the “export” command, which ensures that definitions are used by a child make process as well as the current process. Solution: (1) delete the word “export” wherever it appears in Makefile, and (2) copy all definitions from Makefile into psfs/Makefile. • Problem: compiler does not accept the -D flags, which sends definitions to the compiler. Solution: remove the -D flags from Makefile and insert the following substitute lines into every .c file where the definitions are used: define BASEDIR ‘‘/data0/dolphot’’ #define USEACS define TTDIR ‘‘/data0/tinytimv62’’ #define SWAP BITS define PGPLOT define PGHEAD ‘‘/usr/local/pgplot/cpgplot.h’’ As above, the directory names should be changed to the installation and Tiny Tim directories, respectively. To quickly determine which .c files require flags added, use grep, as in “grep BASEDIR .c */.c”. After editing the makefile, you should be able to type “make” to compile DOLPHOT without any error or warning messages. Should you need to later recompile the programs, typing “make clean” will remove the original compilations to ensure that all programs get recompiled.

after a bit of trouble that was caused by an extra space I was able to successfully execute the make command. The program ran a bunch of stuff on the terminal window and now I have my command line back. I’m not sure exactly what the command did, but it worked.

All binaries are compiled into the “bin” directory within the DOLPHOT installation. It is recommended to add this directory to your path. (This is done by editing your .cshrc or .bashrc file in your home directory.)

I’m not sure what either .cshrc or .bashrc files are or what my home directory is. I did a search and couldn’t figure it out

FWHM

I’ve made some progress on DOLPHOT. Now I am going to see if I can continue to make some progress on running imexam.

I spent a while longer swimming through the confusion of the XPA name server thinking my lack of it was keeping imexam from working. After a quick checkin with Dr. G I realized that the issue was actually that I was not running the astroconda environment and thus was having no luck using the ds9 command. Now I know!

The astroconda environment has to be extablished (using “source activate astroconda”) then you can open ipython and use the full functionality of imexam.

Another fun thing I just discovered is if you want to use a jupyter notebook in a different environment you just need to activate that environment before launching the jupyter notebook in terminal.

Written on July 18, 2018