Skip to content

Commit cef42e1

Browse files
Document pop_reref GUI channel indexing
1 parent e733099 commit cef42e1

2 files changed

Lines changed: 14 additions & 3 deletions

File tree

‎docs/source/user_guide/quickstart.rst‎

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -334,8 +334,15 @@ Re-referencing
334334
# Re-reference to average
335335
eeg = pop_reref(eeg, []) # Empty list = average reference
336336
337-
# Re-reference to specific channel
338-
eeg = pop_reref(eeg, 32) # Reference to channel 32
337+
# Re-reference to a specific channel by 0-based index
338+
eeg = pop_reref(eeg, 31) # Reference to the 32nd channel
339+
340+
.. note::
341+
342+
Numeric channel indices in EEGPrep Python calls and GUI text fields are
343+
0-based. For example, enter ``0`` for the first channel. EEGPrep still writes
344+
generated EEGLAB-style history commands with 1-based indices so the command
345+
text matches EEGLAB conventions.
339346

340347
Next Steps
341348
==========

‎src/eegprep/resources/help/pop_reref.md‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,14 @@ Graphic interface:
1717
- "Exclude channel indices (EMG, EOG)" excludes channels from the reference calculation.
1818
- "Add old ref. channel back to the data" reconstructs an old reference channel when its location is known.
1919

20+
Channel index note:
21+
22+
Numeric channel indices typed into EEGPrep GUI fields are 0-based, matching the Python API. For example, type `0` for the first channel. Generated EEGLAB-style history commands are written with 1-based indices so they can be read like EEGLAB commands.
23+
2024
Inputs:
2125

2226
- `EEG`: input EEG dataset.
23-
- `ref`: `[]` or `None` for average reference, a channel index, a sequence of channel indices, a channel label, or a sequence of channel labels.
27+
- `ref`: `[]` or `None` for average reference, a 0-based channel index, a sequence of 0-based channel indices, a channel label, or a sequence of channel labels.
2428

2529
Optional inputs:
2630

0 commit comments

Comments
 (0)