diff --git a/mne/epochs.py b/mne/epochs.py index 8959c9d2f6b..1be88586710 100644 --- a/mne/epochs.py +++ b/mne/epochs.py @@ -133,10 +133,10 @@ def _save_split(epochs, fname, part_idx, n_parts): # undo modifications to data data /= decal[np.newaxis, :, np.newaxis] - write_string(fid, FIFF.FIFFB_MNE_EPOCHS_DROP_LOG, + write_string(fid, FIFF.FIFF_MNE_EPOCHS_DROP_LOG, json.dumps(epochs.drop_log)) - write_int(fid, FIFF.FIFFB_MNE_EPOCHS_SELECTION, + write_int(fid, FIFF.FIFF_MNE_EPOCHS_SELECTION, epochs.selection) # And now write the next file info in case epochs are split on disk @@ -2465,10 +2465,10 @@ def _read_one_epoch_file(f, tree, preload): # Constant 305 was used before v0.11 tag = read_tag(fid, pos) bmax = float(tag.data) - elif kind == FIFF.FIFFB_MNE_EPOCHS_SELECTION: + elif kind == FIFF.FIFF_MNE_EPOCHS_SELECTION: tag = read_tag(fid, pos) selection = np.array(tag.data) - elif kind == FIFF.FIFFB_MNE_EPOCHS_DROP_LOG: + elif kind == FIFF.FIFF_MNE_EPOCHS_DROP_LOG: tag = read_tag(fid, pos) drop_log = json.loads(tag.data) @@ -2508,7 +2508,7 @@ def _read_one_epoch_file(f, tree, preload): tmax = last / info['sfreq'] event_id = (dict((str(e), e) for e in np.unique(events[:, 2])) if mappings is None else mappings) - # In case epochs didn't have a FIFF.FIFFB_MNE_EPOCHS_SELECTION tag + # In case epochs didn't have a FIFF.FIFF_MNE_EPOCHS_SELECTION tag # (version < 0.8): if selection is None: selection = np.arange(len(events)) diff --git a/mne/io/constants.py b/mne/io/constants.py index eedbf4742a2..d71c1a10672 100644 --- a/mne/io/constants.py +++ b/mne/io/constants.py @@ -848,11 +848,11 @@ def __setattr__(self, attr, val): # noqa: D105 FIFF.FIFF_MNE_RT_CLIENT_ID = 3701 # realtime client # MNE epochs bookkeeping -FIFF.FIFFB_MNE_EPOCHS_SELECTION = 3800 # the epochs selection -FIFF.FIFFB_MNE_EPOCHS_DROP_LOG = 3801 # the drop log +FIFF.FIFF_MNE_EPOCHS_SELECTION = 3800 # the epochs selection +FIFF.FIFF_MNE_EPOCHS_DROP_LOG = 3801 # the drop log # MNE annotations -FIFF.FIFFB_MNE_ANNOTATIONS = 3810 # annotations +FIFF.FIFFB_MNE_ANNOTATIONS = 3810 # annotations block # MNE Metadata Dataframes -FIFF.FIFFB_MNE_METADATA = 3811 # metadata dataframes +FIFF.FIFFB_MNE_METADATA = 3811 # metadata dataframes block diff --git a/mne/io/tests/test_constants.py b/mne/io/tests/test_constants.py index 6546c6b352d..c63d950324b 100644 --- a/mne/io/tests/test_constants.py +++ b/mne/io/tests/test_constants.py @@ -139,10 +139,7 @@ def test_constants(tmpdir): elif name.startswith('FIFFB_'): # We put these in the tag section rather than the IOD/block section # -> XXX fix this by moving them to the IOD files in fiff-constants - if name in ('FIFFB_MNE_ANNOTATIONS', - 'FIFFB_MNE_EPOCHS_DROP_LOG', - 'FIFFB_MNE_EPOCHS_SELECTION', - 'FIFFB_MNE_METADATA'): + if name in 'FIFFB_MNE_ANNOTATIONS': assert val in tags continue assert val in iod, (val, name)