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

Class TimeLineCollection

source code

object --+
         |
        TimeLineCollection

Instance Methods [hide private]
 
__init__(self, deflt=0., extendCopy=False, splitThres=None, splitFun=None, noEmptyTime=True, advancedSplit=False, preloadData=None, accumulation="first", registry=None)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
resetValid(self, val=False)
Helper function that resets the information whether the last entry is valid
source code
 
nrValid(self)
Helper function that gets the number of valid values
source code
 
addSlave(self, slave)
Adds a slave time-line-collection
source code
 
setAccumulator(self, name, accu)
Sets a special accumulator fopr a timeline
source code
 
setSplitting(self, splitThres=None, splitFun=None, advancedSplit=False, noEmptyTime=True)
Sets the parameters for splitting
source code
 
setDefault(self, deflt) source code
 
setExtend(self, mode) source code
 
nr(self)
Number of elements in timelines
source code
 
setTime(self, time, noLock=False, forceAppend=False)
Sets the time.
source code
 
split(self, array, func)
Makes the array smaller by joining every two points
source code
 
getTimes(self, name=None)
Returns: A list of the time values
source code
 
getValueNames(self)
Returns: A list with the names of the safed values
source code
 
getValues(self, name)
Gets a timeline
source code
 
setValue(self, name, value)
Sets the value of the last element in a timeline
source code

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

Class Variables [hide private]
  possibleAccumulations = ["first", "last", "min", "max", "avera...
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, deflt=0., extendCopy=False, splitThres=None, splitFun=None, noEmptyTime=True, advancedSplit=False, preloadData=None, accumulation="first", registry=None)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Parameters:
  • deflt - default value for timelines if none has been defined before
  • extendCopy - Extends the timeline by cpying the last element
  • splitThres - Threshold after which the number of points is halved
  • splitFun - Function that is used for halving. If none is specified the mean function is used
  • noEmptyTime - if there is no valid entry no data is stored for this time
  • advancedSplit - Use another split algorithm than one that condenses two values into one
  • preloadData - a dictionary with a dictionary to initialize the values
  • accumulation - if more than one value is given at any time-step, how to accumulate them (possible values: "first", "last", "min", "max", "average", "sum","count")
Overrides: object.__init__

setAccumulator(self, name, accu)

source code 

Sets a special accumulator fopr a timeline

Parameters:
  • name - Name of the timeline
  • accu - Name of the accumulator

setDefault(self, deflt)

source code 
Parameters:
  • deflt - default value to be used

setExtend(self, mode)

source code 
Parameters:
  • mode - whether or not to extend the timeline by copying or setting the default value

setTime(self, time, noLock=False, forceAppend=False)

source code 

Sets the time. If time is new all the timelines are extended

Parameters:
  • time - the new current time
  • noLock - do not acquire the lock that ensures consistent data transmission

split(self, array, func)

source code 

Makes the array smaller by joining every two points

Parameters:
  • array - the field to split
  • func - The function to use for joining two points

getTimes(self, name=None)

source code 
Returns:
A list of the time values

getValueNames(self)

source code 
Returns:
A list with the names of the safed values

getValues(self, name)

source code 

Gets a timeline

Parameters:
  • name - Name of the timeline
Returns:
List with the values

setValue(self, name, value)

source code 

Sets the value of the last element in a timeline

Parameters:
  • name - name of the timeline
  • value - the last element

Class Variable Details [hide private]

possibleAccumulations

Value:
["first", "last", "min", "max", "average", "sum", "count"]