PyFoam.Basics.TimeLineCollection module¶
Collection of array of timelines
-
class
PyFoam.Basics.TimeLineCollection.
TimeLineCollection
(deflt=0.0, extendCopy=False, splitThres=None, splitFun=None, noEmptyTime=True, advancedSplit=False, preloadData=None, accumulation='first', registry=None)[source]¶ Bases:
object
-
__dict__
= mappingproxy({'getTimes': <function TimeLineCollection.getTimes>, '__init__': <function TimeLineCollection.__init__>, 'nr': <function TimeLineCollection.nr>, 'setAccumulator': <function TimeLineCollection.setAccumulator>, '__module__': 'PyFoam.Basics.TimeLineCollection', 'setDefault': <function TimeLineCollection.setDefault>, 'resetValid': <function TimeLineCollection.resetValid>, '__doc__': None, 'getValues': <function TimeLineCollection.getValues>, '__weakref__': <attribute '__weakref__' of 'TimeLineCollection' objects>, 'possibleAccumulations': ['first', 'last', 'min', 'max', 'average', 'sum', 'count'], 'setSplitting': <function TimeLineCollection.setSplitting>, 'setExtend': <function TimeLineCollection.setExtend>, 'nrValid': <function TimeLineCollection.nrValid>, 'getLatestData': <function TimeLineCollection.getLatestData>, 'getValueNames': <function TimeLineCollection.getValueNames>, 'addSlave': <function TimeLineCollection.addSlave>, 'split': <function TimeLineCollection.split>, 'setValue': <function TimeLineCollection.setValue>, '__dict__': <attribute '__dict__' of 'TimeLineCollection' objects>, 'getData': <function TimeLineCollection.getData>, 'setTime': <function TimeLineCollection.setTime>})¶
-
__init__
(deflt=0.0, extendCopy=False, splitThres=None, splitFun=None, noEmptyTime=True, advancedSplit=False, preloadData=None, accumulation='first', registry=None)[source]¶ 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”)
-
__module__
= 'PyFoam.Basics.TimeLineCollection'¶
-
__weakref__
¶ list of weak references to the object (if defined)
-
getValues
(name)[source]¶ Gets a timeline :param name: Name of the timeline :return: List with the values
-
possibleAccumulations
= ['first', 'last', 'min', 'max', 'average', 'sum', 'count']¶
-
resetValid
(val=False)[source]¶ Helper function that resets the information whether the last entry is valid
-
setAccumulator
(name, accu)[source]¶ Sets a special accumulator fopr a timeline :param name: Name of the timeline :param accu: Name of the accumulator
-
setExtend
(mode)[source]¶ Parameters: mode – whether or not to extend the timeline by copying or setting the default value
-
setSplitting
(splitThres=None, splitFun=None, advancedSplit=False, noEmptyTime=True)[source]¶ Sets the parameters for splitting
-
setTime
(time, noLock=False, forceAppend=False)[source]¶ Sets the time. If time is new all the timelines are extended :param time: the new current time :param noLock: do not acquire the lock that ensures consistent data transmission
-
-
class
PyFoam.Basics.TimeLineCollection.
TimeLinesRegistry
[source]¶ Bases:
object
Collects references to TimeLineCollection objects
-
__dict__
= mappingproxy({'__weakref__': <attribute '__weakref__' of 'TimeLinesRegistry' objects>, 'prepareForTransfer': <function TimeLinesRegistry.prepareForTransfer>, '__init__': <function TimeLinesRegistry.__init__>, '__doc__': 'Collects references to TimeLineCollection objects', '__module__': 'PyFoam.Basics.TimeLineCollection', 'resolveSlaves': <function TimeLinesRegistry.resolveSlaves>, '__dict__': <attribute '__dict__' of 'TimeLinesRegistry' objects>, 'add': <function TimeLinesRegistry.add>, 'get': <function TimeLinesRegistry.get>, 'clear': <function TimeLinesRegistry.clear>, 'nr': 1})¶
-
__module__
= 'PyFoam.Basics.TimeLineCollection'¶
-
__weakref__
¶ list of weak references to the object (if defined)
-
nr
= 1¶
-