[Eeglablist] Import SEF

BRITZ Juliane juliane.britz at unifr.ch
Wed May 12 00:08:03 PDT 2021


Dear Mathias,

sure, here's the function - just save it as opensef.m


function 
[numchannels,numtimeframes,samplingrate,thedata]=opensef(openfilename)
% opensef: opens a Cartool simple EEG data file (.sef)
%
% inputs: full path and name of the file to open
%
% outputs: number of channels, number of timeframes and sampling rate as
% 1-D numeric arrays; data as a 2-D numeric array where dimension 1
% contains the timeframes, dimension 2 contains the channels
%
% Cartool: https://urldefense.com/v3/__http://brainmapping.unige.ch/Cartool.htm__;!!Mih3wA!SyGCG9SdEixVuKk-JxxAVX8pciO0PDKzXehnqEdnpZMtEJh9pvD9seH1_uAbs4sLmnGp3w$ 
%
% author of this script: pierre.megevand at medecine.unige.ch


% open filename for reading
fid=fopen(openfilename,'r');

% read fixed part of header
version=strcat(fread(fid,4,'int8=>char')');
numchannels=fread(fid,1,'int32');
numauxchannels=fread(fid,1,'int32');
numtimeframes=fread(fid,1,'int32');
samplingrate=fread(fid,1,'float32');
year=fread(fid,1,'int16');
month=fread(fid,1,'int16');
day=fread(fid,1,'int16');
hour=fread(fid,1,'int16');
minute=fread(fid,1,'int16');
second=fread(fid,1,'int16');
millisecond=fread(fid,1,'int16');

% read variable part of header
channels=strcat(fread(fid,[8,numchannels],'int8=>char')');

% read data
thedata=fread(fid,[numchannels,numtimeframes],'float32')';

% close file
fclose(fid);



Juliane

On 5/11/2021 11:36 AM, Matthias Liebrand via eeglablist wrote:
> Dear eeglablist,
>
> i already searched quite a bit on the internet and couldn't find a solution, so I hope I may pass the question on to you. Does anyone know a way how to import eeg files from the "simple eeg format" (extension: .sef) into eeglab? The format is used/written by the program Cartool, established in Geneva for eeg data processing. I already found out that I can import the .sef into Cartool, then export as .bdf and then import the .bdf-file into eeglab, but this takes quite some time. So I would be very thankful for an option of a direct import into eeglab. BIOSIG and FILE-IO toolboxes unfortunately do not support the .sef-format
>
> Best wishes an many thanks in advance,
> Matthias
> _______________________________________________
> Eeglablist page: http://sccn.ucsd.edu/eeglab/eeglabmail.html
> To unsubscribe, send an empty email to eeglablist-unsubscribe at sccn.ucsd.edu
> For digest mode, send an email with the subject "set digest mime" to eeglablist-request at sccn.ucsd.edu

-- 
_________________________

Dr. Juliane Britz
Lecturer
Department of Psychology
Rue P.-A. Faucigny 2
office RM C-4.110
CH-1700 Fribourg
Switzerland

++41 26 300 7688
juliane.britz at unifr.ch
https://urldefense.com/v3/__http://www.unifr.ch/psycho/staff/britz-juliane__;!!Mih3wA!SyGCG9SdEixVuKk-JxxAVX8pciO0PDKzXehnqEdnpZMtEJh9pvD9seH1_uAbs4t3sKyPcw$ 


Faculty of Science and Medicine
Medicine Section
Department of Neuroscience and Movement Science
Neurology Unit
University of Fribourg
Ch. du Musée 5
CH-1700 Fribourg/Freiburg

+41 (0)26 300 8584 | https://urldefense.com/v3/__http://www.unifr.ch/scimed__;!!Mih3wA!SyGCG9SdEixVuKk-JxxAVX8pciO0PDKzXehnqEdnpZMtEJh9pvD9seH1_uAbs4uegIdAmg$ 
https://urldefense.com/v3/__http://www.unifr.ch/neurology/en/team/britz__;!!Mih3wA!SyGCG9SdEixVuKk-JxxAVX8pciO0PDKzXehnqEdnpZMtEJh9pvD9seH1_uAbs4sjFgjt-A$ 


-- 
This email has been checked for viruses by AVG.
https://urldefense.com/v3/__https://www.avg.com__;!!Mih3wA!SyGCG9SdEixVuKk-JxxAVX8pciO0PDKzXehnqEdnpZMtEJh9pvD9seH1_uAbs4umzzHNpQ$ 




More information about the eeglablist mailing list