Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion doc/whats_new.rst
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,8 @@ API

- Channels with unknown locations are now assigned position ``[np.nan, np.nan, np.nan]`` instead of ``[0., 0., 0.]``, by `Eric Larson`_

- Unknown measurement dates are now stored as ``info['meas_date'] = None`` rather than using the current date. ``None`` is also now used when anonymizing data and when determining the machine ID for writing files, by `Mainak Jas`_ and `Eric Larson`_

- :meth:`mne.Evoked.plot` will now append the number of epochs averaged for the evoked data in the first plot title, by `Eric Larson`_

- Changed the line width in :func:`mne.viz.plot_bem` from 2.0 to 1.0 for better visibility of underlying structures, by `Eric Larson`_
Expand All @@ -201,7 +203,7 @@ API

- Added ``clean_names=False`` parameter to :func:`mne.io.read_raw_ctf` for control over cleaning of main channel names and compensation channel names from CTF suffixes by `Oleh Kozynets`_

- The functions ``lcmv``, ``lcmv_epochs``, and ``lcmv_raw`` are now deprecated in favor of :func:`mne.beamformer.make_lcmv` and :func:`mne.beamformer.apply_lcmv`, :func:`mne.beamformer.apply_lcmv_epochs`, and :func:`mne.beamformer.apply_lcmv_raw`, by `Britta Westner`_
- The functions ``lcmv``, ``lcmv_epochs``, and ``lcmv_raw`` are now deprecated in favor of :func:`mne.beamformer.make_lcmv` and :func:`mne.beamformer.apply_lcmv`, :func:`mne.beamformer.apply_lcmv_epochs`, and :func:`mne.beamformer.apply_lcmv_raw`, by `Britta Westner`_

- The functions ``mne.beamformer.dics``, ``mne.beamformer.dics_epochs`` and ``mne.beamformer.dics_source_power`` are now deprecated in favor of :func:`mne.beamformer.make_dics`, :func:`mne.beamformer.apply_dics`, and :func:`mne.beamformer.apply_dics_csd`, by `Marijn van Vliet`_

Expand Down
23 changes: 10 additions & 13 deletions mne/io/meas_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
from .write import (start_file, end_file, start_block, end_block,
write_string, write_dig_points, write_float, write_int,
write_coord_trans, write_ch_info, write_name_list,
write_julian, write_float_matrix)
write_julian, write_float_matrix, DATE_NONE)
from .proc_history import _read_proc_history, _write_proc_history
from ..transforms import _to_const
from ..transforms import invert_transform
Expand Down Expand Up @@ -1222,14 +1222,14 @@ def read_meas_info(fid, tree, clean_bads=False, verbose=None):
info['meas_id'] = meas_info['id']
else:
info['meas_id'] = meas_info['parent_id']

info['experimenter'] = experimenter
info['description'] = description
info['proj_id'] = proj_id
info['proj_name'] = proj_name

if meas_date is None:
meas_date = [info['meas_id']['secs'], info['meas_id']['usecs']]
if np.array_equal(meas_date, DATE_NONE):
meas_date = None
info['meas_date'] = meas_date

info['sfreq'] = sfreq
Expand Down Expand Up @@ -1748,7 +1748,6 @@ def create_info(ch_names, sfreq, ch_types=None, montage=None, verbose=None):
raise ValueError('ch_types and ch_names must be the same length '
'(%s != %s)' % (len(ch_types), nchan))
info = _empty_info(sfreq)
info['meas_date'] = np.array([0, 0], np.int32)
for ci, (name, kind) in enumerate(zip(ch_names, ch_types)):
if not isinstance(name, string_types):
raise TypeError('each entry in ch_names must be a string')
Expand Down Expand Up @@ -1874,13 +1873,11 @@ def anonymize_info(info):
raise ValueError('self must be an Info instance.')
if info.get('subject_info') is not None:
del info['subject_info']
info['meas_date'] = [0, 0]
for key_1 in ('file_id', 'meas_id'):
key = info.get(key_1)
if key is None:
continue
for key_2 in ('secs', 'msecs', 'usecs'):
if key_2 not in key:
continue
info[key_1][key_2] = 0
info['meas_date'] = None
for key in ('file_id', 'meas_id'):
value = info.get(key)
if value is not None:
assert 'msecs' not in value
value['secs'] = DATE_NONE[0]
value['usecs'] = DATE_NONE[1]
return info
Loading