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.

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

APP UNDER DEVELOPMENT

This App aims at apply to MEG signals temporal filtering (lowpass, highpass, or bandpass), and optionally a notch filter and a resampling. To do so the MNE Python functions raw.filter, raw.notch_filter, and raw.resample are used.

This App is supposed to be applied on MEG signals preprocessed wth MaxFilter

GitHub repository

Still private

Brainlife datatype used:

Inputs of the App

Files

Format

Description

Optional

MEG signals

.fif

Data to process. MaxFilter was applied beforehand on this data.

No

Outputs of the App:

Files

Format

Description

MEG signals

.fif

Data after filtering

Report

.html

Visualization in time and frequency domains

Steps

The python file temporal_filtering.py is composed of several functions:

  • temporal_filtering()

  1. Apply a lowpass, highpass, or bandpass filter

  2. Optionally apply a notch filter

  3. Optionally resample the data

  4. Save file

  • _generate_report()

  1. Plot data in time domain

  2. Plot data in frequency domain

  3. Display info about raw data

  4. Save report

  • main()

  1. Parse the config.json

  2. Apply temporal_filtering()

  3. Apply _generate_report()

Parameters of the App

The parameters of the App correspond to the parameters passed to the Python functions used in the App. They are listed in the config.json.example when you test your App locally, then when you register you App on Brainlife, you enter them and a config.json is created by Brainlife.

For app-temporal-filtering, the user will be able to choose the following parameters (a default parameter will be proposed). Three different MNE Python functions are used in this App:

  • raw.filter()

    • l_freq

      • NUMBER

      • default: None

    • h_freq

      • NUMBER

      • default: None

    • picks

      • ENUM

      • either meg, eeg, [“meg”, “eeg”], mag, grad, or None (i.e. all channels except for the bad ones)

      • default: None

    • filter_length

      • STRING

      • default: auto

    • l_trans_bandwidth

      • NUMBER

      • default: auto

    • h_trans_bandwidth

      • NUMBER

      • default: auto

    • n_jobs

      • NUMBER

      • default: 1

    • method

      • STRING

      • either fir or iir

      • default: fir

    • iir_params

      • to be determined

    • phase

      • ENUM

      • either zero or zero-double

      • default: zero

    • fir_window

      • ENUM

      • either hamming, hann, or blackman

      • default: hamming

    • fir_design

      • ENUM

      • either firwin or firwin2

      • default: firwin

    • skip_by_annotation

      • ENUM

      • either ["edge", "bad_acq_skip"], ["edge"], ["bad_acq_skip"], or []

    • pad

      • ENUM

      • either reflect_limited or any value of numpy.pad()

      • default: reflect_limited

  • raw.filter_notch()

    • freqs

      • ENUM

      • either np.arange(60, 241, 60) in the US, or np.arange(50, 251, 50) in Europe

    • picks

      • ENUM

      • either meg, eeg, [“meg”, “eeg”], mag, grad, or None (i.e. all channels except for the bad ones)

      • default: None

    • filter_length

      • STRING

      • default: auto

    • notch_widths

      • NUMBER

      • default: None

    • trans_banwidth

      • NUMBER

      • default: 1

    • n_jobs

      • NUMBER

      • default: 1

    • method

      • STRING

      • either fir or iir

      • default: fir

    • iir_params

      • to be determined

    • mt_bandwidth

      • NUMBER

      • default: None

    • p_value

      • NUMBER

      • default: 0.05

    • phase

      • ENUM

      • either zero or zero-double

      • default: zero

    • fir_window

      • ENUM

      • either hamming, hann, or blackman

      • default: hamming

    • fir_design

      • ENUM

      • either firwin or firwin2

      • default: firwin

    • pad

      • ENUM

      • either reflect_limited or any value of numpy.pad()

      • default: reflect_limited

  • raw.resample()

    • sfreq

      • NUMBER

    • npad

      • NUMBER

      • default: auto

    • window

      • ENUM

      • see choices in scipy.signal.get_window

      • default: boxcar

    • stim_picks

      • STRING

      • default: None

    • n_jobs

      • NUMBER

      • default: 1

    • events

      • NUMBER

      • default: None

    • pad

      • ENUM

      • either reflect_limited or any value of numpy.pad()

      • default: reflect_limited

See if it’s possible in BL to put a default STRING value in a NUMBER parameter

iir_params must be a dictonary, to see how to write it for BL

see how to write an array of floats in BL

The parameters' list along with their default values correspond to the 0.22.0 version of MNE.

  • No labels