Two SAGA amplifiers can be synchronized to record up to 128 channels via a hardware or software solution.
It is possible to synchronize two SAGAs using the SAGA synchronization module. This module is connected to the first AUX channels of the individual SAGAs. After connecting the SAGAs, the module can send out synchronization signals (10Hz, sinusoidal) that are recorded on both SAGAs. Synchronization software will use these synchronization signals to convert the time base of one SAGA to the time base of the other SAGA, by correcting for mutual phase.
In the whitepaper "Synchronization of multiple SAGA systems" (coming soon) this concept is explained in more detail. If you are interested to know more about the synchronization module, please contact email@example.com.
Considerations when using the synchronization module
When using the synchronization module, please follow the following steps:
- Configure the SAGAs for the measurement. Make sure the two SAGAs have the same sample rates. Moreover, AUX 1-1 and AUX 1-2 should be enabled.
- Perform the impedance check.
- Only after performing the impedance check, connect the synchronization module to both SAGAs to AUX input 1.
- Start the recording.
- Only after starting the recording, turn on the synchronization module by pressing the green button for one second.
- When the recording is done, please first turn off the synchronization module by pressing the green button for five seconds (green light should turn off). Next, select 'stop recording'.
- Read the data into the TMSi Python Interface and run the synchronization software example 'example_synchronize_xdf.py'.
It is also possible to use a software solution to synchronize two SAGAs with the lab streaming layer (LSL) system. LSL is a separate program/library used to record data from multiple streams. In our TMSi Python interface, we included an example script that shows how to stream data from SAGA to LSL. TMSi has developed code that makes it convenient to align these streams, by creating a new file that contains a single stream with all data points.
Considerations when using LSL to synchronize two SAGAs
To record data from two SAGAs simultaneously, we recommend to use two PCs.
- Download the latest python version, making sure all steps in the manual are followed, that are also explained here.
- The program “LabRecorder.exe” should be installed, that can be downloaded here: Releases · labstreaminglayer/App-LabRecorder (github.com). This is the LSL program.
- Please make sure LSL is installed in the Python environment (type in "pip install pylsl" after having activated the Python environment).
- On both computers, run the 'example_stream_lsl.py' file.
- Note: be aware that both SAGAs should have a different name. This can be changed in line 75 of the above mentioned example: stream = FileWriter(FileFormat.lsl, “SAGA”) for one PC and stream = FileWriter(FileFormat.lsl, “SAGA 2”) for the other PC .
- Note 2: make sure that the sampling frequency* is the same.
- On one computer (the ‘recording computer’), run the LabRecorder program. This should look like the following image:
- Select both SAGAs and press ‘start’.
- Record for the desired amount of time.
- Stop the LabRecorder program. After stopping the LabRecorder program, stop the Python streams by closing the plotters. Please note that it is important to do it in this order!
- Open the example script: 'example_synchronize_xdf.py' to combine the two data streams into one synchronized data stream. The channel names have DEV_0 and DEV_1 in front of them to indicate from which device the channels originate. More information about this can be found in the manual of the TMSi Python Interface, in section 2.4.
When using the TMSi Python Interface in combination with LSL, the following
warning can show up: ‘Couldn't create multicast responder for 220.127.116.11 (set_option:
A socket operation was attempted to an unreachable host)’. This warning originates
form the liblsl-library and can unfortunately not be solved by TMSi. The warning does
not influence the connection between the TMSi Python interface and LSL and can
simply be ignored.
*Files recorded using the LSL-based LabRecorder applications contain separate streams for each device that made data available to the LSL platform. TMSi has developed code that makes it convenient to align these streams, by creating a new file that contains a single stream with all data points. TMSi has found accurate results for sample rates of 2048 Hz and lower, where the difference between synchronized data points remained within a single sample in 15-minute recordings. For recordings made with sampling frequencies of 4000 or 4096 Hz, differences of a few samples (approximately 1ms) per 15 minutes are found. Therefore, we strongly recommend to use the synchronization tool only for recordings that are made at sample rates of 2048 Hz or lower.
Do you have further questions on this topic?