USGS

Isis 2 Documentation


mocrange Documentation

mocrange - Apply range of MOC statistics to ISIS table file
mocrange is a program that allows the user to select a range of
MOC geometric statistics computed by "lev1stats" and put in an ISIS
binary table file by the "mocbtbl".  The user can provide a minimum
and maximum value in the RANGE parameter, respectively and mocrange
will create a new table that satisfy the range constraints.

"lev1stats" creates ten sets of four statistics from ISIS images.
These ten sets are:

        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

Each one of these characteristics has the minimum, maximum, average and
standard deviation computed for it.  Once these statistics are
generated, the "mocbtbl" application parses them and stores them to an
ISIS binary table file.   Each record in the file has forty 4-byte
floating point fields and the filename stored in them.  mocrange can
then be used to manipulate this table file by constraining any one of
the ten characteristics by confining then to a range of values.  A
stored statistic entry in the binary table file will fail the range
test if the stored minimum of the select characteristic is greater
than the maximum specified in the RANGE parameter or the stored maximum
is less than the specified minumum in the RANGE parameter.  If the
stored record satisfies this test, then it can also be eliminated
if the stored standard deviation is greater than STDMAX as an additional
constraint.  All records that pass are written to a new table file.

mocrange has a special statistic called "NONE".  This is provided
to convert an ISIS MOC binary table file from one architecture type
to another.  For this constraint, all records pass regardless of
the values provided in RANGE and STDMAX.  In fact, this is the only
value of STAT that does not require the user to enter values
for the RANGE parameter.  Note that this conversion is limited to
IEEE-compatable architectures and will not work on VAX floating
point.  It will always convert the input table to the architecture
of the system executing mocrange.  The output table file is always
written the the format of the running system.  See help on the
STAT parameter for additional information.

The output of this program can also be the input file.  This allows
multiple constraints to be applied to achieve a specific range of
several constaints.  For example, to get records that are only
in the longitude range of 180.0 to 270.0 degrees and a latitude of
30.0 to -30.0 degrees, mocrange would need to be run twice in the
following manner:

mocrange fromtbl=first.tbl totbl=second.tbl stat=longitude         range=(180.0,270.0)

mocrange fromtbl=second.tbl totbl=third.tbl stat=latitude         range=(-30.0,30.0)

STDMAX can be used to in any run to exclude any records that
the value you specify.

mocrange returns to the calling PDF the number of records that are
written out to the output table filein the NRECS parameter.  This can
be useful to determine if any records actually passed the constraints.
In this case, the output table file is not created.

See also lev1stats, mocbtbl, tbl2asc and asc2tbl.

PROGRAMMER: Kris Becker, USGS, Flagstaff, Arizona

ParmDescriptionDefault
TBLFROM
Name of input table file
NONE
TBLTO
Name of output table file
NONE
STAT
Specify which statistic to
constrain:
LATITUDE  - Latitude (Degrees)
LONGITUDE - Longitude (Degrees)
SAMPRES   - Sample Resolution
LINERES   - Line Resolution
AVERES    - Average Resolution
ASPECTRAT - Aspect Ratio
PHASE     - Phase Angle
INCIDENCE - Incidence Angle
EMISSION  - Emission Angle
NORAZ     - North Azimuth
NONE      - No statistic
"LONGITUDE"
RANGE
Specify MIN/MAX of desired
statistic, STAT
--
STDMAX
Maximum standard deviation
allowed in statistics
10.0
NRECS
Number of records that passed
the constraints
local0

ADDITIONAL NOTES:

ParmDescription
TBLFROM
Name an ISIS binary table file generated by mocbtbl or this
application.  The application can be run multiple times over
its own output to further contrain existing elements in the
table.

This binary table file can also originate from a system that
has a different IEEE architecture than the current one.  Use
the "NONE" STAT option to convert the file to the current
IEEE architecure.
TBLTO
Name of new table where all records that pass the
constraints are written.  If no records pass the
constraints, then this file is not
created.
STAT
This parameter selects which statistic to apply the RANGE
to.  The following values are valid:

LATITUDE  - Latitude (Degrees)
LONGITUDE - Longitude (Degrees)
SAMPRES   - Sample Resolution
LINERES   - Line Resolution
AVERES    - Average Resolution
ASPECTRAT - Aspect Ratio
PHASE     - Phase Angle
INCIDENCE - Incidence Angle
EMISSION  - Emission Angle
NORAZ     - North Azimuth
NONE      - No statistic

The "NONE" STAT option is special in that all records pass
regardless of the values provided in RANGE or STDMAX.  This
is specifically for conversion of one IEEE format to be
compatable with the current system.
RANGE
This parameter is for the range of minimum and maximum
values that select records from the input parameter.  The
minimum should be the first value (RANGE(1)) and the maximum
second (RANGE(2)).  If the stored maximum is less than
RANGE(1) or the stored minimum is greater than RANGE(2), the
record does not pass the constraint and is eliminated from
the output table file.

The order in which the values are provided by the caller is
of no consequence as mocrange reorders them so the smaller
of the two RANGEs is the first value, larger of the two is
the second so the above test is applied correctly.
STDMAX
This parameter is provided to further constrain the selected
statistic.  It has proven useful to eliminate suspicious
fields in the tables generated by lev1stats.  It can also be
used to eliminate records with large standard deviations
(duh).
NRECS
This is a return parameter that passes the number of records
that pass the constratins to the calling PDF.  This is
useful for testing for the condition where no records pass
the constraints.  When this condition occurs the output file
is not generated.

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