Skip to content

Inaccurate MEG sampling frequency (1000.49Hz instead of 1000Hz) [ongoing] #64

Description

@gbirot

What is the issue?

The MEG data true sampling frequency is not exactly 1000Hz but 1000.49Hz, or 5002.5Hz at 5000Hz.

This problem has been originally reported on the MNE forum.

MEGIN is aware of the problem and a hardware fix is currently being developed. Release date is not known yet.

Does the task stay synchronized with MEG data?

In most of the cases, yes.

Say, a trigger is sent at the onset of a task event (stimulus) and the brain response recorded by the MEG occurs 100ms after the event, then the drift due to the sampling rate inaccuracy will be ~0.05ms (~0.0005 ms/sample at 1000Hz), which is unsignificant.

Now, if the brain response(s) occur further in time from the trigger, then it might become an issue. The drift with respect to the time after the trigger onset is displayed on the graph below.

Image

How to fix the issue?

As explained in the MNE post, the sampling frequency can be changed in the .fif data file. Therefore, changing it from 1000Hz to 1000.49Hz should fix the problem.

with raw.info._unlock():
     raw.info["sfreq"] = 1000.49

Note that the sfreq attribute is not supposed to be changed manually. Unknown side effects may occur.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions