Skip to content

Commit

Permalink
Bugfix: BIDS-EEG export: Fix .vmrk/.vhdr file names
Browse files Browse the repository at this point in the history
  • Loading branch information
ftadel committed Feb 14, 2023
1 parent a30eb4d commit c58cec1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions toolbox/process/functions/process_export_bids.m
Original file line number Diff line number Diff line change
Expand Up @@ -524,22 +524,22 @@
elseif isEeg && ~isEegBids
% For EEG-BIDS, only a handful of formats are supported.
% Convert unsupported formats to EDF.
disp(['Warning: Format of file "', sFile.comment, '" is not supported by EEG-BIDS. Converting to BrainAmp EEG/VHDR.']);
disp(['Warning: Format of file "', sFile.comment, '" is not supported by EEG-BIDS. Converting to BrainVision EEG/VHDR.']);
export_data(sInput.FileName, [], newPath, 'EEG-BRAINAMP');
else
% Copy raw data file
file_copy(sFile.filename, newPath);
% Copy BrainAmp meta-data files (.vhdr, .vmrk)
% Copy BrainVision meta-data files (.vhdr, .vmrk)
if strcmp(sFile.format, 'EEG-BRAINAMP')
% Copy header file
VhdrFile = bst_fullfile(rawFolder, [rawName, '.vhdr']);
if file_exist(VhdrFile)
file_copy(VhdrFile, bst_fileparts(newPath));
file_copy(VhdrFile, bst_fullfile(megFolder, [newName, '.vhdr']));
end
% Copy marker file
VmrkFile = bst_fullfile(rawFolder, [rawName, '.vmrk']);
if file_exist(VmrkFile)
file_copy(VmrkFile, bst_fileparts(newPath));
file_copy(VmrkFile, bst_fullfile(megFolder, [newName, '.vmrk']));
end
end
end
Expand Down

0 comments on commit c58cec1

Please sign in to comment.