[Eeglablist] STUDY design: spectrum negative power values

Arnaud Delorme arno at ucsd.edu
Wed Dec 12 20:32:43 PST 2012


Dear Andrew,

yes, there was a typo, it should be 10.^(specdata{index}/10) and not 10^(specdata{index}/10).
Sorry about that,

Arno

On 29 Nov 2012, at 23:28, Andrew Hill wrote:

> Arno or any other helpful soul - I'm replying in Christian's thread as I'm trying to do something similar.
> 
> Using the code snippets Arno provided, to convert specdata from log back into amplitude produces this error:
> 
> [STUDY specdata specfreqs] = std_specplot(STUDY, ALLEEG,'channels', ('C3'} , 'plotsubjects','off', 'freqrange', [0.5 40]);
> 
> for index = 1:length(specdata(:));
> specdata{index} = sqrt(10^(specdata{index}/10));
> end;
> 
> ??? Error using ==> mpower
> Inputs must be a scalar and a square matrix.
>  
> 
> My specdata is in a 4x2 cell array of 159 x 25 doubles (holding 159 quarter-hz bins for 25 subjects).
> Is there a different way to call the math against the cell array so that it converts back to amplitude?
> 
> Thanks,
> Andrew
> 
> 
> 
> On Jul 5, 2012, at 9:55 PM, Arnaud Delorme wrote:
> 
>> Dear Christian,
>> 
>> yes, you are getting 10*log10(power) in these plots which is the usual way of visualizing EEG data.
>> You may recuperate the data values on the command line
>> 
>> [STUDY specdata freqs] = std_specplot(STUDY, ALLEEG, 'channels', { 'Cz' });
>> 
>> and convert the data back to absolute power values and visualize the data
>> 
>> for index = 1:length(specdata(:))
>> 	specdata{index} = 10^(specdata{index}/10);
>> end;
>> std_plotcurve(freqs, specdata);
>> 
>> Note, if you want amplitude not power, use instead specdata{index} = 10^(specdata{index}/20); or specdata{index} = sqrt(10^(specdata{index}/10)); which is equivalent.
>> Best,
>> 
>> Arno
>> 
>> On May 7, 2012, at 12:56 AM, Christian Scharinger wrote:
>> 
>>> Dear eeglab users,
>>> 
>>> I use the following code for calculating the spectrum in a STUDY design:
>>> 
>>> [STUDY ALLEEG] = std_precomp(STUDY, ALLEEG, 'channels', 'design', [1], 
>>> 'erp', 'off', 'spec', 'on', 'ersp', 'off', 'specparams', { 'specmode', 
>>> 'psd', 'recompute', 'on', 'timerange', [1300 1800], 'freqfac', [4] }, 
>>> 'savetrials', 'off');
>>> 
>>> STUDY = pop_specparams(STUDY, 'groupstats','on', 'mcorrect','fdr', 
>>> 'threshold',0.05,'plotgroups','together','freqrange',[1 30], 
>>> 'rmsubjmean', 'off');
>>> 
>>> With this code, I'm getting negative power values when I use the 
>>> std_specplot function for plotting (or when I do the plotting via GUI).
>>> 
>>> So I guess I'm not getting absolute power values (what I would like to 
>>> have) but power values in relation to some kind of baseline.
>>> 
>>> Is it possible to get absolute power values for a spectrum in a STUDY 
>>> design?
>>> Where can I see/change what baseline eeglab uses for calculating power 
>>> values?
>>> 
>>> Many thanks in advance,
>>> 
>>> Christian
>>> 
>>> 
>>> 
>>> -- 
>>> Christian Scharinger, M.A.
>>> 
>>> Knowledge Media Research Center (KMRC)
>>> Schleichstraße 6 | 72076 Tuebingen
>>> 
>>> Phone: +49 (0)7071 979-360
>>> Internet: http://www.iwm-kmrc.de/c.scharinger
>>> E-Mail: c.scharinger at iwm-kmrc.de
>>> 
>>> _______________________________________________
>>> 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
>> 
>> _______________________________________________
>> 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
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20121212/b2df9a41/attachment.html>


More information about the eeglablist mailing list