This program computes a set of statistics for the pixels in each selected band
of an image cube, and outputs the results of each band. By default, all bands are
processed. The stats program generates statistics that will help you find new insights
in your data to make more accurate predictions and achieve better outcomes.
Histogram Computation
Stats uses a histogram to compute the mode and median DN values for a given cube.
The minimum, maximum, and number of bins depends on the pixel type of the cube. Here are the minimum, maximum,
and number of bins associated with supported pixel types:
Pixel Type |
Minimum |
Maximum |
Number of Bins |
Unsigned Byte |
0 * cube multiplier + base |
255 * cube multiplier + base |
256 |
Unsigned Word |
0 * cube multiplier + base |
65535 * cube multiplier + base |
65536 |
Signed Word |
-32768.0 * cube multiplier + base |
32767.0 * cube multiplier + base |
65536 |
Unsigned Integer |
Minimum DN value in the cube |
Maximum DN value in the cube |
65536 |
Signed Integer |
Minimum DN value in the cube |
Maximum DN value in the cube |
65536 |
Real |
Minimum DN value in the cube |
Maximum DN value in the cube |
65536 |
The cube multiplier and base can be found in the header of the cube.
Output:
The statistics are output to both the screen and the print.prt file in PVL format. Additionally,
if the user specifies a file using the TO parameter, the statistics are written to that file in
PVL format (default) or as a comma delimited text file (FLAT file), as specified by the FORMAT parameter.
For multi-band images, each band has its own statistics information that will be appended to the
output file. The contents of the PVL file can be read using the getkey program. The
comma delimited text file can be imported into Excel or other applications. The statistics
calculated and reported are as follows:
Average Total pixels
Standard deviation Valid pixels
Variance Over valid maximum pixels
Median Under valid minimum pixels
Mode Null pixels
Skew Low representation saturation (LRS) pixels
Minimum High representation saturation (HRS) pixels
Maximum Low instrument saturation (LIS) pixels
Sum High instrument saturation (HIS) pixels
If the output file exists and the APPEND parameter is set to "no," the contents will be
overwritten.
How to Specify Bands:
You may process one or a few specific bands if you indicate the band(s) in which you desire
to gather statistics. A band may be specified by simply placing a
plus sign and the band number after the input filename (e.g., peaks.cub+3). For several
bands, commas and hyphens are used to communicate effectively with the program as in the
following example: peaks.cub+2,4-6.
This program replaces the following
applications
existing in previous versions of ISIS:
Jeff Anderson | 2002-06-17 |
Original version written as "histo"
|
Stuart Sides | 2002-07-24 |
Changed name to "stats" and added logging mechanism
|
Jeff Anderson | 2002-12-30 |
Added TO parameter which allows the user to create an output file that can
be read using the getkey program
|
Jeff Anderson | 2002-12-30 |
Tested for bands which contain only special pixels in order to prevent
divide by zero errors.
|
Jeff Anderson | 2002-12-31 |
Added the name of the input cube to the log and label file
|
Kim Sides | 2003-05-13 |
Added application test
|
Stuart Sides | 2003-05-16 |
Modified schema location from astrogeology... to isis.astrogeology..."
|
Stuart Sides | 2003-05-30 |
Made changes to application test truth files to reflect -O1 optimization
|
Stuart Sides | 2003-05-30 |
Added modifications to apptest by Kim
|
Stuart Sides | 2003-07-29 |
Modified filename parameters to be cube parameters where necessary
|
Stuart Sides | 2003-11-07 |
Modified results pvl to not include the results group
|
Jacob Danton | 2006-01-23 |
Fixed appTest to comply to changes in iString
|
Steven Lambright | 2008-05-06 |
Added Above Range, Below Range reports
|
Steven Lambright | 2008-05-13 |
Removed references to CubeInfo
|
Steven Lambright | 2008-08-15 |
A bug where the VALIDMIN,VALIDMAX were ignored was fixed;
these should always be used.
|
Stacy Alley | 2009-01-16 |
Added the Format option for the output file.
|
Sharmila Prasad | 2011-03-31 |
Added Band Keyword - displays the first physical band used to get the
stats
|
James Alexander Crough | 2011-06-17 |
Changed the behavior of the program to process all bands of a cube, or,
if an input cube attribute is specified, only those bands will be
processed. Previously, the program only processed the first band.
|
Kimberly Oyama | 2013-11-12 |
Fixed spelling error in FORMAT=FLAT brief. Documentation updated
and reviewed. Fixes #1681.
|
Jeffrey Covington | 2015-02-19 |
Updated documentation of FORMAT and APPEND parameters as well as
general edits for clarity. Also added undocumented output statistics
to the list in the description.
|
Austin Sanders | 2020-06-04 |
Updated to fill columns with N/A in cases where images contained only
special or invalid pixels.
|