[Eeglablist] (no subject)
Hilit Serby
hilit at sccn.ucsd.edu
Mon Oct 25 17:09:13 PDT 2004
Hi Eyal,
You can use eeglab to calculate cross coherence, not from the GUI but
from the command line. You can first call it from the GUI with your
desired options (for one combination, and then type h to get the command
line function call ).
However, any call to crossf() / pop_crossf() takes a while (depending on
the amount of data and the resolution you're asking), so better separate
the calculation to few calls, and save the information at the end of
each call.
We don't recommend calculating coherence between channels (see the
tutorial), but you can go a head and do it. Longer time frame will
return more lower frequencies (so better use long time window).
Type help crossf to learn about the possible input and output arguments.
Here is an example:
chans = [ 1 14]; % channels to compare
tlimits = [ -500 1500]; %time window
cycles = [3 0.5]; % wavelet info
%using pop_crossf()
figure; [coh,mcoh,timesout,freqsout,cohboot,cohangles] = ...
pop_crossf( EEG, 1, chans(1), chans(2), tlimits, cycles ,'type',
'phasecoher', ...
'topovec', [chans(1) chans(2)], 'elocs', EEG.chanlocs, 'title', ...
'Channel Phase Coherence', 'alpha',.01,'padratio', 4);
%using crossf()
pointrange1 = round(max((tlimits(1)/1000-EEG.xmin)*EEG.srate, 1));
pointrange2 = round(min((tlimits(2)/1000-EEG.xmin)*EEG.srate, EEG.pnts));
pointrange = [pointrange1:pointrange2];
tmpsig1 = EEG.data(chans(1),pointrange,:);
tmpsig2 = EEG.data(chans(2),pointrange,:);
tmpsig1 = reshape( tmpsig1, 1, size(tmpsig1,2)*size(tmpsig1,3));
tmpsig2 = reshape( tmpsig2, 1, size(tmpsig2,2)*size(tmpsig2,3));
figure;
[coh,mcoh,timesout,freqsout,cohboot,cohangles] = ...
crossf( tmpsig1, tmpsig2, length(pointrange), [tlimits(1) tlimits(2)], ...
EEG.srate, cycles , 'type', 'phasecoher', 'topovec', [chans(1)
chans(2)], ...
'elocs', EEG.chanlocs, 'title','Channel Phase Coherence',
'alpha',.01,'padratio', 4);
This will return the cross coherence between channel 1 and 14, write a
loop to iterate between the different channels.
Good luck,
Hilit.
eballan at study.haifa.ac.il wrote:
>Dear Professors,
>
> My wish is to create a inter-channel event-related coherence map between all
>combinations of 32 electrodes in 40 subjects.
>Can I use the eeglab to do so in a loop so I will not have to calculte 15,000
>combinations. What are the optimal time frames to calculate coherence in 2000ms
>trials? The end point is to create a map with statistically significant cross
>channel coherente signals in all frquency bands (like in most coherence papres).
>Any advise would be of great help.
>
> All the best
>
> Eyal, Neurocognitive lab Haifa University Israel
>
>
>
>
>------------------------------------------------------
>This mail sent through IMP Webmail of Haifa University
>http://webmail.haifa.ac.il
>_______________________________________________
>Eeglablist mailing list Eeglablist at sccn.ucsd.edu
>Eeglablist page: http://www.sccn.ucsd.edu/eeglab/eeglabmail.html
>To unsubscribe, send an empty email to eeglablist-unsub at sccn.ucsd.edu
>To switch to digest mode, send an empty email to eeglablist-digest at sccn.ucsd.edu
>
>
More information about the eeglablist
mailing list