Piecewise Linear Timeseries¶
- class ionworks.data.piecewise_linear_timeseries.PiecewiseLinearTimeseries(t_data: ndarray, y_data: ndarray, name: str | None = None, options: dict[str, Any] | None = None)[source]¶
Bases:
objectA class to preprocess and linearize time series data using piecewise linear approximation.
Attributes:¶
- t_dataarray-like
The time data points.
- y_dataarray-like
The corresponding data points.
- atolfloat, optional
Absolute tolerance for the solver. If None, uses the default solver atol of 1e-6.
- rtolfloat, optional
Relative tolerance for the solver. If None, uses the default solver rtol of 1e-4.
- namestr, optional
The name of the timeseries. Default is “Piecewise linear timeseries”.
- optionsdict, optional
Additional options for preprocessing. If None, default options are used.
- losslessbool
Selects the variant built by
piecewise_linear_timeseries: True for the lossless (view) variant, False (default) for the compressed one.- interactive_preprocessingbool
Whether to use interactive preprocessing to select atol and rtol. Default is False.
- window_maxint
Maximum window size for removing neighboring points. Default is 10.