Isis 2 Documentation
avg_sd - Compute the average and/or standard deviation of a cube The "avg_sd" program will compute the average and/or standard deviation for an input cube. The OPTION parameter determines which path the program will take. If OPTION=AVG, the average will be calculated. If OPTION=SD, the standard deviation will be calculated and if OPTION=BOTH, both will be calculated. A subarea can be defined with the SFROM parameter. An optional filename may be used to output the average, the standard deviation, the number of valid pixels, the sum of the valid pixels, the number of invalid pixels, the number of NULL pixels, the number of high instrument saturation (HIS) pixels, the number of low instrument saturation (LIS) pixels, the number of high representation saturation pixels (HRS), the number of low representation saruration (LRS) pixels, the minimum pixel value found and the maximum pixel value found. Use the OUTFIL parameter to specify an optional output file for the statistics values. The default (NULL) value will list these values to the session log file. If OUTFIL is not blank, the values will be listed to the file and not listed in the session log file. You may also call this routine from a PDF procedure and have the output values returned to the procedure to be used in further processing. If you would like to compute the average and/or standard deviation for any or all backplanes set the BPLANES parameter to "YES". The BPNAMES parameter contains a list of the backplane names of the backplanes you wish to compute the average and/or standard deviaton for. If you wish to compute the average and/or standard deviation for all the backplanes in the input file, you need to set BPLANES to "YES" and leave the BPNAMES parameter as the NULL value. PROGRAMMER: James Anderson, U.S.G.S., Flagstaff, AZ
Parm | Description | Default |
---|---|---|
FROM | Input cube file name (default extension is .cub) | NONE |
SFROM | Input subcube specifier | -- |
OUTFIL | Optional output file | -- |
OPTION | Program options (BOTH, AVG, or SD) | "BOTH" |
CORE | Compute avg/sd for core (YES or NO) | "YES" |
BPLANES | Compute avg/sd for backplanes (YES or NO) | "NO" |
BPNAMES | Backplanes names to use | -- |
USERNOTE | User comment The remaining parameters are output only | " " |
AVG | Average of the valid pixels | LOCAL1 |
SD | Standard deviation of the valid pixels | LOCAL2 |
NVPIXS | Number of valid pixels | LOCAL3 |
NIVPIXS | Number of invalid pixels | LOCAL5 |
NULPIXS | Number of NULL pixels | LOCAL6 |
HRSPIXS | Number of high representation saturation pixels | LOCAL7 |
LRSPIXS | Number of low representation saturation pixels | LOCAL8 |
HISPIXS | Number of high instrument saturation pixels | LOCAL9 |
LISPIXS | Number of low instrument saturation pixels | LOCAL10 |
MINPIX | Minimum valid pixel value | LOCAL11 |
MAXPIX | Maximum valid pixel value |
ADDITIONAL NOTES:
Parm | Description |
---|---|
FROM | Input cube file name. If the file extension is omitted, then ".cub" will be assumed. |
SFROM | SFROM specifies the subcube using a single string for all three dimensions of the cube. The order of the three dimensions is always "samples:lines:bands". If a dimension is left blank, all the data for that dimension is selected. The default value of NULL for SFROM selects the entire cube. Any application below can be used for any dimension. To select specific data from any dimension: "10-100(3):11,12,15-20:1-10(2)" = This example will select every third sample starting with sample 10 thru 100. It selects lines 11 and 12, and 15-20. It selects every other band, starting with band 1 thru 10. There are special characters that can be used for selecting a subcube efficiently, such as "*","#", and "~". For examples type "help sfrom" in TAE. **NOTE** For more examples and explanation of the many features of the SFROM parameter, tutor the sfrom.pdf or refer to Introduction To ISIS, Section 6, of the ISIS User's Manual ** |
OUTFIL | Filename of an optional file to write the output values from the program to. The default (null value) will list the values to the session log file. If OUTFIL is not NULL, the program will list the values to the file named in OUTFIL and not list the values to the session log file. Note that this information is APPENDED to the output file if it exists, otherwise it will be created. |
OPTION | Determines what option the program will take. "BOTH" will report both the average and standard deviation for the cube. "AVG" will report only the averge for the cube and "SD" will report only the standard deviation for the cube. |
CORE | If "YES", the program will compute the average and/or standard deviation for the core planes. If "NO", the program will compute the average and/or standard deviation for the backplanes of the input file only. |
BPLANES | If "YES", the program will compute the average and/or standard deviation for the backplanes named in the BPNAMES parameter. If "NO", the program will compute the average and/or standard deviation for the core of the input file only. |
BPNAMES | A list of the backplane names to compute the average and/or standard deviation for. If this paramter is left as the NULL parameter and BPLANES is set to "YES", the program will use all the backplanes in the input file. This parameter is ignored when BPLANES = "NO". |
USERNOTE | Comment from the user. This will be recorded in the ISIS session log file and also in the History entry that is put into the History object of the output file. |
AVG | The average of the valid pixels found in the input file. |
SD | The standard deviation of the valid pixels found in the input file. |
NVPIXS | The number of valid pixels found in the input file. |
NIVPIXS | The total number of invalid pixels found in the input file. The totals for each type of invalid pixels are found below. |
NULPIXS | The number of NULL pixels found in the input file. |
HRSPIXS | The number of high representation saturation pixels found in the input file. |
LRSPIXS | The number of low representation saturation pixels found in the input file. |
HISPIXS | The number of high instrument saturation pixels found in the input file. |
LISPIXS | The number of low instrument saturation pixels found in the input file. |
MINPIX | The minimum valid pixel value found in the input file. |
MAXPIX | The maximum valid pixel value found in the input file. |
Contact us online at the Isis Support Center: http://isisdist.wr.usgs.gov