Skip to content

eeg_pamica: export rejected-sample counts (numrej, n_good_samples) #671

Done

Description

@neuromechanist

pAMICA keeps the outcome of its in-algorithm sample rejection on the model (passes made and samples kept), but eeg_pamica at edf694c does not copy it into EEG.etc['pamica'], and pop_runica does not return the model. Pipelines that turn rejection on (nemar-process nemar-ica, nemarOrg/nemar-process#81, epic nemarOrg/nemar-cli#2324) cannot record how many samples were rejected.

Request: add the rejection settings actually used and the outcome (number of rejection passes, n_good_samples, the rejected-sample count or mask) to EEG.etc['pamica'].

Activity

  1. claude commented on Nov 23, 2026

    @claude
    Contributor

    🤖 Plan:

    • Research: eeg_pamica builds EEG.etc["pamica"] from settings passed plus fit outcome (eeg_pamica.py#L177-L199); pAMICA 0.4.0 keeps rejection state on model.model_ (do_reject, rejsig, rejstart, rejint, maxrej, numrej, good_idx), none of which is copied.
    • Test first in tests/test_pop_runica_pamica.py: do_reject=True fit records settings + numrej, n_good_samples, n_rejected_samples, and still replays.
    • Fix: record the effective rejection settings from model.model_ and the outcome (n_good_samples = len(good_idx), or all samples when off).
    • Docs (ica_rejection.rst, changelog), pre-commit, PR [ICA] Record pAMICA rejection with EEGLAB defaults #674.
    • CI: unit tests (ubuntu 3.12/3.13, macOS, Windows), lint, ty, docs, EEGLAB Python backend pass; E1 report and Pyodide jobs still running.

    Not done: the rejected-sample mask is not stored, only counts. Core-function change, so it needs human approval and the EEGLAB reference run before merge.

  2. added a commit that references this issue on Nov 23, 2026
    607973e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions