ISIS Application Documentation
stats | Printer Friendly View | TOC | Home |
Generates statistics about a cube
Overview | Parameters | Example 1 | Example 2 | Example 3 |
DescriptionThis 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 ComputationStats 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:
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. CategoriesRelated Applications to Previous Versions of ISISThis program replaces the following applications existing in previous versions of ISIS:
Related Objects and DocumentsApplicationsHistory
|
Parameter GroupsFiles
Settings
|
This specifies the input cube. The default is to calculate statistics for each band in the input cube, but this can be overridden using the band specifier (e.g., file.cub+3).
Type | cube |
---|---|
File Mode | input |
Filter | *.cub |
This text file will contain the statistics for each individual band. If it is written in PVL format (default), the values can be read using the getkey program. This is useful for developing scripts. If it is written as a comma delimited text file (FLAT) the output can be easily imported into spreadsheet applications like Excel.
Type | filename |
---|---|
File Mode | output |
Internal Default | No output file is created |
Filter | *.txt |
This is the format type for the output file. PVL format is the default. The format is ignored unless the TO parameter is specified.
Type | string | |||||||||
---|---|---|---|---|---|---|---|---|---|---|
Default | PVL | |||||||||
Option List: |
|
If this option is not selected, the output from the stats application is appended to the output file. If this option is set to "NO" or "FALSE," any information in the TO file is overwritten.
Note: This will append the formatted results to the end of the TO file without regard to the formatting of the current contents.
Type | boolean |
---|---|
Default | TRUE |
The statistics will exclude any DN values below this value.
Type | double |
---|---|
Internal Default | No minimum DN value |
The statistics will exclude any DN values above this value.
Type | double |
---|---|
Internal Default | No maximum DN value |
Example 1Calculate statistics for all bands in a cube Description
This example shows the statistics computed for all bands in
the input cube. When no band is specified by the user, stats
default behavior is to calculate statistics for all bands in a cube.
Command Line
stats
from=peaks.cub to=peaks0_stats.log
Command to run stats in the command line mode using all bands in
peaks.cub and output the results to peaks0_stats.log.
Data File
|
Example 2Calculate statistics for a single band from an input cube Description
This example shows the statistics computed from band 3 of the input
cube. A band may be specified by simply placing the plus sign and
the band number after the input filename.
Command Line
stats
from=peaks.cub+3 to=peaks1_stats.log
Command to run stats in the command line mode using the third band
of peaks.cub and output the results to peaks1_stats.log.
Data File
|
Example 3Calculate statistics for multiple bands from an input cube Description
This example shows the statistics computed for selected bands of a cube.
In addition to the plus suffix, the comma and hyphen are used to specify
multiple bands from the input cube to process.
Command Line
stats
from=peaks.cub+2,4-6 to=peaks2_stats.log
Command to run stats in the command line mode using the second, fourth,
fifth, and sixth bands of peaks.cub and output the results to
peaks2_stats.log.
Data File
|