USGS

Isis 2 Documentation


mocbtbl Documentation

mocbtbl - Create table file of "lev1stats" output
"mocbtbl" is a program that augments the "lev1stats" application.  It
creates an ISIS binary table file of the output from "lev1stats".
It is designed to work on both forms of output generated by
"lev1stats".  "lev1stats" directs output to either a log file
(ISIS default "print.prt") or an ascii table file. Refer to
"lev1stats" for more details.  Either one of these output forms
are input to "moctbl" (FROM).

Note: Rename the "print.prt" output of lev1stats and enter the
new filename in FROM to avoid the conflict that "mocbtbl" will
also be accessing "print.prt" as an output log file (ISIS
standard). Another option is to run "mocbtbl" from a different
directory and specify a directory path in FROM with the
"lev1stats" output print.prt.  One last alternative is to set
the environment variable ISIS_LOG_FILE to redirect the output
log information of "mocbtbl" to another file/device.

"mocbtbl" expects a specific format of both files.  Should
"lev1stats" output be modified, "mocbtbl" will also have to be
modified to conform to those changes.

"mocbtbl" creates an ISIS binary table file with the filenname
provided in the "TBLTO" parameter.  "mocbtbl" can be run
multiple times, each time referring to the same output table file.
An initial run is required with TBLMODE=CREATE.  TBLMODE=UPDATE
can be set in the following runs.  "UPDATE" mode will add new
"lev1stats" records to the existing table file.

"mocbtbl" generates upto 41 fields based on the output of
"lev1stats".  Forty of these fields are 4-element sets of
statistics consisting of minimum, maximum, average and standard
deviation of ten distinct geometric characteristics of each
ISIS cube fed to "lev1stats".  The ten characteristics are
as follows:

        Latitude
        Longitude
        Sample Resolution (KM)
        Line Resolution (KM)
        Average Resolution (KM)
        Aspect Ratio (Line/Sample Resolution)
        Phase Angle
        Incidence Angle
        Emission Angle
        North Azimuth Angle

The North Azimuth Angle is the clock-wise angle from an imaginary
three o'clock axis with the origin at the center of the pixel.
The last field is the name of the file for which the statistics is
generated for.  Refer to "lev1stats"-help for more details.

Each binary field has a field-name that is associated with it.
Below is a complete list of all the names of the fields (in order)
and a brief description:


Field Name   Type        Format  Size  Description
----------   ---------   ------  ----  --------------------------------
FILENAME     CHARACTER   A60     60    Name of ISIS cube file
LATMIN       REAL        F10.6    4    Latitude minimum
LATMAX       REAL        F10.6    4    Latitude maximum
LATAVG       REAL        F10.6    4    Average latitude
LATSTD       REAL        F10.6    4    Latitude standard deviation
LONGMIN      REAL        F10.6    4    Longitude minimum
LONGMAX      REAL        F10.6    4    Longitude maximum
LONGAVG      REAL        F10.6    4    Average Longitude
LONGSTD      REAL        F10.6    4    Longitude standard deviation
SRESMIN      REAL        F10.6    4    Sample Resolution minimum
SRESMAX      REAL        F10.6    4    Sample Resolution maximum
SRESAVG      REAL        F10.6    4    Average Sample Resolution
SRESSTD      REAL        F10.6    4    Sample Resolution standard
                                         deviation
LRESMIN      REAL        F10.6    4    Line Resolution minimum
LRESMAX      REAL        F10.6    4    Line Resolution maximum
LRESAVG      REAL        F10.6    4    Average Line Resolution
LRESSTD      REAL        F10.6    4    Line Resolution standard
                                         deviation
AVRESMIN     REAL        F10.6    4    Average Resolution minimum
AVRESMAX     REAL        F10.6    4    Average Resolution maximum
AVRESAVG     REAL        F10.6    4    Average of Average Resolution
AVRESSTD     REAL        F10.6    4    Average Resolution standard
                                         deviation
