This is a collaborative space. In order to contribute, send an email to maximilien.chaumon@icm-institute.org
On any page, type the letter L on your keyboard to add a "Label" to the page, which will make search easier.

app-bad-channels

App under development Private app on bl

It’s critical to mark bad channels as ‘bad’ before applying Maxwell Filter in order to prevent bad channel noise from spreading. This app allows to automatically detect bad channels using the MNE Python function mne.preprocessing.find_bad_channels_maxwell. Nevertheless, this algorithm is not perfect so a visual inspection of the signals before and after running this App is recommended.

 

GitHub repository:

GitHub - brainlife/app-bad-channels: Detect bad channels in MEG signals.

 

Brainlife datatype used:

 

Inputs of the App

Files

Format

Datatype

Description

Optional

Files

Format

Datatype

Description

Optional

MEG signals

.fif

meg/fif

Data to process

No

Head position file

.pos

meg/fif-override or meg/fif

Compensates for head movements

Yes

Fine calibration file

.dat

meg/fif

Encodes site-specific information about sensors orientation and calibration

Yes

Cross talk compensation file

.fif

meg/fif

Reduces interference between Elekta’s co-located magnetometer and paired gradiometer sensor units

Yes

The head position file can be obtained thanks to the app-head-pos.

This headpos file can be obtained thanks to the app-head-pos (if so, the file will be linked to the meg/fif-override datatype) or can be directly available with the meg.fif in the meg/fif datatype. If there are two head.pos (one from meg/fif datatype and the other from meg/fif-override datatype, only the file from the meg/fif-override will be used (see How to use the meg/fif-override datatype).

 

Outputs of the App:

Files

Format

Datatype

Description

Files

Format

Datatype

Description

Channels

.tsv

meg/fif-override

BIDS compliant tsv file in which bad channels are marked as bad

Report

.html

html

List of the automated detected bad channels and visualizations in time and frequency domains

 

Besides, in the output directory, there are the optional files that can be used in a next App. This is mandatory, because the App that will be run after app-bad-channels can take as input all the files in app-bad-channels’s output directory corresponding to the datatype of the input of the next App (see How to run Apps one after another).

 

Parameters of the App

The parameters of the App correspond to the parameters passed to the Python functions used in the App. Their default values proposed in Brainlife or in config.json.example correspond to the default values of MNE Python 0.23 (except for return_scores, which here is set to True because we need this info to create the html report).

Next improvements

  • Rename it into “app-find-bad-channels-maxwell-filter”?

  • Allow user to change the plot parameters for the plots in the HTML report?