<jupyter_start><jupyter_text>Match two motions<jupyter_code>import numpy as np
import eqsig
from eqsig import multiple
import matplotlib.pyplot as plt<jupyter_output><empty_output><jupyter_text>Define a time series<jupyter_code>time = np.linspace(0, 102, 10200)
acc = np.sin(time)
dt = 0.01<jupyter_output><empty_output><jupyter_text>Match same start<jupyter_code>cluster = multiple.Cluster([acc, acc + 0.3], dt=dt)
bf, sps = plt.subplots(nrows=2)
sps[0].plot(cluster.time, cluster.values_by_index(0), label="sig0")
sps[0].plot(cluster.time, cluster.values_by_index(1), ls='--', label="sig1")
cluster.same_start()
sps[1].plot(cluster.time, cluster.values_by_index(0), label="sig0 - same start")
sps[1].plot(cluster.time, cluster.values_by_index(1), ls='--', label="sig1 - same start")
sps[0].legend()
sps[1].legend()
plt.show()<jupyter_output><empty_output><jupyter_text>Match in the time domain<jupyter_code>cluster = multiple.Cluster([acc[:-6], acc[6:]], dt=dt)  # shift second motion by 0.06s
bf, sps = plt.subplots(nrows=2)
sps[0].plot(cluster.time, cluster.values_by_index(0), label="sig0")
sps[0].plot(cluster.time, cluster.values_by_index(1), ls='--', label="sig1")
cluster.time_match(verbose=0)
sps[1].plot(cluster.time, cluster.values_by_index(0), label="sig0 - time match")
sps[1].plot(cluster.time, cluster.values_by_index(1), ls='--', label="sig1 - time match")
sps[0].legend()
sps[1].legend()
plt.show()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.18049792531120332, 'fraction_numerical': 0.034578146611341634, 'mean_word_length': 7.877300613496932, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '548483', 'license': 'MIT', 'n_tokens_mistral': 595, 'n_tokens_neox': 572, 'n_words': 94, 'path': 'examples/example_match_signals.ipynb', 'repo_name': 'geosharma/eqsig', 'size': '1446'}