welltestpy.data.Observation
- class Observation(name, observation, time=None, description='Observation')[source]
Bases:
objectClass for a observation.
This is a class for time-dependent observations. It has a name and a description.
- Parameters
- Attributes
Methods
__call__([observation, time])Call a variable.
reshape()Reshape observations to flat array.
save([path, name])Save an observation to file.
- __call__(observation=None, time=None)[source]
Call a variable.
Here you can set a new value or you can get the value of the variable.
- Parameters
observation (scalar,
numpy.ndarray,Variable, optional) – New Value for observation. Default:"None"time (scalar,
numpy.ndarray,Variable, optional) – New Value for time. Default:"None"
- Returns
or
numpy.ndarray–(time, observation)orobservation.
- save(path='', name=None)[source]
Save an observation to file.
This writes the observation to a csv file.
- Parameters
Notes
The file will get the suffix
".obs".
- property info
Get information about the observation.
Here you can display information about the observation.
- property observation
Observed values of the observation.
intorfloatornumpy.ndarray
- property state
String containing state of the observation.
Either
"steady"or"transient".- Type
- property time
Time values of the observation.
intorfloatornumpy.ndarray
- property value
Value of the Observation.
[
tupleof]intorfloatornumpy.ndarray