imgstat (Aug2004) |
rjtools
|
imgstat (Aug2004) |
imgstat
imgstat - return image statistics as task parameters
imgstat image [lower] [upper] [binwidth] [verbose]
- image = ""
- Name of image to compute image statistics for
- lower = INDEF
- Only consider pixels with values larger than 'lower'. All pixels are above
the default value.
- upper = INDEF
- Only consider pixels with values smaller than 'upper'. All pixels are below
the default value.
- binwidth = 0.1
- Bin width in units of the standard deviation of the histogram bins used for
computing the midpoint (median) and the mode.
- verbose = no
- Print the resulting statistics to the standard output (screen)?
- label = yes
- Label the output column headers when 'verbose = yes'?
- (npix) [int]
- Parameter returning the number of pixels in 'image' with values between
'lower' and 'upper' used to compute the image statistics
- (mean) [real]
- Parameter returning the average pixel value
- (midpt) [real]
- Parameter returning the midpoint, an estimate of the median pixel value
- (rmode) [real]
- Parameter returning an estimate of the modal pixel value
- (stddev) [real]
- Parameter returning the standard deviation if 'npix' > 1 and 0. otherwise.
- (min) [real]
- Parameter returning the minimum pixel value
- (max) [real]
- Parameter returning the maximum pixel value
- (sum) [real]
- Sum of all pixel values between 'lower' and 'upper'
Task based on 'imutil.imstatistics' to return image statistics of an image
as task parameters so that they may be accessed by other procedures. An
image extension and/or image section may be supplied as part of the image
name (see 'rpparse').
Pixels with values outside the range defined by 'lower' and 'upper' are not
considered in computing the statistics.
1. Get image statistics just like you would using 'imstatistics', but
formatted slightly differently:
rj> imgstat N3795B.fits lower=INDEF upper=INDEF verbose+
npix mean midpt mode stddev min max sum
262144 89.75290 88.58305 88.21986 27.80645 1.892487 3979.257 23528184.
while the equivalent 'imstatistics' command would produce:
rj> imstat N3795B.fits fields="npix,mean,midpt,mode,stddev,min,max" \
>>> lower=INDEF upper=INDEF
# NPIX MEAN MIDPT MODE STDDEV MIN MAX
262144 89.75 88.58 88.22 27.81 1.892 3979.
2. Check whether there are any saturated pixels in an image:
imgstat (cimg, lower=INDEF, upper=INDEF, verbose-)
if ( imgstat.max >= 32768. ) {
print ("WARNING: Some pixels in \""//cimg//"\" are saturated!")
}
imstatistics, iterstat, chkimg