Skip to content

meas_date is guessed during I/O when it is None #7067

@jasmainak

Description

@jasmainak

It seems that the meas_date is not saved / read in correctly. There seems to be a regression of issue #4949 with latest master. Here is the code to reproduce:

import os.path as op

import mne
from mne.datasets import testing

data_path = testing.data_path()
raw_fname = op.join(data_path, 'MEG', 'sample',
                    'sample_audvis_trunc_raw.fif')

raw = mne.io.read_raw_fif(raw_fname)
raw.info['meas_date'] = None
raw.save('temp.fif')

raw2 = mne.io.read_raw_fif('temp.fif')
assert raw2.info['meas_date'] is None

I discovered this while working on mne-tools/mne-bids#290

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions