pyhctsa.operations.correlation.translate_shape¶
-
pyhctsa.operations.correlation.translate_shape(y, shape=
'circle', d=2, how_to_move='pts', tau=1)¶ Statistics on datapoints inside geometric shapes across the time series.
This function moves a specified geometric shape (e.g., a circle or rectangle) of given size along the time axis of the input time series and computes statistics on the number of points falling within the shape at each position. This is a temporal-domain analogue of similar analyses in embedding spaces.
In the future, this approach could be extended to use soft boundaries, decaying force functions, or truncated shapes.
- Parameters:¶
- y : array-like¶
The input time series (1D array).
- shape : str, optional¶
The shape to move along the time series. Supported options: ‘circle’, ‘rectangle’. Default is ‘circle’.
- d : int, optional¶
- Parameter specifying the size of the shape (e.g., radius for ‘circle’,
half-width for ‘rectangle’). Default is 2.
- how_to_move : str, optional¶
Method for moving the shape. Currently, only
'pts'is supported, which places the shape on each point in the time series. Default is'pts'.- tau : int or str, optional¶
The unit of time, in samples: an integer, or a rule for
get_tau()(e.g.'ac1e'). The shape is placed on every pointtand covers the pointst + j tau(|j| <= floor(d)), withjas their time coordinate, which pools thetauphases of the series sampled everytausamples. Default 1. All outputs are NaN when a rule cannot set the delay or the series is too short for one placement.
- Returns:¶
Dictionary containing statistics on the number of points inside the shape as it moves through the time series, including mean, std, mode, and proportions for various counts.
- Return type:¶
dict