||Synchrony - Accelerometer Signal|
OpenSignals software allows to acquire signals from multiple devices at the same time and using the synchronisation cable, available in https://store.plux.info/cables/231-synchronization-cable.html , the signals are automatically sinchronised in real time.
However, there might be cases in which it is not possible to use the synchronisation cable and the acquired signals may be dephased. In some cases, it might be helpful to synchronise the signals in order to compare them in the time domain. This can be achieved after acquisition by using the </span> biosignalsnotebooks Python package.
The low-level explanation of synchronisation techniques is available in the Device Synchronisation - Cable, Light and Sound Approaches notebook.
In this Jupyter Notebook we will show how you can use the accelerometer sensor to synchronise all of your signals acquired with different devices.
1 - Import the required packagesIn order to have access to all functionalities of </span> biosignalsnotebooks Python package, we have to import it.
# Import biosignalsnotebooks package import biosignalsnotebooks as bsnb
2 - Open the files to see the signalsIn this case, two accelerometer signals were acquired at the same time but dephased, because the acquisitions did not start at the same instant. In order to use this type of signals to synchronise data, it is suggested to produce a distinctive event where it can be visually possible to perceive the instant of synchronisation. Accelerometers acquire three-dimensional data on the x, y and z axis.
path = '../../signal_samples/' file_name_1 = path + 'sync_acc_1.txt' file_name_2 = path + 'sync_acc_2.txt' file_1 = bsnb.load(file_name_1) file_2 = bsnb.load(file_name_2)
import numpy as np bsnb.plot([np.arange(len(file_1['CH3'])), np.arange(len(file_2['CH3']))], [file_1['CH3'], file_2['CH3']])