Synchronize two signals in Process A and Process B

Hello, I found there is a synchronization function in the Process tab that synchronizes one signal in Process A with the other signal in Process B, or in other words, transfers event markers in one signal to the other signal. I tried to use this function in two of my datasets, one is a MEG signal, the other is an EEG signal. In both the signals, there is a recording_onset / recording_end marker. The marker was sent by a stimulus control computer to MEG and EEG acquisition computers. I wanted to synchronize the EEG signal with the MEG signal with this marker, so I first imported the MEG and EEG signal into brainstorm, and then placed the MEG signal in Process A and the EEG signal in Process B. The markers used were "200 (×2)" in MEG and "DIN4 (×2)" in EEG. Then I pressed run to run the process. When the process completed, feedback "The variance of the sample offset is 42ms (std: 205ms)" was displayed in the Matlab command window; in Brainstorm, the EEG signal now has its original marker DIN4 (×2) and the MEG marker "200 (×0)". The marker name "200" is from MEG but the event was not written in the EEG signal. See figure below.

image

No errors were reported in the whole process. I am thinking if this function can be used this way as I did, what I may have done wrong during the process, and what are the correct ways to use this function. I would appreciate any feedback. Thanks.

This process is described here:
https://neuroimage.usc.edu/brainstorm/Tutorials/EyetrackSynchro

A standard deviation of 205ms between your 2 markers seems to indicate that your two signals (or at least the markers) were not recorded at the same time.

Look at the code for further help with what this function does: