Error with pop_loadcnt uploadingg ANT CNT files. EEGLAB
41 views (last 30 days)
Show older comments
I am currently writing a script that imports a large number of ANT CNT files from a hard drive. However, I am having trouble with the load data function. I have tried using pop_loadcnt(). My code and the error message is shown below.
mainPath ='/Volumes/CARTBINDEEG/CART-BIND_UHN/'; % Main Folder of the data , It is better to use the full path with the drive name
subjects_ID={'001_01','001_02','001_03','003_01','003_02','004_01'}; % ID of the subjects
for i = 1:length(subjects_ID) % A loop for calling all data files from folders
% Set path and select folders
filePath = mainPath; % Set path of the file where the data file exists
fileName = char(append('CBN02_TWH_',subjects_ID(i),'.cnt')); % Set the data name
file = char(append(filePath,fileName));
% Step 1: Load data
% ask forum
EEG = pop_loadcnt(file, 'dataformat', 'auto', 'memmapfile', ''); % load file and Select Electrodes %MARKED
EEG = eeg_checkset( EEG );
% Step 2 : Set EEG name
EEG.setname = fileName;
EEG = eeg_checkset( EEG );
% Step 3 channel locations
EEG = pop_chanedit(EEG, 'lookup','/Users/garylin/Desktop/eeglab2021.1/plugins/dipfit/standard_BEM/elec/standard_1005.elc'); % EEGLAB standard channel locations
EEG = eeg_checkset( EEG );
% Step 4: Downsample the data to 250.
EEG = pop_resample(EEG, 250);
% Save data
savePathfolder='/Users/garylin/Desktop/EEG Datasets/UHN Downsampled'; % Folder for saving the data
EEG = pop_saveset(EEG, append(fileName,'_250') , savePathfolder);
end
0 Comments
Answers (2)
Walter Roberson
on 7 Nov 2021
The file header says that each signal is 28257 long, and that there are 200443239 channels. That would require a file of over 5 petabytes, but instead the file is about 1100 times smaller than that.
The simplest explanation would be if the file is not in a format that is readable by pop_loadcnt
3 Comments
clark ni
on 4 Jan 2024
Hello
Did you end up solving this problem.?
Currently i am facing the same error actually.
0 Comments
See Also
Categories
Find more on EEG/MEG/ECoG in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!