ktk.TimeSeries.ui_sync#

TimeSeries.ui_sync(data_keys=[], ts2=None, data_keys2=[])[source]#

Synchronize one or two TimeSeries by shifting their time.

If this method is called on only one TimeSeries, an interactive interface asks the user to click on the time to set to zero.

If another TimeSeries is given, an interactive interface allows synchronizing both TimeSeries together.

Parameters
  • data_keys (str | list[str]) – Optional. The data keys to plot. If empty, all data is plotted.

  • ts2 (Optional[TimeSeries]) – Optional. A second TimeSeries to be synced to the first one. This TimeSeries is modified in place.

  • data_keys2 (str | list[str]) – Optional. The data keys from the second TimeSeries to plot. If empty, all data is plotted.

Returns

A copy of the TimeSeries after synchronization.

Return type

TimeSeries

Warning

This function, which has been introduced in 0.1, is still experimental and may change signature or behaviour in the future.

Notes

Matplotlib must be in interactive mode for this method to work.