Lake Stats¶
Particula-beta Index / Particula Beta / Data / Lake Stats
Auto-generated documentation for particula_beta.data.lake_stats module.
average_std¶
Show source in lake_stats.py:11
Averages the data in each stream within a 'Lake' object.
If 'clone' is True, a new 'Lake' instance is created and the averaged data is stored there. If 'clone' is False, the original 'Lake' instance is modified. The averaged output also includes the standard deviation of the data.
Examples¶
# Example lake with two streams, each containing numerical data
lake_data = Lake({'stream1': [1, 2, 3], 'stream2': [4, 5, 6]})
# Average over a 60-second interval without creating a new lake.
averaged_lake = average_std(lake_data, 60, clone=False)
print(averaged_lake)
Lake({'stream1': [2], 'stream2': [5]})
Arguments¶
lake
- The lake data structure containing multiple streams.average_interval
- The interval over which to average the data. Default is 60.new_time_array
- A new array of time points at which to compute the averages.clone
- Indicates whether to modify the original lake or return a new one. Default is True.
Returns¶
Lake
- A lake instance with averaged data.
Signature¶
def average_std(
lake: Lake,
average_interval: Union[float, int] = 60,
new_time_array: Optional[NDArray[np.float64]] = None,
clone: bool = True,
) -> Lake: ...