stream module¶
Author: Valmor F. de Almeida dealmeidav@ornl.gov; vfda
Stream container
VFdALib support classes
Sat Aug 15 17:24:02 EDT 2015
-
class
stream.
Stream
(timeStamp, species=None, quantities=None, values=0.0)[source]¶ Bases:
object
-
GetActors
()[source]¶ Returns the actors present in the stream of data.
- Returns
list(self.stream.columns)
- Return type
-
GetQuantities
()[source]¶ Returns all the quantities given by the stream.
- Returns
self.quantities
- Return type
-
GetQuantity
(name)[source]¶ Returns the specified quantity called “name” from the stream, or none if the specified name does not exist.
-
GetRow
(timeStamp=None)[source]¶ Returns an entire row of data from the stream. A row of data is all the data in a dataframe at a specified time stamp, given by timeStamp. If timeStamp is not specified, this function will return the entire stream dataframe.
- Parameters
timeStamp (float) –
- Returns
self.stream.loc[self.timestamp, (]) or self.stream.loc[timeStamp, :]):)
list
-
GetSpecie
(name)[source]¶ Returns a specie named “name” from the stream.
- Parameters
name (str) –
- Returns
specie
- Return type
obj
-
GetValue
(actor, timeStamp=None)[source]¶ Returns the value associated with a specified “actor” at a specified “timeStamp”. If no timeStamp is specified, then the function will return all values associated with the specified actor at all time stamps.
-
SetValue
(actor, value=None, timeStamp=None)[source]¶ Sets the value associated with a specified actor at a specified timeStamp to “value”. If no value is specified, the value will default to 0.0. If no timeStamp is specified, it will set all values associated with actor to the specified value (or 0.0 if value = None).
-