Документ взят из кэша поисковой машины. Адрес оригинального документа : http://www.stsci.edu/hst/observatory/crds/deliveries/compare_table_pro
Дата изменения: Unknown
Дата индексирования: Mon Apr 11 17:27:16 2016
Кодировка:

Поисковые слова: m 5
compare_table.pro
STScI Logo

Observatory Support
Management of Reference Data for Calibration, Tools, and Operations

compare_table.pro

The procedure compares two FITS reference files tables. It looks for missing elements in the table by checking differences in each row. The elements within one row of the new file are compared with the respective elements in the old file. The compared elements are limited to those specified in the COLUMNS parameter (which is necessary for this program to run). A difference is flagged when a combination of elements is not found in one of the compared files. The way in which this procedure determines the elements that form a combination is via the parameter COLUMNS. The parameter COLUMNS is an n-element array of strings with the names of the columns to compare within the table. The names can be given in lower or uppercase format and each should be given in quotations. When a combination is missing (in the new_file ;or in the old_file) the procedure will flag it in the standard output. If the parameter SAVEFILE is set to a value different than 0, then the output of this prcedure will be saved in a file called "compare_table.out". The user should provide a list of the columns to compare The order in which the COLUMN names is given does not matter. At the moment this procedure compares only one element per column (i.e. cannot handle arrays or more than 1 element ).

CALL_SEQUENCE: compare_table,file_new,file_old,COLUMNS=cols1[,SAVEFILE=save1]
where   file_new is the name of the new reference file
        file_old is the name of the old reference file against which we
                       want to compare file_new
        COLUMNS is an array of column names that should be considered in
         the check. The program acepts only single value rows (not arrays).
        SAVEFILE paramenter is set to a value different than zero to save
        the output of this procedure in a file called "compare_table.out". 
        The default is to send it to the standard output (i.e. value is 0).

The elements within one row of "new_file" are compared with the respective elements in "old_file". The compared elements are limited to those specified in the COLUMNS parameter (which is necessary for this program to run). A difference is flaged when o combination of elements is not found in one of the compared files. The way in which this procedure determines the elements that form a combination is via the parameter COLUMNS. The parameter in COLUMNS should be an n element string array with the names of the columns to compare.The order in which the COLUMN names is given does not matter. The names can be given in lower or uppercase format and each name should be given in quotations. When a combination is missing (in the new_file or in the old_file) the procedure will flag it in the standard output. If the parameter SAVEFILE is set to a value different than 0, then the output of this procedure will be saved in a file called "compare_table.out". At the moment this procedure compares only one element per column (i.e. cannot handle arrays or more than 1 element ).

The tool "compare_table.pro" and can be found in the Science Cluster in the STScI IDL area. For those that do not have it set up in their IDL PATH, these are in /data/garnet2/idl/stsci/

Example:

Compare the columns CCDCHIP, FILTER1, and FILTER2 elements in the binary fits tables my_new_file.fits and those in old_reference_file.fits. Send the output to a file.

idl>compare_table,'my_new_file.fits','old_reference_file.fits',$
COLUMNS=['ccdchip','filter1','filter2'],SAVEFILE=1