piglot.utils.response_transformer.AffineTransformResponse
- class AffineTransformResponse(x_scale: float = 1.0, x_offset: float = 0.0, y_scale: float = 1.0, y_offset: float = 0.0)[source]
Bases:
ResponseTransformerAffine transformation of a response transformer.
Methods
Transform the input data.
- __call__(x_old: ndarray, y_old: ndarray) Tuple[ndarray, ndarray]
Transform a response function.
Parameters
- x_oldnp.ndarray
Original time grid.
- y_oldnp.ndarray
Original values.
Returns
- Tuple[np.ndarray, np.ndarray]
Transformed time grid and values.
- transform(response: OutputResult) OutputResult[source]
Transform the input data.
Parameters
- responseOutputResult
Time and data points of the response.
Returns
- OutputResult
Transformed time and data points of the response.