ASPCTMIN     REAL        F10.6    4    Aspect Ratio minimum
ASPCTMAX     REAL        F10.6    4    Aspect Ratio maximum
ASPCTAVG     REAL        F10.6    4    Average Aspect Ratio
ASPCTSTD     REAL        F10.6    4    Aspect Ratio standard deviation
PHASEMIN     REAL        F10.6    4    Phase Angle minimim
PHASEMAX     REAL        F10.6    4    Phase Angle maximim
PHASEAVG     REAL        F10.6    4    Phase Angle Longitude
PHASESTD     REAL        F10.6    4    Phase Angle standard deviation
INCIDMIN     REAL        F10.6    4    Incidence Angle minimum
INCIDMAX     REAL        F10.6    4    Incidence Angle maximum
INCIDAVG     REAL        F10.6    4    Average Incidence Angle
INCIDSTD     REAL        F10.6    4    Incidence Angle standard
                                         deviation
EMISMIN      REAL        F10.6    4    Emission Angle minimum
EMISMAX      REAL        F10.6    4    Emission Angle maximum
EMISAVG      REAL        F10.6    4    Average Emission Angle
EMISSTD      REAL        F10.6    4    Emission Angle standard deviation
NORAZMIN     REAL        F10.6    4    North Azimuth minimum
NORAZMAX     REAL        F10.6    4    North Azimuth maximum
NORAZAVG     REAL        F10.6    4    Average North Azimuth
NORAZSTD     REAL        F10.6    4    North Azimuth standard deviation


The ISIS application, "tbl2asc", can be used to generate an ASCII
listing of any or all of these fields (basically converting the
binary table file to ascii format).  Note that the filename is the
first field in the table and it is limited to 60 characters.  Because
of the nature of ISIS binary table files, some limit must be chosen.
Should the actual filename be longer than 60 characters, "mocbtbl" will
store the last 60 characters as opposed to the first 60 characters.
This is to ensure uniqueness in the filenames as they are stored
in the table file.

One very important feature of "mocbtbl" is that it detects entries
of the same file and replaces them with the last occuring record.
For example, if you were to run the same input file twice through
"lev1stats" to the same output table file or print.prt file that
contains that filename in it, "mocbtbl" would replace the first
occurance with the incoming record, thus ensuring updated output
records.  One possible drawback the common redundancy in input
filenames from different datasets.  Including entire pathnames in
"lev1stats"  parameters FROM and FROMLIST contents could help
define a uniqueness between the filenames included in the
output files.

An error file is created, if specified by the TOERR parameter, for
files that did not run successfully through "lev1stats".
See also lev1stats, moctrng, tbl2asc and asc2tbl.

PROGRAMMER: Kris Becker, USGS, Flagstaff, Arizona

ParmDescriptionDefault
FROM
Input filename
 (One of the output
  files of "lev1stats")
NONE
TBLTO
Name of output binary
table file
--
TBLMODE
CREATE - Create a new tbl file
UPDATE - Update an existing
         tbl file
NONE
TOERR
Error list file
--

ADDITIONAL NOTES:

ParmDescription
FROM
This parameter specifies the name of the output file
containing the statistics report of "lev1stats".   If
lev1stats is run on a single file given to the "FROM"
parameter, it reports the output to the print file, usually
"print.prt".  If provided, a list of ISIS cube files in the
"FROMLIST" parameter, it directs all output to the file
specified by the "TO" parameter.  "mocbtbl" can be given
either file for input.  Keep in mind the possible
conflict of using "print.prt" as input.  It is recommended
to rename the file before entering it into mocbtbl-FROM.
TBLTO
This parameter specifies the name of the output binary
ISIS table file where the records for each input file
will be written.  If TBLMODE="UPDATE", the table file
must already exist.  If TBLMODE="CREATE", the table file
cannot exist (unless the ISIS_FILE_OVEWRITE
environment variable is set to TRUE).
TBLMODE
This parameter allows the user to either create a new
(TBLMODE="CREATE") output table file named by the "TBLTO"
parameter or update (TBLMODE="UPDATE") an exiting one
with the contents of the file provided in the "FROM"
parameter.

In update mode, redundant records, determined by file
name uniqueness, are removed and the last occuring one
is retained.
TOERR
This parameter allows the user to create an error file.
It identides the filenames that where unsuccessful runs
of "lev1stats".  This is only applicable when the print
(print.prt) file is specified as input (FROM).  The
ouput ascii table file from "lev1stats" contains only
the successful filenames.

This is an option parameter and no file is generated
when not provided.

Last updated: Jan 31 2005
File: pdfs2.html

Contact us online at the Isis Support Center: http://isisdist.wr.usgs.gov

ISIS Documentation Home Page