Error with pop_loadcnt uploadingg ANT CNT files. EEGLAB

조회 수: 24 (최근 30일)
Gary Lin
Gary Lin 2021년 11월 7일
답변: clark ni 2024년 1월 4일
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

답변 (2개)

Walter Roberson
Walter Roberson 2021년 11월 7일
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
Have you installed the ANT eeglab plugin ? http://download.ant-neuro.com/matlab/
  댓글 수: 3
Walter Roberson
Walter Roberson 2021년 11월 8일
Sorry, I have never worked with those files.
clark ni
clark ni 2024년 1월 4일
hello!you solved this problem?

댓글을 달려면 로그인하십시오.


clark ni
clark ni 2024년 1월 4일
Hello
Did you end up solving this problem.?
Currently i am facing the same error actually.

카테고리

Help CenterFile Exchange에서 EEG/MEG/ECoG에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by