The FLUX Pipeline
FLUX: a pipeline for MEG and OPM analysis

Aim
Magnetoencephalography (MEG) enables the quantification of human neuronal activity with millisecond precision, while also allowing for the estimation of the location of the underlying neural sources. MEG utilises sensors based on SQUIDs (superconducting quantum interference devices) or OPMs (Optically Pumped Magnetometers). The MEG technique relies heavily on advanced signal processing and source modelling. To support these analyses, the research community has developed several powerful open-source toolboxes.
​
While these toolboxes offer a wide array of analysis options, their flexibility can pose challenges—particularly for ensuring reproducible research and for researchers new to the field. The FLUX pipeline addresses these challenges by making analysis steps and parameter settings explicit for standard procedures in cognitive neuroscience.
​
The FLUX pipeline originates from the Cogitate Consortium, which focuses on specific cognitive neuroscience questions. It is implemented for both MNE-Python (a Python-based toolbox) using a dataset on visuospatial attention to demonstrate the full analysis process. The earlier version was also implemented in FieldTrip (a MATLAB-based toolbox) to ensure to tools align (but the FieldTrip version is no longer maintained).
​
The pipeline is delivered through Jupyter Notebooks and MATLAB's Live Editor, combining code, graphical outputs, and detailed explanations and justifications of each analysis step. In addition, we provide suggested text and parameter settings for use in registrations and publications to enhance reproducibility and support pre-registration practices.
Designed to support both self-guided learning and instructor-led workshops, the FLUX pipeline serves as an educational resource as well. Our goal is to strengthen the MEG community by introducing a degree of standardisation to foundational analysis steps and by harmonising approaches across different toolboxes. We also aim to support newcomers to the field through accessible training resources.
​
Importantly, the FLUX pipeline is a living resource—it will continue to evolve alongside developments in the toolboxes and as new insights emerge.
​
This first version of the FLUX Pipeline is published in Ferrante et al. (2022) Neuroimage
Target users
The target audience includes researchers who are new to MEG and OPM research, as well as more experienced users looking to standardise their analyses. The FLUX pipeline is particularly geared towards cognitive and clinical neuroscientists with an interest in task-based paradigms. It has been developed by cognitive neuroscientists with a strong focus on brain oscillations and multivariate analysis approaches.
The data set
The dataset for the FLUX pipeline based on MNE-Python is available on OpenNeuro and is used throughout the step-by-step tutorials. We provide datasets from a MEGIN MEG system, a Cerca/QuSpin OPM system and well as a FieldLine OPM system. The data originates from a simple spatial attention paradigm in which participants are instructed to attend either left or right to a moving grating. This task and stimulation reliably elicit modulations in the alpha and gamma frequency bands.
For the FLUX pipeline based on FieldTrip, the corresponding raw data can be found on FigShare.
Standard Operation Procedure (SOP) for MEG data acquisition
We here share an example of a SOP for MEG data acquisition. It is derived from the Cogitate project and relevant parts can be adapted to specific studies and used for preregistrations.
The FLUX pipeline for MEGIN MEG data
The FLUX pipeline for Cerca/QuSpin OPM data
The pipeline is implemented as Jupyter scripts maintained on a GitHub server
​
The FLUX pipeline for FieldLine OPM data
The FLUX pipeline – FieldTrip
Note, that we are no longer maintaining the FLUX pipeline for Matlab/FieldTrip. The scripts here are meant to support users that are in the process of transitioning from FieldTrip to MNE Python.
The pipeline is implemented as Matlab Livescripts scripts on a GitHub server .
​
​