Getting Started Documentation Glish Learn More Programming Contact Us
Version 1.9 Build 1556
News FAQ
Search Home


next up previous contents index
Next: tablecomparer.checkcoldata - Function Up: tablecomparer - Tool Previous: tablecomparer - Constructor


tablecomparer.checkcolnames - Function



Package utility
Module table
Tool tablecomparer


Check column names


Synopsis
checkcolnames(checksubtables)


Description
Check column names to see if they are identical between the two tables. Note that all column names will be checked regardless of any column selection made previously with select().



Arguments

checksubtables   Check column names of subtables as well?
    Allowed: Boolean
    Default: T


Returns
T if the column names between the two tables are the same, F otherwise


Example
# create a tablecomparer tool, and specify you want a lot of output
- tc := tablecomparer('test.table','fiducial.table',verbose=2);
- tc.checkcolnames()
NORMAL: Column name test passed on table TABLE
Opening  CAL_DESC
NORMAL: successful readonly open of default-locked table
test.table/CAL_DESC: 12 columns, 1 rows
NORMAL: successful readonly open of default-locked table
fiducial.table/CAL_DESC: 12 columns, 1 rows
NORMAL: Column name test passed on table CAL_DESC
Opening  CAL_HISTORY
NORMAL: successful readonly open of default-locked table
test.table/CAL_HISTORY: 4 columns, 0 rows
NORMAL: successful readonly open of default-locked table
fiducial.table/CAL_HISTORY: 4 columns, 0 rows
NORMAL: Column name test passed on table CAL_HISTORY
T
Or, in the case where the test fails:
- t := tablecomparer('badtest.table','fiducial.table',verbose=2)
NORMAL: successful readonly open of default-locked table
badtest.table: 36 columns, 210 rows
NORMAL: successful readonly open of default-locked table
fiducial.table: 37 columns, 210 rows
- t.checkcolnames()                                              
SEVERE: Column name test failed on table TABLE
SEVERE: TEST TABLE COLS: TIME TIME_EXTRA_PREC INTERVAL ANTENNA1 FEED1
FIELD_ID ARRAY_ID OBSERVATION_ID SCAN_NUMBER PROCESSOR_ID STATE_ID
PHASE_ID PULSAR_BIN PULSAR_GATE_ID FREQ_GROUP FREQ_GROUP_NAME
FIELD_NAME FIELD_CODE SOURCE_NAME SOURCE_CODE CALIBRATION_GROUP
REF_ANT REF_FEED REF_RECEPTOR REF_FREQUENCY MEAS_FREQ_REF
REF_DIRECTION MEAS_DIR_REF CAL_DESC_ID CAL_HISTORY_ID
TOTAL_SOLUTION_OK TOTAL_FIT TOTAL_FIT_WEIGHT SOLUTION_OK FIT
FIT_WEIGHT
SEVERE: MODEL TABLE COLS: TIME TIME_EXTRA_PREC INTERVAL ANTENNA1 FEED1
FIELD_ID ARRAY_ID OBSERVATION_ID SCAN_NUMBER PROCESSOR_ID STATE_ID
PHASE_ID PULSAR_BIN PULSAR_GATE_ID FREQ_GROUP FREQ_GROUP_NAME
FIELD_NAME FIELD_CODE SOURCE_NAME SOURCE_CODE CALIBRATION_GROUP GAIN
REF_ANT REF_FEED REF_RECEPTOR REF_FREQUENCY MEAS_FREQ_REF
REF_DIRECTION MEAS_DIR_REF CAL_DESC_ID CAL_HISTORY_ID
TOTAL_SOLUTION_OK TOTAL_FIT TOTAL_FIT_WEIGHT SOLUTION_OK FIT
FIT_WEIGHT
Opening  CAL_DESC
NORMAL: successful readonly open of default-locked table
badtest.table/CAL_DESC: 12 columns, 1 rows
NORMAL: successful readonly open of default-locked table
fiducial.table/CAL_DESC: 12 columns, 1 rows
NORMAL: Column name test passed on table CAL_DESC
Opening  CAL_HISTORY
NORMAL: successful readonly open of default-locked table
badtest.table/CAL_HISTORY: 4 columns, 0 rows
NORMAL: successful readonly open of default-locked table
fiducial.table/CAL_HISTORY: 4 columns, 0 rows
NORMAL: Column name test passed on table CAL_HISTORY
F  

\vspace{.18in}
\hrule

 
   \subsubsection{tablecomparer.checkcolkeywordnames - Function\label{table:tablecomparer.checkcolkeywordnames.function}\index{table.tablecomparer.checkcolkeywordnames}\index{checkcolkeywordnames}}
   \subsectionM{tablecomparer.checkcolkeywordnames}{utility}{table}{tablecomparer}
   Compare column keyword names\\
   \flushleft\vspace{.20in}\textbf {Synopsis}\newline
   checkcolkeywordnames(checksubtables)
   
\flushleft\vspace{.20in}\textbf {Description}\newline
This function compares the keyword names of all columns not excluded
by the {\tt select()} function.  If all column keyword names match
between the two tables, it returns {\tt T}, if not, it returns {\tt F}.

\flushleft\vspace{.20in}\textbf {Arguments}\\
   \hfill \\
   \starthelptab
   \hline

   checksubtables & & \multicolumn{2}{p{3.36in}|}{Check column names of subtables as well?}\\
   & & Allowed: & Boolean\\
   & & Default: & T  \\ \hline
\end{tabular}
\flushleft\vspace{.20in}\textbf {Returns}\newline
   T if the tests pass, F otherwise\\
\flushleft\vspace{.20in}\textbf {Example}\newline
\begin{verbatim}
- tc := tablecomparer('test.table','fiducial.table',verbose=2)
NORMAL: successful readonly open of default-locked table test.table: 36 columns, 210 rows
NORMAL: successful readonly open of default-locked table fiducial.table: 37 columns, 210 rows
- tc.checkcolkeywordnames()                                       
NORMAL: Column keyword name test passed on table TABLE column TIME
NORMAL: Column keyword name test passed on table TABLE column TIME_EXTRA_PREC
NORMAL: Column keyword name test passed on table TABLE column INTERVAL
NORMAL: Column keyword name test passed on table TABLE column ANTENNA1
NORMAL: Column keyword name test passed on table TABLE column FEED1
NORMAL: Column keyword name test passed on table TABLE column FIELD_ID
NORMAL: Column keyword name test passed on table TABLE column ARRAY_ID
NORMAL: Column keyword name test passed on table TABLE column OBSERVATION_ID
NORMAL: Column keyword name test passed on table TABLE column SCAN_NUMBER
NORMAL: Column keyword name test passed on table TABLE column PROCESSOR_ID
NORMAL: Column keyword name test passed on table TABLE column STATE_ID
NORMAL: Column keyword name test passed on table TABLE column PHASE_ID
NORMAL: Column keyword name test passed on table TABLE column PULSAR_BIN
NORMAL: Column keyword name test passed on table TABLE column PULSAR_GATE_ID
NORMAL: Column keyword name test passed on table TABLE column FREQ_GROUP
NORMAL: Column keyword name test passed on table TABLE column FREQ_GROUP_NAME
NORMAL: Column keyword name test passed on table TABLE column FIELD_NAME
NORMAL: Column keyword name test passed on table TABLE column FIELD_CODE
NORMAL: Column keyword name test passed on table TABLE column SOURCE_NAME
NORMAL: Column keyword name test passed on table TABLE column SOURCE_CODE
NORMAL: Column keyword name test passed on table TABLE column CALIBRATION_GROUP
NORMAL: Column keyword name test passed on table TABLE column REF_ANT
NORMAL: Column keyword name test passed on table TABLE column REF_FEED
NORMAL: Column keyword name test passed on table TABLE column REF_RECEPTOR
NORMAL: Column keyword name test passed on table TABLE column REF_FREQUENCY
NORMAL: Column keyword name test passed on table TABLE column MEAS_FREQ_REF
NORMAL: Column keyword name test passed on table TABLE column REF_DIRECTION
NORMAL: Column keyword name test passed on table TABLE column MEAS_DIR_REF
NORMAL: Column keyword name test passed on table TABLE column CAL_DESC_ID
NORMAL: Column keyword name test passed on table TABLE column CAL_HISTORY_ID
NORMAL: Column keyword name test passed on table TABLE column TOTAL_SOLUTION_OK
NORMAL: Column keyword name test passed on table TABLE column TOTAL_FIT
NORMAL: Column keyword name test passed on table TABLE column TOTAL_FIT_WEIGHT
NORMAL: Column keyword name test passed on table TABLE column SOLUTION_OK
NORMAL: Column keyword name test passed on table TABLE column FIT
NORMAL: Column keyword name test passed on table TABLE column FIT_WEIGHT
NORMAL: successful readonly open of default-locked table test.table/CAL_DESC: 12 columns, 1 rows
NORMAL: successful readonly open of default-locked table fiducial.table/CAL_DESC: 12 columns, 1 rows
NORMAL: Column keyword name test passed on table CAL_DESC column NUM_SPW
NORMAL: Column keyword name test passed on table CAL_DESC column NUM_CHAN
NORMAL: Column keyword name test passed on table CAL_DESC column NUM_RECEPTORS
NORMAL: Column keyword name test passed on table CAL_DESC column N_JONES
NORMAL: Column keyword name test passed on table CAL_DESC column SPECTRAL_WINDOW_ID
NORMAL: Column keyword name test passed on table CAL_DESC column CHAN_FREQ
NORMAL: Column keyword name test passed on table CAL_DESC column MEAS_FREQ_REF
NORMAL: Column keyword name test passed on table CAL_DESC column CHAN_WIDTH
NORMAL: Column keyword name test passed on table CAL_DESC column CHAN_RANGE
NORMAL: Column keyword name test passed on table CAL_DESC column POLARIZATION_TYPE
NORMAL: Column keyword name test passed on table CAL_DESC column JONES_TYPE
NORMAL: Column keyword name test passed on table CAL_DESC column MS_NAME
NORMAL: successful readonly open of default-locked table test.table/CAL_HISTORY: 4 columns, 0 rows
NORMAL: successful readonly open of default-locked table fiducial.table/CAL_HISTORY: 4 columns, 0 rows
NORMAL: Column keyword name test passed on table CAL_HISTORY column CAL_PARMS
NORMAL: Column keyword name test passed on table CAL_HISTORY column CAL_TABLES
NORMAL: Column keyword name test passed on table CAL_HISTORY column CAL_SELECT
NORMAL: Column keyword name test passed on table CAL_HISTORY column CAL_NOTES
T





next up previous contents index
Next: tablecomparer.checkcoldata - Function Up: tablecomparer - Tool Previous: tablecomparer - Constructor   Contents   Index
Please send questions or comments about AIPS++ to aips2-request@nrao.edu.
Copyright © 1995-2000 Associated Universities Inc., Washington, D.C.

Return to AIPS++ Home Page
2006-10-15