MEG session🔗



An MEG session starts by screening the participant to ensure his compatibility with MEG acquisition (see MEG contraindications). An MEG measures fields in the range of \(fT\), i.e. \(e^{-15}\ Tesla\). Thus, it’s very sensitive to any magnetic metal or alloy in movement within the Magnetically Shielded Room (MSR). For instance, the ticking of the second’s needle of a mechanical watch is picked up 2 meters from the sensors.

During screening, the participant is positioned in the MEG and the signal is monitored for a short period of time. Screening is an iterative process where we try to identify and remove all sources of interference. Common sources of interference are: braces, dental retainers, piercings, make-up, bra, .. see MEG contraindications for an exhaustive list.


Participants will change into MEG-compatible clothes thus removing belts, jeans, bras and other clothes with metallic pieces.

If the interference source can not be removed, e.g. implants or dental retainers, the decision to continue or cancel the acquisition belongs to the researcher. In practice, we recommend to exclude participants which do not yield clean signal, except if they are part of a rare cohort. In theory, MaxWell filtering and Spatiotemporal SSS (tSSS) can remove most noise components.

Empty-Room recording🔗

Before the experiment begins, an empty-room recording is measured. The empty-room recording can be used to re-compute the Signal Space Projectors (SSP).

The default Signal Space Projectors have been tuned for our site and the empty-room noise present. This noise and its correction are stable in time, thus it should not be needed to re-compute the SSPs. However, the empty-room recording can be used to compare the SSP correction with the empty-room noise correction from the 08/01/24. On that day, the bad sensors removed are MEG 1213, MEG 1321, MEG 1343, MEG 1423.

from matplotlib import pyplot as plt
from import read_raw_fif

fname = r"empty_room_raw.fif"
raw = read_raw_fif(fname, preload=True).apply_proj()
fig = raw.compute_psd().plot(show=False)
fig.axes[0].set(xlim=(0, 50), ylim=(5, 40))
fig.axes[1].set(xlim=(0, 50), ylim=(5, 40))
_images/psd-68deg-dark.svg _images/psd-68deg-light.svg
_images/psd-60deg-dark.svg _images/psd-60deg-light.svg
_images/psd-0deg-dark.svg _images/psd-0deg-light.svg


Contrary to EEG, the head and the sensors are not in the same coordinate frame. In other words, the sensors are fixed and the participant is free to position his head within the helmet in different ways and to move during the recording. Thus, for 2 different participants or 2 different recording sessions, the head position inside the MEG helmet might vary. In other words, a given sensor will not monitor the same brain region.

To account for the variable head position, a device to head transformation is estimated for every recording. This transformation is estimated from 5 coils placed on the participant head. The coils position is measured both in the head coordinate frame (as part of the digitization process) and in the device coordinate frame (as part of the HPI measurement).

The digitization process is performed with the Polhemus FASTRAK system. First, 3 anatomical landmarks are digitized: the nasion (NAS), the left and right pre-auricular point (LPA and RPA).



Those 3 anatomical landmarks define the head coordinate frame:

  • The X-axis goes from LPA (2) to RPA (1)

  • The Y-axis is orthogonal to the X-axis and goes through the nasion (NAS) (3)

  • The Z-axis forms the right-handed orthogonal system

All points digitized after the anatomical landmarks are reported in the head coordinate frame. Once the head coordinate frame is defined, the digitized points are:

  • the 5 HPI coils (placement may vary from one participant to another)

  • (optional) the EEG electrodes

  • the head shape (additional points on the scalp to improve co-registration)

The head shape is digitized in string mode, i.e. a continuous pressure is applied on the pen which draws lines on the scalp.


The head coordinate frame measures the point’s position in meters.

HPI measurement🔗

An HPI (Head Position Indication) measurement is always performed before a new recording with a participant. Once, the participant is positioned in the MEG, a pulse is sent to the 5 coils placed on the head. The coils positions are estimated from the magnetic field measured by the MEG sensors.


Only 3 coils are needed to estimate the head position, 4 coils ensures that they are not coplanar. MEGIN opted for 5 coils as a safety margin to ensure a robust estimation.

The HPI measurement at the beginning of the recording is used to estimate a single device to head transformation, stored in the["dev_head_t"] field of a Raw object.


In MNE-Python, the device to head transformation is stored in a Transform object representing a 4x4 affine transformation.

cHPI (continuous Head Position Indication) is used to continuously elicit a magnetic field from the 5 HPI coils. MaxWell filter can use the cHPI signal to correct signal distortions due to head movements. See this tutorial for more information about the correction of head movements using MNE-Python.


In any-case, the cHPI signal should be filtered out before the analysis. In MNE-Python, this is done through filter_chpi(). Note that this function is not a simple notch filter as the cHPI signals are in general not stationary because the head movements act like amplitude modulators. Thus, an iterative fitting method is used to remove the cHPI signal.