table_stats.sh
Updated: Apr 18, 2020

Compute statistics for the column of a table. If a valid name for a column holding the mean error is given, then weighted mean statistics are computed in addition to the unweighted values.


% table_stats.sh --help    
% table_stats.sh
Usage: table_stats.sh PS_gc1 ps pserr N 
arg1 - basename of table file      
arg2 - name of parameter for which statistics are to be gathered  
arg3 - name of error parameter (can be "none")  
arg4 - run in debug/verbose mode 

% table_stats.sh APER1 Mag30 none N  
     16.338852      18.981001      16.216742       2.227541     -99.000000      21.421000       53    (mean,median,sigma,m.e.,min,max,N)
 

This routine can be used to test if a table file, or a column in a table file, is present. The emaple below show the result if the table file (NOBE) or the coumn name (boo) fo not exist.


% table_stats.sh NOBE boo n n 
 nan  nan  nan  nan  nan  nan  0  (No data) 
 
Hence, you can search for the "nan" string or the zero number of entries to indicate that there is a problem reading this column.




Back to SCO CODES page