Skip to content

eegprep-console: start with the sample epoched or continuous dataset, like eeglab epoch and eeglab cont #824

Done

Description

@arnodelorme

In MATLAB, eeglab epoch and eeglab cont start EEGLAB with a sample dataset loaded. Arno wants the same for EEGPrep.

  • Add arguments to uv run --no-sync eegprep-console --full, for example epoch and cont, that load the same sample datasets as EEGLAB.
  • Not part of the File and Edit report; asked by email on November 28, 2026.

Captures

Linux (jamming) captures of EEGLAB and EEGPrep from the November 28 run are added below, directly visible, by the EEGPrep worker. Fix nothing here before Arno says so, unless this issue is the one test fix named in its summary.

Arno's words

Arno's feedback of November 28, 2026 on the File and Edit comparison report (EEGLAB_vs_EEGPrep_File_and_Edit.pdf, run file-edit-native-2026-11-28 in adelorme-assistant/project_eegprep/reports).

Another issue that's not in the text and that I would like to be created is how you can type "eeglab epoch" or "eeglab cont" from the command line. I would like that option to be available for EEGPrep. So some additional parameters to the call "uv run --no-sync eegprep-console --full"

Activity

  1. added
    enhancement
    on Nov 28, 2026
  2. claude commented on Nov 28, 2026

    @claude
    Contributor

    🤖 Plan:

    • Fetch issue and research launcher code
    • Duplicate-work preflight (no overlapping open PRs/issues)
    • Post Research + Proposed Fix
    • Implementation: on hold. The issue says "fix nothing before Arno says so", and it needs a packaging decision (see below)

    Research

    eegprep-console and eegprep-gui accept only flags (--full, --no-plugins, …). Neither takes a positional dataset argument, and eeglab() handles only nogui, full, and versions. In EEGLAB, eeglab cont loads sample_data/eeglab_data.set and eeglab epoch loads sample_data/eeglab_data_epochs_ica.set, then stores the dataset and redraws. In EEGPrep those files are in the repo-root sample_data/ folder (~4 MB each, with .fdt) and are not packaged in the wheel, because package-data covers only resources/ and plugins/. A pip-installed EEGPrep therefore has nothing to load.

    Relevant code

    Proposed Fix

    Add an optional positional dataset argument with the choices cont and epoch to run_console, so uv run --no-sync eegprep-console --full epoch works. Before the GUI is built, load the file with pop_loadset and store it through session.store_current(...) with an EEG = pop_loadset('filename', ..., 'filepath', ...); history entry. That fills EEG, ALLEEG, and CURRENTSET in both the GUI and the console. Test it in tests/test_console_workspace.py with the existing stub gui_launcher pattern, asserting CURRENTSET == 1 and EEG['trials'] > 1 for epoch. Update docs/source/user_guide/interactive_console.rst. Estimated at ~40–60 lines, not counting the data-location choice.

    Open questions (for Arno/maintainers)

    1. Data location: (a) source checkout only: resolve <repo>/sample_data and fail with a clear error when it is missing (small change that fits the uv run use case); (b) package the two sample datasets under resources/sample_data (~8 MB more in the wheel); or (c) download them on first use.
    2. Should eegprep-gui cont and Python eeglab('cont') / eeglab('epoch') also be supported, or only the console?
  3. arnodelorme commented on Nov 29, 2026

    @arnodelorme
    CollaboratorAuthor

    🤖 Run eegprep-console --full cont or eegprep-console --full epoch to open the matching sample with dataset 1 selected in the GUI and console. The two sample recordings ship with the wheel for offline use.

    Pull request #837.

    Continuous sample in EEGLAB and EEGPrep

    Epoched sample in EEGLAB and EEGPrep

    Maximum difference from MATLAB on both sample recordings

    Editable Word report · PDF report

    Both recordings matched EEGLAB sample for sample, including 32 channels at 128 Hz. The continuous recording had 154 events, and the epoched recording had 157.

    Verification

    249 local GUI and console tests passed. Four reference cases were deselected. Pre-commit, Ruff and ty passed. Both actual launch commands and both corresponding EEGLAB commands ran on jamming. A clean Python 3.12 environment installed the built wheel and ran both real console commands outside the checkout. Each loaded the packaged files through share/eegprep/sample_data. The four sample files add 7,250,100 compressed bytes. Windows CI reports the pre-existing one-pixel Qt row check #834, addressed by #835. Windows job.

    — EEGPrep worker (Codex)

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

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions