APPLY_CALIB

STScI ACDSD MASTCASB Documentation

Products
GSC
DSS
GSPC
Science

Publications

Data Access
Related Science 
Missions
HST
GEMINI
VLT
NGST
Virtual Observatory
XMM
Facilities
Plate Scanning
COMPASS ooDB 
Staff Pages

Last Updated Jan 2001

Copyright © 2001 The Association of Universities for Research in Astronomy, Inc. All Rights Reserved.

Purpose :

Apply photometric, astrometric and/or classification calibrations to an oop file or to data in compass.
Last update 12/8/99. Except for the main program (and a few other minor programs) both the NT and VMS version are the same.
Note the file name needs to be specified without the extension and no slashes are used for the qualifiers.

Procedure :

This program can perform three types of calibrations: photometric, astrometric and classification. The default mode is to perform all three; first classification, followed by photometry and lastly astrometry. Using the qualifiers defined below, one can specify which calibrations are desired. Additionally, certain restriction can be placed on which types of objects to calibrate.
The qualifiers /ASTROMETRY, /PHOTOMETRY, /CLASSIFY (all present by default) are used to determine if a calibration is to be performed. (Note /noASTROMETRY, /noPHOTOMETRY and /noCLASSIFY are used if the corresponding calibration is not desired). The classification routine, updates the final class and sets the PROC_INFO_FLAG value for classification to the type used. The photometry calibration routine, fills in the oop.mag class (based on the PHOTO_HIERARCHY.TABLE) and updates the PROC_INFO_FLAG for the photometric method used. The astrometry calibration routine, fills in the oop.ra and oop.dec routine with the latest and greatest astrometric routine and updates the PROC_INFO_FLAG with the method used. An error algorthrim also fills in oop.ra_epsilon, oop.dec_epsilon, oop.mag_epsilon. At this time (8/18/99) the astrometric error algorthrim is based only on the sigma from the plate solution and ra_epilson=dec_epsilon for all the objects on the plate. The magnitude error algorthrim is a little more complex but used rough average values to determine the error based on location of sequence, type of object, extrapolation, ect..

Calibration Options

