Photometry
Nicole Fields












Once all of the images had been reduced, I used IRAF to do photometry of our sources and the nearby reference stars found in several papers. The tool in IRAF that I used to do the photometry is qphot. qphot is located in the package noao:digiphot:apphot. In order to smoothly do a lot of photometry at once, I first used imexamine to make coordinate files for each object for each night of data. In order to use imexamine it is important that all of the display tools are properly setup. See the IRAF page for more details.

Once the relevant image is opened in ds9, and within IRAF you are located in the same directory as the relevant image, (This is not absolutely necessary, but makes life a little easier.) then use the command imexamine > output.coo. The > tells IRAF to redirect the output of the command imexamine to the file output.coo. On the first pass of making coordinate files, I assumed for simplicity that each object had the same pixel position for the duration of one night, from filter to filter. This was not always the case, and corrections neeeded to be made at a later stage.

So for example if I was going to make a coordinate file for the object Markarian 421, then I would open one of the Markarian 421 images from that night, in any filter, and use the command imexamine > Mrk421.coo. Then switching over to the display window, I would center the cursor on the first reference star and press , to output the coordinates of that star to the .coo file. I would do this for each reference star in turn, finally followed by the source, Markarian 421, in this case. The reference stars for our six sources were found in Villata et al. 1998, Smith et al. 1991, and Fiorucci et al. 1998.

Once coordinate files for each object for each night have been created the photometry can begin! Using the command epar qphot set image= to the input image name, for example Mrk421-B.fits. Set cbox= to a reasonable number. I used 7.0. To set annulus=, dannulus=, and aperture=, you will have to use imexamine to look at the radial profile of the reference stars and the source on which you want to do the photometry. See the IRAF page for more help with getting radial profiles. Once you have a radial profile that looks like this, then you can decide which values to use. I used annulus= 7.0, dannulus= 3.0, and aperture= 6.0 for all of my photometry. coords= should be set to the appropriate .coo file already made, for example Mrk421.coo.

The MOST important parameter when doing photometry is epadu=. This is the value that gives the electron gain of the CCD. If it is not set correctly then the errors on the magnitudes that IRAF gives you will be WRONG. The way to check the gain from the fits files is to use the hedit command. Then give IRAF the relevant images, the field GAIN, and the value expression .. For all of my images the gain was always set to 3. When qphot is run, it will create files with the same name as the input with a .mag.1 at the end.

Similarly to when I did the reduction, I scripted the photometry by object. The following example photometry script was run in the same directory as the .fits and .coo files.

Now that each .fits image has its own .fits.mag.1 file, you will probably want to extract the relevant data fields from the .mag.1 files. The IRAF command that does this is called pdump. It is located in package noao:digiphot:apphot. The fields that I was concerned with were mag and merr. The parameters for pdump were set as follows to extract the magnitudes from the Markarian 421 B filter images: infiles=Mrk421-B*.fits.mag.1, fields=mag,merr, and the rest were left as the defaults.

In order to create data files that had the Julian Date of the observation, the magnitude of the source from IRAF, and the error from IRAF, I made several scripts. Here is the one for the Mrk421-B filter. I redirected the output of that script to a large data file. This was done using >> to append to an already existing file.

Back to the REU homepage!
REU homepage