eeg-epoch

Segment cleaned EEG into event-locked epochs with baseline correction and artifact rejection.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/dengzhe-hou/auto-eeg-analysis --skill eeg-epoch
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: eeg-epoch
Source: https://github.com/dengzhe-hou/auto-eeg-analysis/tree/main/skills/eeg-epoch
Command: npx skills add https://github.com/dengzhe-hou/auto-eeg-analysis --skill eeg-epoch

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill turns cleaned continuous EEG into event-locked epochs and removes bad trials so you can compute reliable ERPs/TFRs and downstream statistics.

Core Features & Use Cases

  • Event-locked epoching from your experiment markers: extracts events from triggers, annotations, or BIDS-style sidecars, then maps them using DATASET_BRIEF condition codes.
  • Baseline correction with guardrails: applies a configurable pre-stimulus baseline window (or skips it safely when appropriate for the analysis design).
  • Trial-level artifact rejection via AutoReject: runs AutoReject to reject or interpolate artifact-contaminated trials and logs decisions per subject.

Quick Start

Use eeg-epoch with your project directory to segment ICA-cleaned EEG into epochs around your event markers, rejecting bad trials and producing epoch-stage outputs ready for analysis.

Frequently Asked Questions about eeg-epoch

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I segment continuous EEG data into event-locked epochs for ERP analysis?▼

To segment continuous EEG into event-locked epochs, the Skill extracts events from trigger channels, annotations, or BIDS sidecars, applies baseline correction, and performs trial-level artifact rejection to produce MNE Epoch FIF files ready for ERP analysis.

How does AutoReject work for trial-level artifact rejection in EEG preprocessing?▼

AutoReject works for trial-level artifact rejection by automatically evaluating EEG epochs to reject or interpolate artifact-contaminated trials, logging per-subject decisions to ensure clean data for downstream statistics without manual thresholding.

Do I need ICA-cleaned EEG data to perform epoching and trial rejection?▼

Yes, you need ICA-cleaned EEG data as the Skill requires existing ICA-stage outputs to segment continuous data into epochs and perform trial-level artifact rejection effectively.

Can I use BIDS event sidecars to define condition codes for EEG epoching?▼

Yes, you can use BIDS event sidecars to define condition codes for EEG epoching. The Skill extracts events from BIDS-style sidecars and maps them using condition codes defined in your DATASET_BRIEF.md file.

What's the best way to handle bad trials when epoching EEG data?▼

The best way to handle bad trials during EEG epoching is using AutoReject, which automatically rejects or interpolates artifact-contaminated trials and generates trial-count and exclusion reports to maintain reliable ERP results.

Why does baseline correction matter when creating event-locked EEG epochs?▼

Baseline correction matters because it normalizes pre-stimulus EEG activity in event-locked epochs, applying a configurable pre-stimulus window to ensure accurate ERP measurement while safely skipping when inappropriate for your analysis design.