Package PyFoam :: Package Basics :: Module Data2DStatistics :: Class Data2DStatistics
[hide private]
[frames] | no frames]

Class Data2DStatistics

source code

object --+
         |
        Data2DStatistics

Oranize statistics about data in 2D-Tables and do basic calculations on it

Instance Methods [hide private]
 
__init__(self, metrics, compare=None, small=1e-10, noStrings=False, failureValue=None)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
_getLabels(self)
Return a tuple with the names of the rows and the columns.
source code
 
_makeEmptyTable(self)
Create an empty table to fill the data in
source code
 
_extractTable(self, name, data=None)
Extract data and fill it into a data-table
source code
 
names(self)
Valid data names
source code
 
compare(self)
Get a separate Data2DStatistics with the compare-data (if present)
source code
 
__getitem__(self, name) source code
 
func(self, func, val)
Evaluate a function on the data
source code
 
range(self)
Return a table with the ranges of the data
source code
 
relativeError(self)
Return a table with the relative error
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, metrics, compare=None, small=1e-10, noStrings=False, failureValue=None)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Parameters:
  • metrics - metrics of the data
  • compare - metrics of the comparsion with another data-set
  • small - the value that is considered to be close to 0
  • noStrings - only put numbers into the tables
  • failureValue - the value to use if an evaluation fails
Overrides: object.__init__

_getLabels(self)

source code 

Return a tuple with the names of the rows and the columns. Assumes that the names for the first data-set are valid for all

_extractTable(self, name, data=None)

source code 

Extract data and fill it into a data-table

Parameters:
  • name - name of the entry that should be got
  • data - the dataset. If unset then self.__metrics is used

func(self, func, val)

source code 

Evaluate a function on the data

Parameters:
  • func - either a callable function or a string that evaluates to a callable
  • val - name of the data value to use