[Eeglablist] Comparison STUDY ERSPDATA and ERSPDATA from script

Makoto Miyakoshi mmiyakoshi at ucsd.edu
Wed Oct 19 19:32:35 PDT 2016


Dear Simon,

If results are so clearly different, I would rather doubt if the same
parameters are really used...

But I want you to confirm this first.

> The eegh() history can replicate the plot GUI operation makes, right?

Troubleshooting needs to be done step by step. Particularly, I have never
seen your output plots. I'm like a blinded guy, and what information I have
does not help me much to guess what values and differences you are talking
about.

Makoto

On Tue, Oct 18, 2016 at 6:50 AM, Simon Recherche <
srigoulotresearch at gmail.com> wrote:

> Yes, the difference I found was between time-frequency plot and values in
> matrices obtained from  Arnaud's script on the tutorial
>
> I compared these two methods designed to calculate ERSPs
>
> 1)  only with the GUI. a) I precompute the measures with the default
> parameters b) I plot ERSP of one channel from data of one subject. c) I can
> read all the values of the plot.
>
> 2) only with script. a) I ran the script described in the first email
> (adaptation from Arnaud's script).
>
> The values from the two methods should be similar but it is not the case.
>
>
> In other words, what does std_precomp and how (and why) is it different
> from pop_newtimef ?
>
>
> Thanks,
>
> Simon
>
> On 17 October 2016 at 23:37, Makoto Miyakoshi <mmiyakoshi at ucsd.edu> wrote:
>
>> Dear Simon,
>>
>> > the values I get are completely different from when I use the GUI.
>>
>> > if I want to run a script to get the same results as the ones obtained
>> with the GUI
>>
>> But GUI operation does not return numerical data, right? It just shows a
>> color plot. Judging from this, the difference you found was in
>> time-frequency plot with unit? Sorry I still don't understand the
>> differences you are talking about.
>>
>> The eegh() history can replicate the plot GUI operation makes, right? If
>> it doese not work, let me know.
>>
>> Makoto
>>
>>
>>
>> On Mon, Sep 12, 2016 at 12:28 PM, Simon Recherche <
>> srigoulotresearch at gmail.com> wrote:
>>
>>> They differ in everything, they are not similar or there is no obvious
>>> connection between them.
>>>
>>> Maybe I was not clear:
>>>
>>> When I use the GUI and compute ersp measures with default parameters, I
>>> get ERSP values that I can retrieve with commandlines such as  [STUDY
>>> erspdata ersptimes erspfreqs pgroup pcond pinter] = std_erspplot(STUDY,
>>> ALLEEG,...)
>>>
>>> When I run a script with  pop_newtimef  function (as written in the
>>> previous email) and same parameters, the values I get are completely
>>> different from when I use the GUI.
>>>
>>>
>>> My question could be: if I want to run a script to get the same results
>>> as the ones obtained with the GUI, which function and parameters should I
>>> use ? I thought it was pop_newtimefunction and the aforementioned
>>> parameters but it does not seem to be the case.
>>>
>>> Thanks for the help,
>>>
>>> Simon
>>>
>>> On 9 September 2016 at 17:43, Makoto Miyakoshi <mmiyakoshi at ucsd.edu>
>>> wrote:
>>>
>>>> Dear Simon,
>>>>
>>>> Why don't you tell me more about how the results differ? I appreciate
>>>> your patience.
>>>>
>>>> Makoto
>>>>
>>>> On Thu, Sep 1, 2016 at 11:07 AM, Simon Recherche <
>>>> srigoulotresearch at gmail.com> wrote:
>>>>
>>>>> Hi all,
>>>>>
>>>>> I am trying to compare different methods to get ERSP data from EEGLab.
>>>>>
>>>>>
>>>>> When pre-computing the channel measures for ERSP, I noticed that
>>>>> default parameters are: 'cycles', [3 0.8], 'nfreqs', 100, 'ntimesout', 200
>>>>>
>>>>> I tried to retrieve the same results by adapting Arnaud's script on
>>>>> the tutorial , for one subject and one electrode so it goes faster (see
>>>>> below).
>>>>>
>>>>>
>>>>> clear all
>>>>>
>>>>> clc
>>>>>
>>>>>
>>>>>
>>>>> subject_list = { 'CA20SD'};
>>>>>
>>>>>
>>>>>
>>>>> nsubj = length(subject_list); % number of subjects
>>>>>
>>>>>
>>>>>
>>>>> home_path  = 'D:\EEG_FGX_EEGLab_3\10.ChannelsInterpolated\';
>>>>>
>>>>>
>>>>>
>>>>>         allersp = zeros([100 200 1 nsubj]);
>>>>>
>>>>>         allitc = zeros([ 100 200 1 nsubj]);
>>>>>
>>>>>         allpowbase = zeros([ 1 100 1 nsubj]);
>>>>>
>>>>>         alltimes = zeros([ 1 200 1 nsubj]);
>>>>>
>>>>>         allfreqs = zeros([ 1 100 1 nsubj]);
>>>>>
>>>>>
>>>>>
>>>>> for subj=1:nsubj
>>>>>
>>>>>
>>>>>
>>>>>   % Load dataset
>>>>>
>>>>>         fprintf('\n\n\n**** %subj: Loading dataset ****\n\n\n',
>>>>> subject_list{subj});
>>>>>
>>>>>         EEG = pop_loadset('filename', [subject_list{subj}
>>>>> '_epochs.set'], 'filepath', home_path);
>>>>>
>>>>>
>>>>>
>>>>> % Compute a time-frequency decomposition for every electrode
>>>>>
>>>>> for elec = 77
>>>>>
>>>>> [ersp,itc,powbase,times,freqs,erspboot,itcboot] = pop_newtimef(EEG,
>>>>> 1, elec, [EEG.xmin EEG.xmax]*1000, 'cycles', [3 0.8], 'nfreqs', 100,
>>>>> 'ntimesout', 200, 'plotersp','off', 'plotitc','off');
>>>>>
>>>>>
>>>>>     allersp (:,:,elec,subj) = ersp;
>>>>>
>>>>>     allitc (:,:,elec,subj) = itc;
>>>>>
>>>>>     allpowbase (:,:,elec,subj) = powbase;
>>>>>
>>>>>     alltimes (:,:,elec,subj) = times;
>>>>>
>>>>>     allfreqs (:,:,elec,subj) = freqs;
>>>>>
>>>>> end;
>>>>>
>>>>> end;
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> When I compare the matrix A = ersp(:,:,1,1) with the figure I get with
>>>>> the STUDY GUI (by selecting the proper channel and subjects), I dont have
>>>>> the same results.
>>>>>
>>>>>
>>>>> I tried to look at the std_ersp() function to see if other inputs
>>>>> could help to make calculations similar but I did not find anything.
>>>>>
>>>>>
>>>>>
>>>>> Thanks again,
>>>>>
>>>>>
>>>>> Simon
>>>>>
>>>>> _______________________________________________
>>>>> Eeglablist page: http://sccn.ucsd.edu/eeglab/eeglabmail.html
>>>>> To unsubscribe, send an empty email to eeglablist-unsubscribe at sccn.uc
>>>>> sd.edu
>>>>> For digest mode, send an email with the subject "set digest mime" to
>>>>> eeglablist-request at sccn.ucsd.edu
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Makoto Miyakoshi
>>>> Swartz Center for Computational Neuroscience
>>>> Institute for Neural Computation, University of California San Diego
>>>>
>>>
>>>
>>
>>
>> --
>> Makoto Miyakoshi
>> Swartz Center for Computational Neuroscience
>> Institute for Neural Computation, University of California San Diego
>>
>
>


-- 
Makoto Miyakoshi
Swartz Center for Computational Neuroscience
Institute for Neural Computation, University of California San Diego
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20161019/199f71bb/attachment.html>


More information about the eeglablist mailing list