Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

follow up: allow copyfile_brainvision to work with .dat extension #1010

Merged
merged 5 commits into from
Jun 1, 2022
Merged
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
8 changes: 8 additions & 0 deletions mne_bids/copyfiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,14 @@ def copyfile_brainvision(vhdr_src, vhdr_dest, anonymize=None, verbose=None):
# extract encoding from brainvision header file, or default to utf-8
enc = _get_brainvision_encoding(vhdr_src)

# raise warning if binary file has .dat extension
if '.dat' in eeg_file_path:
warn("The file extension of your binary EEG data file is .dat, while "
"the expected extension for raw data is .eeg. "
"This might imply it's preprocessed or processed data: "
"We copied the files and changed the extension to .eeg, "
"but please ensure that this is actually BIDS compatible data!")

# Copy data .eeg/.dat ... no links to repair
sh.copyfile(eeg_file_path, fname_dest + '.eeg')

Expand Down