Photometric Calibration using IRAF

Start with cleaned images of standard fields and program objects:

1) Load noao.digiphot.apphot and noao.digiphot.photcal

2) Measure standards using qphot - save in mag files * ensure filter and airmass id keywords are identified

3) Identify pertinent images using MKIMSETS

lpar mkimsets:
       imlist = "*mag.1"        The input image list
    idfilters = "V,B"           The list of filter ids
       imsets = "stds.img"      The output image set file
 (imobsparams = "")             The output image observing parameters file
       (input = "photfiles")    The source of the input image list
      (filter = )               The filter keyword
      (fields = "")             Additional image list fields
        (sort = "")             The image list field to be sorted on
        (edit = yes)            Edit the input image list before grouping
      (rename = yes)            Prompt the user for image set names
      (review = yes)            Review the image set file with the editor
        (list = "")
        (mode = "ql")
Note: Filter id's should match id's in image headers at this point. This may or may not be the same as filter id's in transformation configuration file. See Step 4.

4) Create standard star observations file using MKNOBSFILE. This also creates a format description file for the observations.

lpar mknobsfile:
    photfiles = "*mag.1"        The input list of APPHOT/DAOPHOT databases
    idfilters = "V,B"           The list of filter ids
       imsets = "stds.img"      The input image set file
 observations = "stds.obs"      The output observations file
   (obsparams = "")             The input observing parameters file
  (obscolumns = "2 3 4 5")      The format of obsparams
   (minmagerr = 0.001)          The minimum error magnitude
      (shifts = "")             The input x and y coordinate shifts file
    (apercors = "")             The input aperture corrections file
    (aperture = 1)              The aperture number of the extracted magnitude
   (tolerance = 20.)            The tolerance in pixels for position matching
  (allfilters = no)             Output only objects matched in all filters
      (verify = no)             Verify interactive user input ?
     (verbose = yes)            Print status, warning and error messages ?
        (mode = "ql")
Note: Set tolerance to a large enough value for objects to be matched from frame to frame or set it to zero to turn off object matching.

Edit observations file to ensure star and filter id's match those in standards catalog and that data exists for each filter for every star. Also, ensure that filter id's in observations format file are correct.

You may find the Perl script, fixobsfile, in the /utilities directory useful to minimize editing.

5) Create configuration file using MKCONFIG. You may use standard star catalogs and the associates format description and transformation files that come with IRAF (in the directory photcal$catalogs). However, you might need to copy the transformation file to the current directory and edit as needed.

lpar mkconfig:
       config = "stdsconf"      The new configuration file
      catalog = "photcal$catalogs/fnlandolt.dat" The source of the catalog format sp
 observations = "fstds.obs.dat" The source of the observations file format specifica
    transform = "tnlandolt.dat" The source of the transformation equations
    (template = "")             An existing template configuration file
      (catdir = )_.catdir)      The standard star catalog directory
      (verify = no)             Verify each new entry
        (edit = yes)            Edit the new configuration file
       (check = yes)            Check the configuration file
     (verbose = no)             Verbose output
        (mode = "ql")

6) Fit transformation coefficients using FITPARAMS

lpar fitparams:
 observations = "stds.obs"      List of observations files
     catalogs = "photcal$catalogs/nlandolt.dat" List of standard catalog files
       config = "stdsconf"      Configuration file
   parameters = "stds.out"      Output parameters file
   (weighting = "uniform")      Weighting type (uniform,photometric,equations)
  (addscatter = yes)            Add a scatter term to the weights ?
   (tolerance = 3.0000000000000E-5) Fit convergence tolerance
     (maxiter = 15)             Maximum number of fit iterations
     (nreject = 0)              Number of rejection iterations
  (low_reject = 3.)             Low sigma rejection factor
 (high_reject = 3.)             High sigma rejection factor
        (grow = 0.)             Rejection growing radius
 (interactive = yes)            Solve fit interactively ?
     (logfile = "STDOUT")       Output log file
(log_unmatche = yes)            Log any unmatched stars ?
     (log_fit = no)             Log the fit parameters and statistics ?
 (log_results = no)             Log the results ?
      (catdir = ).catdir)       The standard star catalog directory
    (graphics = "stdgraph")     Output graphics device
      (cursor = "")             Graphics cursor input
        (mode = "ql")
Use the "c" key to identify points with high residuals. If your judgement justifies eliminating this point, use the "d" key to do so, the hit the "f" key to make a new fit with this point eliminated from the standard star data set.

7) Apply transformation coefficients to standard stars using INVERTFIT  to check for consistency

lpar invertfit:
 observations = "stds.obs"      List of observations files
       config = "stdsconf"      Configuration file
   parameters = "stds.out"      Fitted parameters file
        calib = "stds.dat"      Output calibrated standard indices file
    (catalogs = "")             List of standard catalog files
      (errors = "obserrors")    Error computation type (undefined,obserrors,equation
     (objects = "all")          Objects to be fit (all,program,standards)
       (print = "")             Optional list of variables to print
      (format = "")             Optional output format string
      (append = no)             Append output to an existing file ?
      (catdir = )_.catdir)      The standard star catalog directory
        (mode = "ql")
This example 'determines' the magnitudes of the standard stars according to the fit stored in 'stds.out'. This is useful for examining the reliability of the fit. When you are happy with the fit, you can use this same procedure to determine the magnitudes of your program objects (stored in a similar obsfile - for example, obj.obs, etc).

8) Create observation files for program stars and apply transformation coefficients using INVERTFIT