[FieldTrip] manipulation of an EDF file

pélagie Temgoua pelagietemgoua at yahoo.fr
Thu Feb 14 14:54:43 CET 2019


Dear community,

My name is Pelagie Temgoua I am Phd student inuniversity of Dschang in Cameroon. In Currently I am analysing EEG data (EDFfile).

I want to read EDf file, choose reference electrode, removeepoch, filter a specify frequency band, compute phase locked value (PLV), phaselag index (PLI) and directed function transfert (DTF). 

Draw adjacency matrix and graph of PLV, PLI, DTF.After, I want to compute density, strength and degree of each matrix.

 

Now, I have this code:

%read data begin

% cfg = [];

% cfg.dataset = 'h01.edf';

% data = ft_preprocessing(cfg);

%read data end 

 

%cleaning data begin. Use artifacts

% cfg          = [];

% cfg.method   = 'trial';

% cfg.alim     = 5e-5;%280e-16;

% clean_data        =ft_rejectvisual(cfg,data);

%cleaning data end 

%30s epoch begin.

 

 

 

cfg = [];

cfg.dataset                 = 'h01.edf';

cfg.trialfun                = 'ft_trialfun_general'; % this is the default

cfg.trialdef.eventtype      = 'backpanel trigger';

% cfg.trialdef.eventvalue     = 3;% the value of the stimulus trigger for fully incongruent (FIC).

% cfg.trialdef.prestim        = 1;% in seconds

% cfg.trialdef.poststim       = 2;% in seconds

cfg.trialdef.triallength = 10;

cfg.trialdef.ntrials     = 3;

cfg = ft_definetrial(cfg);

 

cfg.memory = 'high';

cfg.artfctdef.reject = 'complete';

%[cfg, artifact_EOG] = ft_artifact_zvalue(cfg);

 

 

%cfg.artfctdef.eog.artifact =artifact_EOG;

% cfg.artfctdef.jump.artifact = artifact_jump;

% cfg.artfctdef.muscle.artifact = artifact_muscle;

cfg = ft_rejectartifact(cfg); 

 

 

%cfg.trialfun  ='ft_trialfun_general'; % this is the default

% cfg.trialdef.eventtype  = '?';

% %cfg.padding      = 30;

% cfg.trialdef.triallength = 10;

% cfg.trialdef.ntrials     = 3;

% cfg = ft_definetrial(cfg);

%filter data begin

cfg.continuous   = 'yes';

cfg.channel = 'EEG';

cfg.bsfilter      = 'yes';

cfg.bsfreq = [8 12];

data = ft_preprocessing(cfg);

%filter data end

%plot(data.time{1}, data.trial{1}(10,:))

 

cfg              = [];

cfg.output       = 'pow';

cfg.channel      = 'EEG';

cfg.method       = 'mtmconvol';

cfg.taper        = 'hanning';

cfg.foi          = 8:12;

cfg.t_ftimwin    =7./cfg.foi;  % 7 cycles per time window

cfg.toi          = -0.5:0.05:1.5;

TFRhann7 = ft_freqanalysis(cfg, data);

 

cfg              = [];

cfg.baseline     = [-0.5 -0.1];

cfg.baselinetype = 'absolute';

cfg.maskstyle    = 'saturation';

cfg.zlim         = [-3e-27 3e-27];

cfg.channel      = 'EEG';

cfg.interactive  = 'no';

%figure

%ft_singleplotTFR(cfg, TFRhann7);

 

cfg = [];

cfg.method      = 'plv';

plv = ft_connectivityanalysis(cfg, TFRhann7 );

%figure

%ft_singleplotTFR(cfg, plv);

 

And I don’t know how I can continue.

I need help please.

Best,




Pélagie Flore TEMGOUA NANFACK
pelagietemgoua at gmail.com/pelagietemgoua at yahoo.fr
Tél : (00237) 675 39 66 33/ 696 20 51 02








-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20190214/ed02a26b/attachment-0001.html>
-------------- next part --------------
_______________________________________________
fieldtrip mailing list
https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
https://doi.org/10.1371/journal.pcbi.1002202


More information about the fieldtrip mailing list