Repository navigation
MRG: Revert to using dict subclass for Info - #3147
Conversation
|
LGTM @wmvanvliet can you double check? |
|
Changes Unknown when pulling 99a4265 on Eric89GXL:fix-info into * on mne-tools:master*. |
|
LGTM. +1 for merge. |
|
Thanks for the reviews @agramfort @wmvanvliet. @dengemann you have time to take a look? |
| if not isinstance(info, Info): | ||
| raise TypeError('info must be an instance of Info, got %s' | ||
| % type(info)) | ||
| info._check_consistency() # make sure it's valid |
There was a problem hiding this comment.
Super class _BaseRaw calls it in its constructor shortly thereafter
|
otherwise +1 for merge |
|
@jaeilepp will review tomorrow :) |
|
Thanks, this looks good. So we have the consistency checking and updating that @wmvanvliet elaborated while keeping things flat. Wonderful! Also +1 from my side. |
|
great ! |
| chan_info['loc'] = np.zeros(12) | ||
| chan_info['kind'] = FIFF.FIFFV_STIM_CH | ||
| info['chs'].append(chan_info) | ||
| info._update_redundant() |
There was a problem hiding this comment.
Shouldn't this be called even if stim is None
There was a problem hiding this comment.
no, it only needs to be called (again) if chs is updated and it's not updated if stim is None
There was a problem hiding this comment.
It already gets called before this earlier by get_kit_info on line 738
Resets us to using
dictsubclass forInfofor 0.12 before we tackle #2860 for 0.13 (or later).Ready for review/merge from my end.