Skip to content

ENH: add EGI ICAL/GCAL calibration section to read_impedances gallery example - #14143

Merged
scott-huberty merged 4 commits into
mne-tools:mainfrom
PragnyaKhandelwal:egi-mff-calibration-example
Aug 10, 2026
Merged

ENH: add EGI ICAL/GCAL calibration section to read_impedances gallery example#14143
scott-huberty merged 4 commits into
mne-tools:mainfrom
PragnyaKhandelwal:egi-mff-calibration-example

Conversation

@PragnyaKhandelwal

@PragnyaKhandelwal PragnyaKhandelwal commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Reference issue (if any)

Contributes to #13926 (Phase 5 — gallery examples and code cleanup).

What does this implement/fix?

Adds an EGI section to the existing read_impedances gallery example
(examples/io/read_impedances.py).

The new section demonstrates how to read per-channel GCAL (gain calibration)
and ICAL (impedance) data from an MFF file's info1.xml via
mffpy.xml_files.DataInfo, then visualize the impedances on a topographic
map using mne.viz.plot_topomap. Uses the existing test_egi.mff file from
the testing dataset — no new test data needed.

Additional information

… example

Read per-channel impedance and gain calibration data from MFF info1.xml via
mffpy and visualize on a topographic map.
@PragnyaKhandelwal PragnyaKhandelwal changed the title ENH: add EGI ICAL/GCAL calibration section to read_impedances gallery… ENH: add EGI ICAL/GCAL calibration section to read_impedances gallery example Aug 8, 2026
@PragnyaKhandelwal
PragnyaKhandelwal marked this pull request as ready for review August 8, 2026 15:22
@scott-huberty
scott-huberty enabled auto-merge (squash) August 10, 2026 14:31
@scott-huberty

Copy link
Copy Markdown
Contributor

Nice @PragnyaKhandelwal ! I just push a couple small changes. I Moved the EGI section of the example to begin after the ANT Neuro section, and I dropped the vlim from the EGI topoplot. You are totally right that there is a convention in EGI systems to flag channels above 50 kΩ, but clearly this test file didn't get the memo, and so clipping vmax makes the topoplot less legible : )

@PragnyaKhandelwal

Copy link
Copy Markdown
Contributor Author

Nice @PragnyaKhandelwal ! I just push a couple small changes. I Moved the EGI section of the example to begin after the ANT Neuro section, and I dropped the vlim from the EGI topoplot. You are totally right that there is a convention in EGI systems to flag channels above 50 kΩ, but clearly this test file didn't get the memo, and so clipping vmax makes the topoplot less legible : )

Thank you for the review and the edits @scott-huberty! I checked the rendered docs and the topomap looks much better without the vlim.... the spatial structure of the impedances across the cap looks great..
Really appreciate the feedback on the 50 kΩ clipping point, I'll keep that in mind for future visualizations!

image

@scott-huberty
scott-huberty merged commit d529cf0 into mne-tools:main Aug 10, 2026
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants