MEGAP
ArticleGitHubLinkedin
  • Bridging the MEG Gap
  • Basic information
    • Core Features
    • Folder Structure
    • BIDS Format
  • Getting Started
    • Installation
    • Flat sensors
    • Extraneous Data
    • Head Position
      • Movement Check
    • Filter cHPI
    • Line noise
      • Zapline_Plus
      • Regression
    • Muscle Artifact
    • Bad Sensors
    • Squid Jumps
    • Environment Noise
    • Artifacts Removal
Powered by GitBook
On this page
  1. Getting Started
  2. Line noise

Regression

PreviousZapline_PlusNextMuscle Artifact

Last updated 7 months ago

CtrlK

In MEGAP, a regression-based method is applied after ZapLine-Plus using the spectrum_fit function from the MNE library. This approach, originally proposed by Partha Mitra and Hemant Bokil, effectively removes line noise. However, the default implementation attempts to remove line noise across the entire frequency spectrum, which can be inefficient and unnecessary for non-invasive recordings. To optimize this process, the algorithm was modified in MEGAP to operate within the frequency range of 10 to 260 Hz, as frequencies above 260 Hz are typically irrelevant, and frequencies below 10 Hz are generally less affected by line noise.

The parameters for this regression method can be customized in the pipeline_config.cfg file under the "multi_taper_removal" section. Users can adjust the settings as follows:

"multi_taper_removal": {
    "min_freq": 10,
    "max_freq": 260,
    "freqs": null,
    "method": "spectrum_fit",
    "mt_bandwidth": 4,
    "p_value": 0.05
}