columnStatistics

Return to directory of Todd's CASA extensions

Compute basic statistics on one column of an ASCII file.

Usage:

au.columnStatistics(filename, column, startline=0, delimiter=None)
Inputs:
  • column: column number, starting at zero
  • startline: starting line, starting from zero
  • delimiter: the character(s) that separate columns (default is whitespace)
Returns: mean, median, min, max, std, MAD*.6745, 25%ile, 75%ile

Example:

CASA <2>: au.columnStatistics('random.both',startline=3,column=21)
Mean=18.780000, Median=17.000000, Min=10.000000, Max=62.000000, St.Dev=7.687106
MAD*0.6745=2.965159, 25%ile=16.000000, 75%ile=19.000000
  Out[2]:
(18.780000000000001,
 17.0,
 10.0,
 62.0,
 7.6871060874688082,
 2.9651593773165308,
 16.0,
 19.0)

-- ToddHunter - 2014-01-17
Topic revision: r1 - 2014-01-17, ToddHunter
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding NRAO Public Wiki? Send feedback