Skip to content

temporian.EventSet.tick #

tick(
    interval: Duration, align: bool = True
) -> EventSetOrNode

Generates timestamps at regular intervals in the range of a guide EventSet.

Example with align
>>> a = tp.event_set(timestamps=[5, 9, 16])
>>> b = a.tick(interval=tp.duration.seconds(3), align=True)
>>> b
indexes: ...
        timestamps: [ 6. 9. 12. 15.]
...
Example without align
>>> a = tp.event_set(timestamps=[5, 9, 16])
>>> b = a.tick(interval=tp.duration.seconds(3), align=False)
>>> b
indexes: ...
        timestamps: [ 5. 8. 11. 14.]
...

Parameters:

Name Type Description Default
interval Duration

Tick interval.

required
align bool

If false, the first tick is generated at the first timestamp (similar to EventSet.begin()). If true (default), ticks are generated on timestamps that are multiple of interval.

True

Returns:

Type Description
EventSetOrNode

A feature-less EventSet with regular timestamps.