Repository navigation
Add set_head_sphere method to store head outline in info - #14313
Conversation
… dict This allows a user to store a sphere fitted to the participants head inside the info dict. Whenever we need to draw the head sphere, for example in topomap figures, we will now use the stored head sphere by default. This can be overriden with the `sphere` parameter as usual.
|
The |
larsoner
left a comment
There was a problem hiding this comment.
@wmvanvliet updated writing code to use existing / corrected constants and updated a tutorial. Feel free to merge if you're happy!
…d-sphere * commit '0311e444b0450ce9d2b2b304cebe7d5343533357': Fix static doc viewing in IDEs (mne-tools#14195) Fix COLA for odd sizes (mne-tools#14312) add type hints to mne/_fiff/ module (mne-tools#14278) ENH: wire the JupyterLite build into the docs (JupyterLite split 5/5) (mne-tools#14157) MAINT: Update pre-commit hook versions (mne-tools#14306) Small documentation fix for "Frequency and time-frequency sensor analysis" tutorial (mne-tools#14304) FIX: don't mutate cached ICA sources in plot_sources properties (mne-tools#14303) Fix bug with lite backend closing (mne-tools#14302) Fix for NumPy eig change [circle deploy] (mne-tools#14300) No PyQt5 [circle deploy] [skip azp] [skip actions] ENH: add the JupyterLite notebook setup cell (JupyterLite split 4/5) (mne-tools#14150) FIX: Ver [circle deploy] [skip azp] [skip actions] Hotfix fix EDF round-trip (mne-tools#14296) Brain GUI modernization (Phase 7) (mne-tools#14270) Fix bug with SciPy 1.18.0 EEGLAB reading (mne-tools#14293) remove plotting abs as the defauls for plotting volumetric (mne-tools#13989) Coregistration GUI modernisation (phase 4) (mne-tools#14285) Dipole GUI interactivity and visual enhancements (phase 2) (mne-tools#14291)
|
You also added the full BEM model instead of just the sphere. Is that based on how |
|
Mocking a full BEM model instead of just adding a |
|
The idea is it's easier to reuse existing constants for something that already exists than it is to define a new constant for something very similar. There is already a way to specify a head sphere radius and center, so why not reuse it, even if it in theory allows specifying other stuff (that we don't and probably won't use). |
| FIFF.FIFFV_COND_MODEL_UNKNOWN = 0 | ||
| FIFF.FIFFV_COND_MODEL_SPHERE = 1 # Spherically symmetric | ||
| FIFF.FIFFV_COND_MODEL_BEM_HOMOG = 2 # Homogeneous BEM model (single layer) | ||
| FIFF.FIFFV_COND_MODEL_BEM = 3 # Multilayer BEM model |
There was a problem hiding this comment.
These two constants are the only "full bem" part, the rest is all spherically symmetric model
|
Ah, now I understand. |
Correct. The number was being used for something else. Not sure why we had it that way... |
* upstream/main: FIX: Restore bads when interpolate_bridged_electrodes raises for bad_limit (mne-tools#14320) BUG: Fix fNIRS `interpolate_bads` on `Epochs` (mne-tools#14323) [dependabot]: Bump the actions group with 3 updates (mne-tools#14324) MAINT: Update pre-commit hook versions (mne-tools#14322) Fully populate docstrings (mne-tools#14316) Add `set_head_sphere` method to store head outline in info (mne-tools#14313) # Conflicts: # mne/minimum_norm/inverse.py
closes #14307
Adds
MontageMixin.set_head_sphere(sphere=None)so that object such asRaw,Epochs,EvokedandInfoall have this method. The method can be used to set the head sphere for topomaps once and then have it be used as the default head sphere every time a topomap-like figure is created.No AI was used.