-
Notifications
You must be signed in to change notification settings - Fork 0
Description
If one want to generate transfer function between wave signal from calibration and response from floater test, it is not always that the two signals have the same t0. The time shift in the signal can be found by compering timeseries from a wave sensor which is included in the data for both wave cal. and floater test. by:
correlation = signal.correlate(wave_floater_test, wave_cal, mode="full")
lags = signal.correlation_lags(wave_floater_test.size, wave_cal.size, mode="full")
lag = lags[np.argmax(correlation)]
the lag can then be used to shift the signal so the correspond by for instance:
signal = np.roll(signal, lag, axis=None)
It would be nice to have a "red flag" when trying to fetch a signal that is out of sync with the wave cal. signal, and an opportunity to shift the signal when importing.