In the default mode the calibrations are done in the following order: classification, photometry, and astrometry.
The photometric calibration uses the classification to determine which type of photometric method to use (see photometric_hierarchy.table). If no classification is found then the default is to determine the magnitude using the Chebyshev polynomials. So lets take the case where only a photometric calibration is desired. The command line would look like: apply_calib region.oop /NoCLASSIFY /NoaASTROMETRY. If the final class is unclassified then you must realize that all the objects will be calibrated with the chebyshev polynomials in the GSH file. Alternately you could remove /Noclassapply or apply the classification calibration on the objects in the oop file in a separate run. However, all this really does not matter at this time because the only valid photometric method that exist is the chebyshev polynomials.
A similar situation exist for astrometry. The default mode is to apply an astrometric mask (if one exist). An astrometric mask exist for all the survyes expect the N, XO and IS surveys. In order to apply a mask use the qualifiers DOMASK. If a mask does not exist the you should apply the traditional third order polynomial using the gnomoic projection. The command line should look like this: filename norefraction projection=gn nodomask. The qualifier /MASKTABL refers to a table which specifics which mask to use for each survey. Check the GSP file for the default mask table.
The qualifiers that set restrictions on which objects are to be calibrated are: /XRANGE = (xmin, xmax), /YRANGE = (ymin, ymax), /MAGRANGE = (bright, faint), /TYPE_CLASS = (ALL_CLASS, STAR, NON_STAR, GALAXY, BLEND, DEFECT, UNSURE, UNCLASSIFIED).
The user MUST be extremely careful when using these restrictions. This is a very straight forward and simple program, if you are not running in default mode the calibration plan is left to the user. In the majority of the cases, the starting point is an UN-calibrated oop file (the final class is unclassified, there are not magnitudes nor positions). An oop record is read, the final_class field is filled in, followed by the magnitude, and then the position. The oop record is then written to the output file and the process is continued, until every oop record has been read.
The restriction qualifiers (/XRANGE, /YRANGE, /MAGRANGE, /TYPE_CLASS are used for all three types of calibrations. If you try and limit /TYPE_CLASS = star, but the final class field is not filled in yet, then the program will not let you continue. It will abort. The logical work and calibration plan is left to the user, this program is not forgiving and if NOT all the information is found in the oop file it will abort and give you a message. So if you are doing anything but the default mode, think before you type.
The recommended procedure is to run the program in default mode performing all three types of calibrations, then (if desired) run the program restricting the calibration to certain ranges.

ABORT FILES

If the program can not run for some reason an abort file will be created with the reason the plate failed. Some reasons for this occurring are the GSH file does not exist, important GSH header values are not in the GSH file, or tables can not be found.

CLASSIFICATION

The classification calibration uses the results from earlier run tasks (CLASSIFY) or hand edited fields. The FINAL_CLASS field is filled in or updated from the other class field types : 'hand_class', 'catalog_class', 'decision_tree_class', and 'bayesian_class' (see class_defs.inc). Each class type is given a rank (see class_hierarchy.table) and the value corresponding to chosen classified field is written to the FINAL_CLASS field. The PROC_INFO_FLAG field for classification recored the type of class used.

PHOTOMETRY

The photometric calibration uses the results (for the time being) from PHOTOSOL. The chebyshev polynomial coefficients (PMD) are read from the GSH file and used to convert the photometric parameter, integrated_density (or the parameter corresponding to the photometric coefficients, [Gaussian volume (PMDGV) not currently in use] to a magnitude in the bandpass of the plate. There is also the option to use the unshifted general function read in from the table or the shifted general function determined by photosol. Eventually other methods will also be used (D to I and Areal Profile) to determine the magnitudes. Each method works best over a certain range of magnitudes and class types. The photometric chebyshev polynomials are best suited for stars in the same magnitude range as the photometric reference stars used in the reduction which determined them (8th to 18th). For stars at the fainter end and for diffuse objects the D to I or areal Profile method is the preferred method. The hierarchy table (photometry_hierarchy.table) defines the photometric calibration method to use based on MAGNITUDE and CLASSIFICATION. The only method defined at this time the chebyshev polynomials.
The usual calibration method that an approximation to the magnitude is determined by the PMD coefficients. However there are a number of options one can select to vary the calibration over the entire photometric parameter space or in the extrapolated region.
  • Default mode is to use the PMD coefficients with the extrapolation mode read in from the GSH file.
  • Use Unshifted or shifted general function for the entire photometric range. In order to do this use the qualifiers /USEGENFUN. The qualifier /GENFUN holds the general function table to use. Its default value is in the GSP file. If the shifted general function found in the GSH file is desired then use /GENFUN = GSH.
  • If one wants to use the PMD coefficients only for where they are valid (up to valid point) and the shifted general function read in from the GSH header then use the qualifier /EXTRAP = GF.
  • Note that if an object falls brighter than the limits of the PMD coefficients (or the general function if it is being used) then the magnitude is set to 99.0 and the proc_info_flag for magnitude is set to no magnitude. If for any reason the magnitude is found to be less than zero the magnitude is again set to 99.0 with proc_info_flag = no magnitude. One other caveat is if the general function is being used and the object falls in the extrapolated region then the extrapolation mode is hard coded as Average.
  • Future additions to photometric calibation

    After the approximate magnitude from the above method (using PMD coefficients or general function) the photometric heirarchy table is searched for this magnitude range (and classification) to find the best photometric method to use. If a method other than chebyshev polynomials is found, then this method is used to find the final magnitude. Note at this time all magnitudes are determined using the PMD coefficients. The PROC_INFO_FLAG field corresponding to photometry is filled with the appropriate flag.

    ASTROMETRY

    The astrometric calibration uses the results from PLATE_SOLUTION to find the right ascension and declination of the objects. A mask can be applied to the data is the qualifier /DOMASK is used. If this quaulifer is used then a mask table controlled by the qualifier /Masktabl holds the mask to be used for each survey. The default for the mask table is found in the GSP file. Eventually the filter mask or magnitude dependent mask will be used. One needs to be careful on the mask used and the type of plate solution performed. For example whether to apply refraction and the projection used depends on what mask is used. In general this will be determined by com file or script and the user should not play with the values. The PROC_INFO_FLAG field corresponding to astrometry is filled with the appropriate flag.

    CAUTIONS and CAVEATS

    NOTE: the delete_flag (class type) is ignored in this task. Therefore objects with the delete flag set will still be processed, but the delete flag remains untouched.
    A slight confusion may rise because the PROC_INFO_FLAG for photometry (and astrometry) was redefined so that '0' corresponds to 'no magnitude' (or 'no position'). Therefore if previous tasks filled in the oop.mag, oop.ra, oop.dec but do not update the PROC_INFO_FLAG correctly then this program will assume that they do not exist. So a user might think they can use the /MAGRANGE qualifier because oop.mag is filled in, but if the PROC_INFO_FLAG for magnitudes is 0 or 'no magnitude' then the program will abort. The solution is to run the /PHOTOMETRY (without restrictions) and then run the task again using the desired magnitude range (/MAGRANGE).
    The plate model used in plate_solution can have magnitude and color dependent terms. Though we do not use them, we have kept them for generality (and for possible later experimentation.) Therefore it is possible to have non-zero magnitude and color dependent terms in the plate model. If this is the case, then when applying the plate solution, a color and magnitude will need to be given for each object. At this time we do not have color values for the objects and it is probably a mistake if a color is needed. The program checks if color and magnitudes are needed and and a warning message is printed. Also a temporary color value is hard coded at 99999.9 (the idea is that 0 can exist, but 99999.9 can not and if used incorrectly an error or high residual will hopefully result). If you do not like this 'fix' let me (J. Morrison) know, because I really do not either.

    OUTPUT FILES

    region_name.OOP (default)
    region_name.COP (if /COPY used)
    region_name.APPLY_CALIB.OUT (output stat file)
    region_name.DID (updates existing DID file)
    region_name_APPLY_CALIB.ABORT (created only if aborted program)
    region_name_APPLY_CALIB.anomaly (possible problems are reported to this file)

    Calling Sequence :

    Note a '/' is not used anymore.
    APPLY_CALIB filename REGION_PLATE_SCANNO
    [[no]CLASSIFY] Update the classification
    [[no]PHOTOMETRY] Do an photometric calibration
    [[no]ASTROMETRY] Do an astrometric calibration
    [xmin] minimum X value range of objects to calibrate
    [xmax] maximum X value range of objects to calibrate
    [ymin] minimum Y value range of objects to calibrate
    [ymax] maximum Y value range of objects to calibrate
    [bright] brightest object to calibrate
    [faint] faintest object to calibrate
    [TYPE_CLASS]
    [REFRACTION] {default} Apply the effects of refraction to the x,y values and use the coefficients where determined with refraction applied. If you do not want the effect of refraction applied use: NOREFRACTION.
    [PROJECTION = equidistant (gnomonic) {def=equidistant}] Projection to use in determining right ascension and declination. Also use the coefficients which used this projection from the GSH file.
    [DOMASK] {default} apply an astrometric mask. Use NODOMASK if no mask is desired.
    [MASKTABLE] Table containing the astrometric mask to use for the survey
    [SMOOTH] How much to smooth the mask (default in GSP file)
    [THOROUGH] Do a thorough search of all near by points in the mask
    [POSTOL (default in GSP file)] A position tolerance. If a previous position is different from the new position by this tolerance then write to the anomaly file
    [EXTRAP= TN, AV, NO,GF] Use this type of extrapolation method instead of the one read in from the GSH file and set by the task PHOTOSOL.
    [USEGENFU] use the general function to determine the magnitudes
    [GENFUN] if USEGENFU set then this is the general function table to use.
    [CTABLE= name of class hierarchy table {def=class_hierarchy.table]
    [PTABLE= name of photometric hierarchy table {def =photometric_hierarchy.table}]
    [PERROR] Photometric error constants table
    [PEXTRAP] Photometric error extrapolation table
    [CENERROR] Centroider error table
    [GSHWPATH] Location of gsh files
    [DIDWPATH] Location of did files
    [OUTPATH] Location of output files
    [PROBLEM] Location of anomaly files
    [TABWPATH] Location of various tables
    [COMMENT="String"] write to DID file
    [VERBOSE]
    [[no]ANNOTATE] write to DID file
    [[no]UPDATE] update GSH calibration keyword
    [FILTER_MASK] (astrometric filter mask) NOT IMPLEMENTED YET

    Availability :

    • GSSS AXP - yes
    • GSSS VAX - yes
    • PIXELS - no


    History/Author :

    • 1/98 Original Implementation - Jane Morrison


    Items to be added in the future :

  • Improve the position and magnitude errors
  • Add more photometric calibration methods
  • Add more astrometric calibration methods
  • Return to Pipeline Documentation