mne.io.anonymize_info¶
- mne.io.anonymize_info(info, daysback=None, keep_his=False, verbose=None)[source]¶
Anonymize measurement information in place.
Warning
If
info
is part of an object likeraw.info
, you should directly use the methodraw.anonymize()
to ensure that all parts of the data are anonymized and stay synchronized (e.g.,raw.annotations
).- Parameters
- info
mne.Info
The
mne.Info
object with information about the sensors and methods of measurement.- daysback
int
|None
Number of days to subtract from all dates. If
None
(default), the acquisition date,info['meas_date']
, will be set toJanuary 1ˢᵗ, 2000
. This parameter is ignored ifinfo['meas_date']
isNone
(i.e., no acquisition date has been set).- keep_hisbool
If
True
,his_id
ofsubject_info
will not be overwritten. Defaults toFalse
.Warning
This could mean that
info
is not fully anonymized. Use with caution.- verbosebool |
str
|int
|None
Control verbosity of the logging output. If
None
, use the default verbosity level. See the logging documentation andmne.verbose()
for details. Should only be passed as a keyword argument.
- info
- Returns
- infoinstance of
Info
The anonymized measurement information.
- infoinstance of
Notes
Removes potentially identifying information if it exists in
info
. Specifically for each of the following we use:- meas_date, file_id, meas_id
A default value, or as specified by
daysback
.
- subject_info
Default values, except for ‘birthday’ which is adjusted to maintain the subject age.
- experimenter, proj_name, description
Default strings.
- utc_offset
None
.
- proj_id
Zeros.
- proc_history
Dates use the
meas_date
logic, and experimenter a default string.
- helium_info, device_info
Dates use the
meas_date
logic, meta info uses defaults.
If
info['meas_date']
isNone
, it will remainNone
during processing the above fields.Operates in place.