mne_bids.copyfiles.copyfile_edf#
- mne_bids.copyfiles.copyfile_edf(src, dest, anonymize=None)[source]#
Copy an EDF, EDF+, or BDF file to a new location, optionally anonymize.
Warning
EDF/EDF+/BDF files contain two fields for recording dates: A generic “startdate” field that supports only 2-digit years, and a “Startdate” field as part of the “local recording identification”, which supports 4-digit years. If you want to anonymize your file, MNE-BIDS will set the “startdate” field to 85 (i.e., 1985), the earliest possible date for that field. However, the “Startdate” field in the file’s “local recording identification” and the date in the session’s corresponding
scans.tsv
will be set correctly according to the argument provided to theanonymize
parameter. Note that it is possible that not all EDF/EDF+/BDF reading software parses the accurate recording date, and that for some reading software, the wrong year (1985) may be parsed.- Parameters:
- srcpath-like
The source path of the .edf or .bdf file to be copied.
- destpath-like
The destination path of the .edf or .bdf file.
- anonymize
dict
|None
If None (default), no anonymization is performed. If dict, data will be anonymized depending on the keys provided with the dict: daysback is a required key, keep_his is an optional key.
- daysbackint
Number of days by which to move back the recording date in time. In studies with multiple subjects the relative recording date differences between subjects can be kept by using the same number of daysback for all subject anonymizations. daysback should be great enough to shift the date prior to 1925 to conform with BIDS anonymization rules. Due to limitations of the EDF/BDF format, the year of the anonymized date will always be set to 1985 in the ‘startdate’ field of the file. The correctly-shifted year will be written to the ‘local recording identification’ region of the file header, which may not be parsed by all EDF/EDF+/BDF reader software.
- keep_hisbool
By default (False), all subject information next to the recording date will be overwritten as well. If True, keep subject information apart from the recording date. Participant names and birthdates will always be anonymized if present, regardless of this setting.