From 9e4bce1b5aa7239aee6bc0d396f73bd3c75b35f4 Mon Sep 17 00:00:00 2001 From: Eric Larson Date: Tue, 12 May 2020 11:46:42 -0400 Subject: [PATCH 1/2] DOC: Notes about info [skip travis] --- mne/io/meas_info.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/mne/io/meas_info.py b/mne/io/meas_info.py index 956dedf91cc..ecde5c2e112 100644 --- a/mne/io/meas_info.py +++ b/mne/io/meas_info.py @@ -184,14 +184,17 @@ class Info(dict, MontageMixin): """Measurement information. This data structure behaves like a dictionary. It contains all metadata - that is available for a recording. - - This class should not be instantiated directly. To create a measurement - information strucure, use :func:`mne.create_info`. + that is available for a recording. However, its keys are restricted to + those provided by the + `FIF format specification `__, + so new entries should not be manually added. The only entries that should be manually changed by the user are ``info['bads']`` and ``info['description']``. All other entries should - be considered read-only, or should be modified by functions or methods. + be considered read-only, or should be modified by MNE functions or methods. + + This class should not be instantiated directly. To create a measurement + information strucure, use :func:`mne.create_info`. Attributes ---------- From 7810d9ec26080494cd8d8eb1e116fd66af2f69ef Mon Sep 17 00:00:00 2001 From: Eric Larson Date: Tue, 12 May 2020 12:38:29 -0400 Subject: [PATCH 2/2] Update mne/io/meas_info.py Co-authored-by: Daniel McCloy --- mne/io/meas_info.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mne/io/meas_info.py b/mne/io/meas_info.py index ecde5c2e112..0d48a5642c9 100644 --- a/mne/io/meas_info.py +++ b/mne/io/meas_info.py @@ -191,7 +191,9 @@ class Info(dict, MontageMixin): The only entries that should be manually changed by the user are ``info['bads']`` and ``info['description']``. All other entries should - be considered read-only, or should be modified by MNE functions or methods. + be considered read-only, though they can be modified by various MNE-Python + functions or methods (which have safeguards to ensure all fields remain in + sync). This class should not be instantiated directly. To create a measurement information strucure, use :func:`mne.create_info`.