Code Monkey home page Code Monkey logo

mbme-physio-denoising's Introduction

Removing MR-related noise from concurrently collected electrophysiological recordings

Binder

Collecting physiological data during fMRI experiments can improve fMRI data cleaning and contribute to our understanding of psychophysiological processes; however, these recordings are frequently fraught with artifacts from the MRI pulse sequence. Here, we look at manufacturer recommendations for filtering such artifacts from physiological data collected during single-band, single-echo fMRI sequences and extend these recommendations to address artifacts associated with multiband, multi-echo fMRI sequences. While the magnitude and frequencies of artifacts differ with these aspects of pulse sequences, their effects can be mitigated via application of digital filters focused on the slice collection and repetition time.

Directory

ephys_filtering.py is a command-line Python script that performs digital filtering of MR-related artifacts from eletrophysiological data, using IIR notch filters centered at slice collection and TR frequencies.

usage: ephys_filtering.py [-h] [--mb MB] [--verbose] in_file out_dir tr slices

Accept physio + sidecar input for cleaning EDA/ECG collected simultaneously
with fMRI.

positional arguments:
  in_file     AcqKnowledge file containing physio measurements from a single
              scan session.
  out_dir     Absolute or relative path to directory where output (figures and
              cleaned data) will be saved.
  tr          The TR (repetition time) in seconds of the fMRI scan sequence
              used during colleciton of these data.
  slices      Number of slices collected by fMRI scan sequence.

optional arguments:
  -h, --help  show this help message and exit
  --mb MB     Multiband factor of fMRI scan sequence (if single band, --mb=1).
  --verbose   Print information as the cleaning script runs.

biopac_to_csv.py is a command-line Python script that converts BIOPAC AcqKnowledge files (extension .acq) to comma-separated value files (.csv) with a common time index and standardized headers (currently only supports ECG, EDA, and Respiration recordings).

usage: biopac_to_csv.py [-h] in_files [in_files ...] out_dir

Accept BIOPAC .acq files as input, save them as .csv files.

positional arguments:
  in_files    AcqKnowledge file(s) containing physio measurements from a
              single scan session.
  out_dir     Absolute or relative path to directory where output (figures and
              cleaned data) will be saved.

optional arguments:
  -h, --help  show this help message and exit

requirements.txt specifies Python packages (and versions thereof) used in the creation and application of these filters.

Notebooks

Contains interactive Jupyter notebooks (denoising_ecg.ipynb and denoising_eda.ipynb) that apply the filters to electrocardiogram and electrodermal activity data, respectively, collected during multiband, single-echo and multi-echo EPI sequences, plots raw and cleaned data, and compares ferquency spectra across the filtering strategies using magnitude squared coherence.

Figures

Contains output of Jupyter notebooks: png files of signals, their frequency spectra, and magnitude squared coherence plots.

Example Data

Contains electrocardiogram and electrodermal activity recordings collected during one run of each a single-echo and multi-echo EPI sequence on a Siemens PRISMA 3T MRI scanner.

mbme-physio-denoising's People

Contributors

62442katieb avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.