continuous_timeseries.values_at_bounds#
Definition of ValuesAtBounds
This is a container that stores a series of values.
It is designed to be compatible with the
TimeAxis,
Timeseries
and TimeseriesDiscrete
classes.
The idea is that, for each time bound defined by a
TimeAxis,
it is unambiguous what value to use to use at that point in time.
As background, we considered only defining the values that apply within each time window (so you would carry around a values array that was one element shorter than your time bounds array). This was rejected because it only supports piecewise constant interpolation (at least trivially). For linear or higher order interpolation, you need to know the value at the end of the last time window for the values to be unambiguous over the entirety of each time window.
It is important to keep in mind that this container is very low-level.
As a result, it does not provide all the information required to do operations,
such as interpolation, integration and differentiation, unambiguosly.
For example, how to interpolate between the values.
That information has to come from other classes/information.
To see classes that do support these kind of operations,
see Timeseries and TimeseriesContinuous.
Classes:
| Name | Description |
|---|---|
ValuesAtBounds |
Container for values to be used at the bounds of each time window in a timeseries |
ValuesAtBounds #
Container for values to be used at the bounds of each time window in a timeseries
This is a low-level container. It generally won't be used directly.
Methods:
| Name | Description |
|---|---|
__str__ |
Get string representation of self |
values_validator |
Validate the received values |
Attributes:
| Name | Type | Description |
|---|---|---|
values |
PINT_NUMPY_ARRAY
|
Values |
Source code in src/continuous_timeseries/values_at_bounds.py
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 | |
values
class-attribute
instance-attribute
#
values: PINT_NUMPY_ARRAY = field()
Values
Must be one-dimensional.
values_validator #
values_validator(
attribute: Attribute[Any], value: PINT_NUMPY_ARRAY
) -> None
Validate the received values