GDF replay to XDF

Concerning processing components: filters, file load/save, visualizations, communication ...
Post Reply
Mike_qp
Posts: 9
Joined: Sat Apr 03, 2021 1:38 pm

GDF replay to XDF

Post by Mike_qp »

Hi all,

I'm recording my experiments with LSL (xdf data format) and I use GDF box as a back up file.
For some reasons experimental reasons, I need to work with xdf files, so I only have to replay my GDF with OV and record it with LSL. This part is working properly.

My problem is that it seems that the gain of the amplitude my EEG signal is modified in the GDF file, when I compare XDF with a GDF_to_XDF of the same EEG recording.

Do you have any informations regarding this hidden gain in the GDF ?

Thanks for your help

Cheers

Thomas
Posts: 211
Joined: Wed Mar 04, 2020 3:38 pm

Re: GDF replay to XDF

Post by Thomas »

Hi Mike,

There are some scale and offsets applied to data when storing to GDF. This could be the reason you are seeing differences.

What version of OpenViBE are you using ?
Note that from OpenViBE 3.3.1, when recording GDF with OpenViBE (GDF File Writer) and playing it back with OpenViBE (GDF File Reader), there shouldn't be any alteration of the signal.

What tool do you use to perform the GDF_to_XDF transform ?

Thanks,
Thomas

Mike_qp
Posts: 9
Joined: Sat Apr 03, 2021 1:38 pm

Re: GDF replay to XDF

Post by Mike_qp »

Hi Thomas,

Thank you for your answers.
I'm using OV 3.1, and i will update it ASAP.

I was doing the conversion as follows :
- Replay GDF with OV
- Record OV LSL streams with LabRecorder

Do you have any clue about the scaling factor i should apply to get rid of these scale and offset ?
Thanks for the advice

Mike

Thomas
Posts: 211
Joined: Wed Mar 04, 2020 3:38 pm

Re: GDF replay to XDF

Post by Thomas »

Hi Mike,

If you were using OV 3.1, there is an issue with the stimulations recorded in GDF file in that version.
If you are also recording stimulations, you might want to look at the following for explanation and fix:
https://gitlab.inria.fr/openvibe/gdf-fi ... ree/master

And you shouldn't have to apply scales/offset yourself since they are computed from variables in the GDF file Header.

Now another issue that I found when fixing the first one, is that there was an accuracy issue in GDF due to the way the scale/offset were computed.
This accuracy issue was very small as far as I remember.
You could try with the latest version of OpenViBE to see if the data is better.

However, the offset/scale being what they are from before OpenViBE 3.4.0, you might not get great results if you read your OV-3.1.0 GDF files with the latest OpenViBE version.

You could use MNE-python library to read the GDF file, the original XDF file and the final one (from OV using GDF and LSL), in order to narrow down where the amplitude is moving.

Lastly, you could try to use the Generic Stream Reader/Writer from OpenViBE in order to backup your files in OV, and see whether the problem persists.

Let us know how you get on with this one.

Thomas

Post Reply