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 appearing in italic are optional.


ARGUMENTS

name & dimensionality kind in/out description
       
data(:) SP/ DP IN data set {xi}
stats tstats OUT structure containing the statistics of the data. The respective fields (stats%field) are:
ntot I8B - total number of data points
nvalid I8B - number n of valid data points
mind, maxd DP - minimum and maximum valid data
average DP - average of valid points $m= \sum_i x_i / n$
absdev DP - absolute deviation $a= \sum_i\vert x_i-m\vert/n$
var DP - variance $\sigma^2 = \sum(x_i-m)^2/ (n-1)$
rms DP - standard deviation $\sigma$
skew DP - skewness factor $s = \sum(x_i-m)^3 / (n\sigma^3)$
kurt DP - kurtosis factor $k = \sum(x_i-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

Version 3.31, 2017-01-06