zpstars
Last updated: June 30,2018

Collect data for deriving the phtometric zeropoint of an image.

SPECIAL NOTE: In June2018 I began modifying zpstars so that it would use sources found on the images, as opposed to sources from the USNO-B1.0 catalog. I got to the point of extracting and oveplotting the source found with IMGCAT0 (used in the wcsf astrometry series of routines). However, the object detection here is poor at the faint end and I really need some more object classification and post-processing before this approach is practical for finding ZP from stars. So, for now (Jul2018) I am still using the USNO sources as the basic source for ZP stars.

  
% zpstars --help
Usage: zpstars /home/sco/N3379/T2/local_red/WCS/Rsco2039.fits N 
arg1 - Name of FITS image (can be full path)
arg2 - run in debug mode (Y/N)

Notice in the example above, the fullpath file name is used. This is not required. You can have a local file name put in for arg1 (i.e. ./Rsco2039.fits). In fact, I usually run zpstars from within the wrapper script photcal_fitslist and this code extracts the image basename from the fullpath name. It next determines if a version of this image resides in the WCS archive (i.e. ./local_red/WCS) and makes a local version if that is possible. The zpstars code is run on that local version. The one important point to remember is that the input image for zpstars must have a pretty good WCS in the header, and this is one of the first things that is checked .

A brief listing of the processing steps taken by zpstars for each image is given below:

  1. Just before zpstars is run it is assume that you (or your wrapper script) have gathered in the local directory a wcs-claibrated FITS image, and a table file of detected sources (this last is optional). (See EXTRA NOTE 0 below)
  2. The FITS header is checked for the presence of WCS cards. If a valid WCS is not present, the script exits.
  3. The quality of the WCS is visually assessed by overplotting USNO sources in the filed using usno_look_wcs. Note that this is done whether you are going to use USNO or IMGCAT0 sources for your final set of apertures. (See EXTRA NOTE 1 below)
  4. The user can choose to replace the over-plotted USNO sources with sources from the IMGCAT0 files. TBD
  5. The circled sources in the ds9 window can be deleted or altered to change the final list of sources to be used for ZP derivation. Once the final sources are set, the user hits a return and the mido.sh code is run to compute image parameters for each of the plotted region markers. (See EXTRA NOTE 2 below)
  6. Once the image paramters are computed, the ZP values using USNO data are ALWAYS gathered. This is true whether we will ultimately transform to a USNO system or some other (e.g. PS1). (See EXTRA NOTE 3 below)

EXTRA NOTES

0) Before running zpstars I (or a script like photcal_fitslist) would have assembled: 
     Rsco2039.fits       == The local version of the WCS-calibrated image being reduced 
     Rsco2039.table,parlab == a table file of detected sources (OPTIONAL) 

1) After the run of usno_look_wcs in zpstars, the following new local files will 
   exist (using the example from above): 
     Rsco2039.png       == a PNG image of the field with USNO sources labeled
     Rsco2039-usno.cdfp == a flotaing point coordinate file of the USNO sources. 

2) At this point the mido.sh routine has been run and your will see the following 
   new local files:
    ds9.reg,id.objects  = contain marker info read by mido.sh 
    Rsco2039.info = the "info" file that contains all of the image parameters 
                    for the source in "ds9.reg (and id.objects"). 

3) A lot of new file appear, but the most important are: 
    zp.table,parlab  = a table file that contains ZP values using USNO-B1.0 photometry. 
    Rsco2039.cdfp    = a cdfp file of the selected sources. 
    Rsco2039.rdxy    = a listing of Ra,Dec,equinox,X,Y of the selected sources 

One should not that after all of this, the most important file we obtain from zpstars are the "*.cdfp" and "*.rdxy" files. Different downstram codes (in photcal_fitslist) will use these, and they will be cataloged in the ./local_red/ZPTAB archive directory. The important point is that we now have Ra,Dec for sources measured in our image. Hence, we can cross-match to other photometric catalogs and derive ZP values for photometric systems other than USNO if we desire (and we usually do!).




Back to SCO code page