NASA - Jet Propulsion Laboratory
    + View the NASA Portal
Search JPL
Jet Propulsion Laboratory Home Earth Solar System Stars & Galaxies Technology
Introduction Background Software Links


compute_statistics*


This routine computes the min, max, absolute deviation and first four order moment of a data set


Location in HEALPix directory tree: src/f90/mod/statistics.f90


FORMAT

call compute_statistics*( data ,stats [, badval] )


ARGUMENTS

name & dimensionality kind in/out description
       
data(:) SP/ DP IN data set
stats tstats OUT structure containing the statistics of the data. The respective fields (stats%field) are:
ntot I4B - total number of data points
nvalid I4B - number n of valid data points
mind, maxd DP - minimum and maximum valid data
average DP - average of valid points $m= \sum x / n$
absdev DP - absolute deviation $a= \sum\vert x-m\vert/n$
var DP - variance $\sigma^2 = \sum(x-m)^2/ (n-1)$
rms DP - standard deviation $\sigma$
skew DP - skewness factor $s = \sum(x-m)^3 / (n\sigma^3)$
kurt DP - kurtosis factor $k = \sum(x-m)^4 / (n\sigma^4) - 3$
       
badval (OPTIONAL) SP/ DP IN sentinel value given to bad data points. Data points with this value will be ignored during calculation of the statistics. If not set, all points will be considered. Do not set to 0!.


EXAMPLE:

use statistics, only: compute_statistics, print_statistics, tstats
type(tstats) :: stats
...
compute_statistics(map, stats)
print*,stats%average, stats%rms
print_statistics(stats)

Computes the statistics of map, prints its average and rms and prints the whole list of statistical measures.


RELATED ROUTINES

This section lists the routines related to compute_statistics*


median
routine to compute median of a data set

Eric Hivon 2010-06-18
Privacy / Copyright
FIRST GOV Contact: NASA Home Page Site Manager:
Webmaster:

CL 03-2650