<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:36.0pt;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:"Consolas",serif;
        mso-fareast-language:EN-GB;}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#2E74B5;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:1889874412;
        mso-list-type:hybrid;
        mso-list-template-ids:1856011164 134807567 134807577 134807579 134807567 134807577 134807579 134807567 134807577 134807579;}
@list l0:level1
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level2
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level3
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level4
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level5
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level6
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level7
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level8
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level9
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
ol
        {margin-bottom:0cm;}
ul
        {margin-bottom:0cm;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-GB" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#2E74B5;mso-fareast-language:EN-US">Hi Alexandra,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#2E74B5;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#2E74B5;mso-fareast-language:EN-US">Let’s take your issues one by one:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#2E74B5;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoListParagraph" style="text-indent:-18.0pt;mso-list:l0 level1 lfo1"><![if !supportLists]><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#2E74B5;mso-fareast-language:EN-US"><span style="mso-list:Ignore">1.<span style="font:7.0pt "Times New Roman"">      
</span></span></span><![endif]><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#2E74B5;mso-fareast-language:EN-US">I strongly suggest not to use any EEGLAB plugin (eg. PREP pipeline) without verifying the results as from my personal experience
 I found no significant improvement using PREP pipeline.<o:p></o:p></span></p>
<p class="MsoListParagraph" style="text-indent:-18.0pt;mso-list:l0 level1 lfo1"><![if !supportLists]><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#2E74B5;mso-fareast-language:EN-US"><span style="mso-list:Ignore">2.<span style="font:7.0pt "Times New Roman"">      
</span></span></span><![endif]><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#2E74B5;mso-fareast-language:EN-US">There is no point in interpolating the bad channels without cleaning the data first.<o:p></o:p></span></p>
<p class="MsoListParagraph" style="text-indent:-18.0pt;mso-list:l0 level1 lfo1"><![if !supportLists]><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#2E74B5;mso-fareast-language:EN-US"><span style="mso-list:Ignore">3.<span style="font:7.0pt "Times New Roman"">      
</span></span></span><![endif]><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#2E74B5;mso-fareast-language:EN-US">The rank reduction is generally happen when you reject certain ICA components.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#2E74B5;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#2E74B5;mso-fareast-language:EN-US">If you want to follow my pipeline to clean the high density EEG data, here it is:<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt;font-family:"Courier New";mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt;font-family:"Courier New";mso-fareast-language:EN-US">1. Remove bad chuncks(epoches)using visual inspection.
<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt;font-family:"Courier New";mso-fareast-language:EN-US">3. BandPass and notch/cleanline.<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt;font-family:"Courier New";mso-fareast-language:EN-US">4. Select bad channels by kurtosis(5%) and/or proablity(5%).<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt;font-family:"Courier New";mso-fareast-language:EN-US">5. ICA using binica with good channels only.<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt;font-family:"Courier New";mso-fareast-language:EN-US">6. Remove the bad components by spectral plots and component activation plots (automatically or manually).<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt;font-family:"Courier New";mso-fareast-language:EN-US">7. Interpolate the Bad channels sherical spline method.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#2E74B5;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#2E74B5;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#2E74B5;mso-fareast-language:EN-US">Best,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#2E74B5;mso-fareast-language:EN-US">Dheeraj<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#2E74B5;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#2E74B5;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#2E74B5;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#2E74B5;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#2E74B5;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#2E74B5;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#2E74B5;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal">I realise this is a popular question but I am really uncertain what happens to my data in my preprocessing pipeline. I am quite new to ICA/PCA decomposition.<br>
<br>
First, the raw data are run through the PREP pipeline (in EEGLAB 13.5.4b), including the (spherical) interpolation of noisy channels.<br>
<br>
Then after rejection of very noisy epochs I run ICA (for identification of artefact components) with EEG = pop_runica(EEG,'extended',1) %this is somebody else's code that I am re-using.<br>
(Minor question: At this point I do not baseline correct each epoch, is this recommended?)<br>
<br>
I get the info: "Data rank (115) is smaller than the number of channels (128).  Input data size [115,525723] = 115 channels, 525723 frames/nAfter PCA dimension reduction,<br>
finding 115 ICA components using extended ICA."<br>
<br>
Here is where I am losing track. For this example, there are 116 non-interpolated channels and the data set was re-referenced to common reference before ICA.<br>
So I guess this might be behind the rank reduction, although I am not sure how runica knows about this (where is such information retrieved?)<br>
<br>
What precisely is used as the input data now? Any first 115 channels or only the non-interpolated channels?<br>
What happens when the resulting (clean) components are projected back onto channel space if some of the channels are not actually included in the data set used to calculate the components?<br>
<br>
Many thanks in advance,<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#2E74B5;mso-fareast-language:EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#2E74B5;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#2E74B5;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif"> James Jones-Rounds [mailto:jj324@cornell.edu]
<br>
<b>Sent:</b> 17 August 2016 17:44<br>
<b>To:</b> EEGLAB List <eeglablist@sccn.ucsd.edu><br>
<b>Cc:</b> a.vossen.1@research.gla.ac.uk<br>
<b>Subject:</b> Re: [Eeglablist] ICA after PREP pipeline incl channel interpolation<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">Hi Alexandra,<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">My understanding (I'm not an expert in ICA, specifically, but I've been using it for years), is that all your channels will be fed into ICA, and backprojecting components into channel space will do that projection onto all the 128 channels.
 So even though you interpolated some bad channels pre-ICA, all the channels get used. The rank reduction, in my crude understanding, means that the ICA will take the 128 channels but will only look for 115 unique components, because it's assuming that the
 interpolated channels are not unique sources of data (since they're now based on neighboring channels). So I wouldn't worry too much, but that's just my two cents.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">James<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">On Wed, Aug 17, 2016 at 12:34 PM, <<a href="mailto:eeglablist-request@sccn.ucsd.edu" target="_blank">eeglablist-request@sccn.ucsd.edu</a>> wrote:<o:p></o:p></p>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<p class="MsoNormal">Send eeglablist mailing list submissions to<br>
        <a href="mailto:eeglablist@sccn.ucsd.edu">eeglablist@sccn.ucsd.edu</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
        <a href="https://sccn.ucsd.edu/mailman/listinfo/eeglablist" target="_blank">
https://sccn.ucsd.edu/mailman/listinfo/eeglablist</a><br>
or, via email, send a message with subject or body 'help' to<br>
        <a href="mailto:eeglablist-request@sccn.ucsd.edu">eeglablist-request@sccn.ucsd.edu</a><br>
<br>
You can reach the person managing the list at<br>
        <a href="mailto:eeglablist-owner@sccn.ucsd.edu">eeglablist-owner@sccn.ucsd.edu</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of eeglablist digest..."<br>
<br>
Today's Topics:<br>
<br>
   1. ICA after PREP pipeline incl channel interpolation<br>
      (Alexandra Yvonne Vossen)<br>
   2. EEG neurofeedback for emotion (Amin Dehghani)<br>
   3. Fwd: Units in output of timefreq - wavelet normalization<br>
      (Norman Forschack)<br>
   4. Automation (Mike Urich)<br>
   5. Re: problem in BCILAB-1.1 version (brian baloch) (Alex Abe)<br>
<br>
<br>
---------- Forwarded message ----------<br>
From: Alexandra Yvonne Vossen<br>
To: "<a href="mailto:eeglablist@sccn.ucsd.edu">eeglablist@sccn.ucsd.edu</a>" <<a href="mailto:eeglablist@sccn.ucsd.edu">eeglablist@sccn.ucsd.edu</a>><br>
Cc: <br>
Date: Tue, 16 Aug 2016 17:18:01 +0100<br>
Subject: [Eeglablist] ICA after PREP pipeline incl channel interpolation<br>
<br>
Dear all,<br>
<br>
I realise this is a popular question but I am really uncertain what happens to my data in my preprocessing pipeline. I am quite new to ICA/PCA decomposition.<br>
<br>
First, the raw data are run through the PREP pipeline (in EEGLAB 13.5.4b), including the (spherical) interpolation of noisy channels.<br>
<br>
Then after rejection of very noisy epochs I run ICA (for identification of artefact components) with EEG = pop_runica(EEG,'extended',1) %this is somebody else's code that I am re-using.<br>
(Minor question: At this point I do not baseline correct each epoch, is this recommended?)<br>
<br>
I get the info: "Data rank (115) is smaller than the number of channels (128).  Input data size [115,525723] = 115 channels, 525723 frames/nAfter PCA dimension reduction,<br>
finding 115 ICA components using extended ICA."<br>
<br>
Here is where I am losing track. For this example, there are 116 non-interpolated channels and the data set was re-referenced to common reference before ICA.<br>
So I guess this might be behind the rank reduction, although I am not sure how runica knows about this (where is such information retrieved?)<br>
<br>
What precisely is used as the input data now? Any first 115 channels or only the non-interpolated channels?<br>
What happens when the resulting (clean) components are projected back onto channel space if some of the channels are not actually included in the data set used to calculate the components?<br>
<br>
Many thanks in advance,<br>
<br>
<br>
Alexandra Vossen<br>
PhD student<br>
School of Psychology<br>
College of Science & Engineering<br>
University of Glasgow<br>
<br>
<br>
---------- Forwarded message ----------<br>
From: Amin Dehghani <<a href="mailto:dehghani@ut.ac.ir">dehghani@ut.ac.ir</a>><br>
To: <<a href="mailto:eeglablist@sccn.ucsd.edu">eeglablist@sccn.ucsd.edu</a>><br>
Cc: <br>
Date: Tue, 16 Aug 2016 10:17:30 +0430<br>
Subject: [Eeglablist] EEG neurofeedback for emotion<o:p></o:p></p>
<div>
<p><span style="font-size:10.0pt;font-family:"Tahoma",sans-serif">Dear all<o:p></o:p></span></p>
<p><span style="font-size:10.0pt;font-family:"Tahoma",sans-serif"> <o:p></o:p></span></p>
<p><span style="font-size:10.0pt;font-family:"Tahoma",sans-serif">I want to do some process of EEG neurofeedback for emotion regulation, if you can help me and give me data, I will appreciate you.<o:p></o:p></span></p>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Tahoma",sans-serif">--
<o:p></o:p></span></p>
<pre>Best Regard<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>Amin Dehghani<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>EE Dept./ University of Tehran<o:p></o:p></pre>
</div>
</div>
<p class="MsoNormal"><br>
<br>
---------- Forwarded message ----------<br>
From: Norman Forschack <<a href="mailto:forschack@cbs.mpg.de">forschack@cbs.mpg.de</a>><br>
To: eeglablist <<a href="mailto:eeglablist@sccn.ucsd.edu">eeglablist@sccn.ucsd.edu</a>><br>
Cc: <br>
Date: Tue, 16 Aug 2016 15:14:32 +0200<br>
Subject: [Eeglablist] Fwd: Units in output of timefreq - wavelet normalization<br>
Dear all,<br>
<br>
below I forward a comment of Mike Cohen discussing wavelet normalization. He said, he will also upload a new lecturelet about the very topic on to his server probably by the end of the weekend.<br>
<br>
Best<br>
Norman<br>
<br>
----- Forwarded Message -----<br>
From: "Mike X Cohen" <<a href="mailto:mikexcohen@gmail.com">mikexcohen@gmail.com</a>><br>
To: <a href="mailto:forschack@cbs.mpg.de">forschack@cbs.mpg.de</a><br>
Sent: Montag, 15. August 2016 19:43:01<br>
Subject: Fwd: [Eeglablist] Units in output of timefreq - wavelet normalization<br>
<br>
<br>
<br>
<br>
<br>
Dear Norman,<br>
<br>
<br>
I'm not on the eeglab list, but someone just forwarded this message to me, so I thought I'd add a few more cents to the pot. Feel free to forward this message to the eeglab list.<br>
<br>
<br>
In general, wavelet normalization in the time domain is an extremely difficult problem. It depends on many factors, including the frequency, the width of the Gaussian, the number of time points, and even the sampling rate. It is quite remarkable that everyone
 has gotten it wrong (mea culpa -- I didn't work through this issue in my book, so it's wrong in there as well). That factor of "A" that people often use comes from a normalization of the integral and simply doesn't translate to our sampled digital analysis
 environment. I think it hasn't been a huge problem because most people apply a baseline normalization (dB or percent change), so then the original scale doesn't matter.<br>
<br>
<br>
Anyway, the solution is surprisingly simple: Normalize the wavelet energy in the frequency domain, not in the time domain. For wavelet convolution, it would work something like this:<br>
<br>
<br>
cmwX = fft(cmw,nConv); % nConvolution-point FFT, assume 'cmw' is a complex Morlet wavelet<br>
<br>
cmwX = cmwX./max(cmwX); % normalize to max-1 spectral energy<br>
dataX = fft(data,nConv); % nConvolution-point FFT<br>
convolution_result = ifft( dataX.*cmwX ); % convolution result<br>
<br>
<br>
The power and real part of the convolution result now has the same units as the original signal (e.g., microvolts). If you want to have the time-domain Morlet wavelet, you could take the ifft of cmwX (using nfft according to the wavelet, not according to N+M-1
 for convolution).<br>
<br>
<br>
Hope that helps,<br>
Mike<br>
<br>
<br>
<br>
<br>
---------- Forwarded message ----------<br>
From: Norman Forschack < <a href="mailto:forschack@cbs.mpg.de">forschack@cbs.mpg.de</a> ><br>
Date: Mon, Aug 15, 2016 at 6:19 PM<br>
Subject: Re: [Eeglablist] Units in output of timefreq - wavelet normalization<br>
To: Andreas Widmann < <a href="mailto:widmann@uni-leipzig.de">widmann@uni-leipzig.de</a> ><br>
Cc: eeglablist < <a href="mailto:eeglablist@sccn.ucsd.edu">eeglablist@sccn.ucsd.edu</a> ><br>
<br>
<br>
Dear all,<br>
<br>
I'd like to contribute from the perspective of a discussion on Mike Cohen's Blog.<br>
<br>
The initial question was, how to obtain an amplitude envelope of a given signal which has in fact the same amplitude as the given signal, right?<br>
So coming from Nicos signal:<br>
<br>
clear all<br>
D = 4; % total signal duration in seconds.<br>
sigD = 1; % duration of the test oscillation within the signal.<br>
F = 10; % frequency of the test oscillationin Hz.<br>
P = .25; % Phase of the test oscillation. 2 pi radians = 360 degrees<br>
srate = 256; % sampling rate, i.e. N points per sec used to represent sine wave.<br>
T = 1/srate; % sampling period, i.e. for this e.g. points at 1 ms intervals<br>
time = T:T:D; % time vector.<br>
<br>
sigpoints = length(time)/2 - (sigD*srate)/2:(length(time)/2 + (sigD*srate)/2)-1;<br>
mysig = zeros(1,D*srate);<br>
mysig(sigpoints) = sin(2*F*time(sigpoints)*pi+ 2*pi*P);<br>
<br>
one way to obtain equal amplitudes is to normalize the wavelet by its maximal value within the frequency domain:<br>
<br>
% some preparations<br>
mysig = mysig';<br>
ss = size(mysig);<br>
cycles = 4;<br>
dt = 1/srate;<br>
sf = F/cycles;<br>
s = 1./(2*pi*sf);<br>
t = (-4*s:dt:4*s)';<br>
nM = length(t);<br>
halfMsiz = (nM-1)/2;<br>
hz = linspace(0,srate/2,floor(nM/2)+1);<br>
Ly = ss(1)*ss(2)+nM-1;<br>
Ly2=pow2(nextpow2(ss(1)*ss(2)+nM-1));<br>
<br>
% fft of signal<br>
X=fft(reshape(mysig,ss(1)*ss(2),1), Ly2);<br>
<br>
% building morlet wavelet (without a normalization factor)<br>
m = exp(-t.^2/(2*s^2)).*exp(1i*2*pi*F.*t);<br>
H = fft(m,Ly2); % fft of wavelet<br>
<br>
% normalize wavelet spectrum<br>
H = H./max(H);<br>
<br>
y = ifft(X.*H,Ly2);<br>
y = y(floor(halfMsiz+1):Ly-ceil(halfMsiz));<br>
y_amp = 2* abs(y);<br>
<br>
figure; plot(time,mysig,'b',time,y_amp,'r')<br>
<br>
This seems to work for any combination of srate and cycles (except when number of cycles become large) because the signal spectrum is convolved by spectral wavelet values being maximally one.<br>
<br>
I have not fully worked my way through Andreas' example. It normalizes the wavelet in time, not in frequency domain as here. So it is probably not comparable.<br>
But doing time domain normalization within the lines above by just replacing the kernel formula:<br>
<br>
m = exp(-t.^2/(2*s^2)).*exp(1i*2*pi*F.*t) ./ sqrt(srate); % unit energy<br>
<br>
and commenting out the max(H) normalization, however, yields an amplitude envelope which is 2.5 times larger than the original signal amplitude and increases when the number of wavelet cycles is increased. But as Andreas suggestion referred to the dftfilt3
 output, the matter becomes more complicated as this function uses it's own normalization factor:<br>
A = 1./sqrt(s*sqrt(pi));<br>
and there are problably some more relevant differences (not even going into the timefreq function).<br>
<br>
In sum, this post may have fostered the general confusion (or at least mine) but for a more puristic approach to the matter of wavelet normalization, the lines above might be of some value (kudos to mike x cohen, of course).<br>
<br>
All the best<br>
Norman<br>
<br>
<br>
<br>
<br>
----- On Aug 12, 2016, at 6:06 PM, Andreas Widmann <a href="mailto:widmann@uni-leipzig.de">
widmann@uni-leipzig.de</a> wrote:<br>
<br>
> Dear Niko,<br>
><br>
> I’m puzzled by this difference since a long time too (and as you have written a<br>
> book chapter on WT actually I would have hoped you could help resolving this<br>
> issue ;).<br>
><br>
> (Morlet) wavelet normalization always appeared somewhat arbitrary to me (as<br>
> signal amplitude will never be directly reflected across the whole TF plane for<br>
> peaky spectra/time courses). To my understanding the most common normalization<br>
> for wavelets is unit energy (and Gabor). The help text for timefreq states that<br>
> dftfilt3 is "exact Tallon Baudry“. TB (1998, JNeurosci) states that "Wavelets<br>
> were normalized so that their total energy was 1,…“.<br>
><br>
> The wavelets produced by dftfilt3 appear to always have an energy of srate (thus<br>
> they are *not* unit energy normalized?!):<br>
> [wavelet,cycles,freqresol,timeresol] = dftfilt3(F, ncycles, srate);<br>
> E = sum( abs( wavelet{ 1 } ) .^ 2 )<br>
> Consequently, to my understanding the correct „normfactor“ should be sqrt( E )<br>
> or better sqrt( srate ).<br>
><br>
> You might want to confirm by looking at the TF transform of the (real part of<br>
> the) wavelet itself<br>
> wavelet{ 1 } = wavelet{ 1 } / sqrt( srate ); % Unit energy normalize<br>
> mysig = zeros(1,D*srate);<br>
> delay = ceil( ( length( mysig ) - length( wavelet{ 1 } ) ) / 2 );<br>
> mysig( delay:delay + length( wavelet{ 1 } ) - 1 ) = real( wavelet{ 1 } ) * 2;<br>
> % Discard imag part<br>
> normfactor = sqrt( srate );<br>
> which should now have a peak amplitude of 1 (independent of sampling rate and<br>
> signal duration).<br>
><br>
> As the issue appears to be not only in EEGLAB but also other implementations, I<br>
> always assumed my reasoning to be incorrect. Is it? What am I missing?<br>
><br>
> Best,<br>
> Andreas<br>
><br>
>> Am 10.08.2016 um 11:58 schrieb Niko Busch < <a href="mailto:niko.busch@gmail.com">
niko.busch@gmail.com</a> >:<br>
>><br>
>> Dear Makoto (and everyone who replied to me personally regarding this post),<br>
>><br>
>> thank you for your reply! I see that the result of the wavelet transform inside<br>
>> the timefreq function is dependent on the length of the signal, which in turn<br>
>> is dependent on the number of cycles and sampling rate. However, simply<br>
>> dividing by the length of the wavelet does not seem to be the solution either.<br>
>> I modified the code below by including a "normalization factor", which<br>
>> currently is simply the length of the wavelet. Dividing the wavelet transformed<br>
>> amplitudes by this factor gives the right order of magnitude, but the results<br>
>> are still quite off. By increasing the sampling rate or number of cycles, the<br>
>> results are even more off. I believe we are on the right track, but something<br>
>> is still missing. Do you have any ideas?<br>
>><br>
>> Cheers,<br>
>> Niko<br>
>><br>
>> %% Create sine wave<br>
>> clear all<br>
>> D = 4; % total signal duration in seconds.<br>
>> sigD = 1; % duration of the test oscillation within the signal.<br>
>> F = 10; % frequency of the test oscillationin Hz.<br>
>> P = .25; % Phase of the test oscillation. 2 pi radians = 360 degrees<br>
>> srate = 256; % sampling rate, i.e. N points per sec used to represent sine wave.<br>
>> T = 1/srate; % sampling period, i.e. for this e.g. points at 1 ms intervals<br>
>> t = [T:T:D]; % time vector.<br>
>><br>
>> sigpoints = length(t)/2 - (sigD*srate)/2:(length(t)/2 + (sigD*srate)/2)-1;<br>
>> mysig = zeros(1,D*srate);<br>
>> mysig(sigpoints) = sin(2*F*t(sigpoints)*pi+ 2*pi*P);<br>
>><br>
>> %% TF computation<br>
>> ncycles = 4;<br>
>><br>
>> [wavelet,cycles,freqresol,timeresol] = dftfilt3(F, ncycles, srate);<br>
>> normfactor = length(wavelet{1});<br>
>><br>
>> [tf, outfreqs, outtimes] = timefreq(mysig', srate, ...<br>
>> 'cycles', ncycles, 'wletmethod', 'dftfilt3', 'freqscale', 'linear', ...<br>
>> 'freqs', F);<br>
>><br>
>> %% Plot<br>
>> figure; hold all<br>
>> plot(t,mysig);<br>
>> plot(outtimes./1000,abs(tf)./normfactor)<br>
>> xlabel('Time (seconds)');<br>
>> ylabel('Amplitude');<br>
>> legend('input signal', 'wavelet result')<br>
>><br>
>> _______________________________________________<br>
>> Eeglablist page: <a href="http://sccn.ucsd.edu/eeglab/eeglabmail.html" target="_blank">
http://sccn.ucsd.edu/eeglab/eeglabmail.html</a><br>
>> To unsubscribe, send an empty email to <a href="mailto:eeglablist-unsubscribe@sccn.ucsd.edu">
eeglablist-unsubscribe@sccn.ucsd.edu</a><br>
>> For digest mode, send an email with the subject "set digest mime" to<br>
>> <a href="mailto:eeglablist-request@sccn.ucsd.edu">eeglablist-request@sccn.ucsd.edu</a><br>
><br>
> _______________________________________________<br>
> Eeglablist page: <a href="http://sccn.ucsd.edu/eeglab/eeglabmail.html" target="_blank">
http://sccn.ucsd.edu/eeglab/eeglabmail.html</a><br>
> To unsubscribe, send an empty email to <a href="mailto:eeglablist-unsubscribe@sccn.ucsd.edu">
eeglablist-unsubscribe@sccn.ucsd.edu</a><br>
> For digest mode, send an email with the subject "set digest mime" to<br>
> <a href="mailto:eeglablist-request@sccn.ucsd.edu">eeglablist-request@sccn.ucsd.edu</a><br>
_______________________________________________<br>
Eeglablist page: <a href="http://sccn.ucsd.edu/eeglab/eeglabmail.html" target="_blank">
http://sccn.ucsd.edu/eeglab/eeglabmail.html</a><br>
To unsubscribe, send an empty email to <a href="mailto:eeglablist-unsubscribe@sccn.ucsd.edu">
eeglablist-unsubscribe@sccn.ucsd.edu</a><br>
For digest mode, send an email with the subject "set digest mime" to <a href="mailto:eeglablist-request@sccn.ucsd.edu">
eeglablist-request@sccn.ucsd.edu</a><br>
<br>
<br>
<br>
--<br>
<br>
<br>
-----------------------------------------------------------------<br>
Rasa Gulbinaite, PhD<br>
Centre de Recherche Cerveau & Cognition (CerCo)<br>
Toulouse (France)<br>
<br>
e: <a href="mailto:rasa.gulbinaite@gmail.com">rasa.gulbinaite@gmail.com</a><br>
w: <a href="http://rasagulbinaite.com" target="_blank">rasagulbinaite.com</a><br>
<br>
<br>
<br>
--<br>
<br>
<br>
<br>
<br>
Mike X Cohen, PhD<br>
<a href="http://mikexcohen.com" target="_blank">mikexcohen.com</a><br>
<br>
<br>
<br>
---------- Forwarded message ----------<br>
From: Mike Urich <<a href="mailto:michaelurich210@gmail.com">michaelurich210@gmail.com</a>><br>
To: <<a href="mailto:eeglablist@sccn.ucsd.edu">eeglablist@sccn.ucsd.edu</a>><br>
Cc: <br>
Date: Mon, 15 Aug 2016 17:12:31 -0400<br>
Subject: [Eeglablist] Automation<br>
Hi all,<br>
<br>
Is there an easy way to see what functions are being called as you click through eeglab? I have a workflow of importing data from a text file, filtering, removing the mean, and running ICA and then viewing a Component Scroll plot. I need to perform this sequence
 on many datasets and it’ll be the same process for each one, so it would be fantastic to be able to automate this. Does anyone have any suggestions?<br>
<br>
Thanks!<br>
<br>
Mike Urich<br>
<a href="mailto:michaelurich210@gmail.com">michaelurich210@gmail.com</a><br>
<br>
<br>
<br>
<br>
<br>
<br>
---------- Forwarded message ----------<br>
From: Alex Abe <<a href="mailto:nabra005@odu.edu">nabra005@odu.edu</a>><br>
To: <<a href="mailto:eeglablist@sccn.ucsd.edu">eeglablist@sccn.ucsd.edu</a>><br>
Cc: <br>
Date: Tue, 16 Aug 2016 15:36:13 -0400<br>
Subject: Re: [Eeglablist] problem in BCILAB-1.1 version (brian baloch)<o:p></o:p></p>
<div>
<p class="MsoNormal">Brian, <o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">I had the same problem using BCILab in 2015 Matlab version. The problem went away when I downgraded to Matlab 2014a. <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Alex<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">On Mon, Aug 15, 2016 at 3:00 PM, <<a href="mailto:eeglablist-request@sccn.ucsd.edu" target="_blank">eeglablist-request@sccn.ucsd.edu</a>> wrote:<o:p></o:p></p>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<p class="MsoNormal">Send eeglablist mailing list submissions to<br>
        <a href="mailto:eeglablist@sccn.ucsd.edu" target="_blank">eeglablist@sccn.ucsd.edu</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
        <a href="https://sccn.ucsd.edu/mailman/listinfo/eeglablist" target="_blank">
https://sccn.ucsd.edu/mailman/listinfo/eeglablist</a><br>
or, via email, send a message with subject or body 'help' to<br>
        <a href="mailto:eeglablist-request@sccn.ucsd.edu" target="_blank">eeglablist-request@sccn.ucsd.edu</a><br>
<br>
You can reach the person managing the list at<br>
        <a href="mailto:eeglablist-owner@sccn.ucsd.edu" target="_blank">eeglablist-owner@sccn.ucsd.edu</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of eeglablist digest..."<br>
<br>
Today's Topics:<br>
<br>
   1. problem in BCILAB-1.1 version (brian baloch)<br>
   2. Re: Units in output of timefreq - wavelet normalization<br>
      (Norman Forschack)<br>
   3. uimenu issue (Quitadamo, Lucia)<br>
   4. BCI-Lab question (Alex Abe)<br>
   5. Re: headplot.m and 2014b -- can't seem to plot a head (Nick Wan)<br>
   6. Re: Trigger manipulation (Stephen Politzer-Ahles)<br>
   7. Re: Trigger manipulation (Tarik S Bel-Bahar)<br>
   8. Re: headplot.m and 2014b -- can't seem to plot a head<br>
      (Tarik S Bel-Bahar)<br>
   9. Re: Artifact rejection on continuous data (Tarik S Bel-Bahar)<br>
  10. SIFT resampling surrogate distributions with 1 trial<br>
      (Winslow Strong)<br>
<br>
<br>
---------- Forwarded message ----------<br>
From: brian baloch <<a href="mailto:brian.baloch@gmail.com" target="_blank">brian.baloch@gmail.com</a>><br>
To: <<a href="mailto:eeglablist@sccn.ucsd.edu" target="_blank">eeglablist@sccn.ucsd.edu</a>><br>
Cc: <br>
Date: Sun, 14 Aug 2016 15:12:12 +0900<br>
Subject: [Eeglablist] problem in BCILAB-1.1 version<o:p></o:p></p>
<div>
<p class="MsoNormal"><span style="font-size:9.5pt">Respected Sir,</span><o:p></o:p></p>
<div>
<p class="MsoNormal"><span style="font-size:9.5pt"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:9.5pt">                      Hope you would be fine. Dear Sir, I am PhD student in South Korea. I am working on BCILAB. Sir, I am experiencing one problem in BCILAB software during online MATLAB visualization. I am
 using MATLAB2015b. it gives an error of " referred  data is non-existent". <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:9.5pt"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:9.5pt">chunk.smax = p.buffer.smax + size(chunk.data,2);<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:9.5pt"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:9.5pt">I have been experiencing this error many days. Sir if you tell me solution for this, I will be thankful to you.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:9.5pt"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:9.5pt"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:9.5pt"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:9.5pt">Thanks.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:9.5pt"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:9.5pt">Regards<o:p></o:p></span></p>
</div>
<div style="margin-top:1.5pt">
<div>
<p class="MsoNormal"><span style="font-size:9.5pt"><img border="0" id="_x0000_i1025" src="https://ssl.gstatic.com/ui/v1/icons/mail/images/cleardot.gif"><o:p></o:p></span></p>
</div>
</div>
</div>
<p class="MsoNormal"><br>
<br>
---------- Forwarded message ----------<br>
From: Norman Forschack <<a href="mailto:forschack@cbs.mpg.de" target="_blank">forschack@cbs.mpg.de</a>><br>
To: Andreas Widmann <<a href="mailto:widmann@uni-leipzig.de" target="_blank">widmann@uni-leipzig.de</a>><br>
Cc: eeglablist <<a href="mailto:eeglablist@sccn.ucsd.edu" target="_blank">eeglablist@sccn.ucsd.edu</a>><br>
Date: Mon, 15 Aug 2016 18:19:58 +0200<br>
Subject: Re: [Eeglablist] Units in output of timefreq - wavelet normalization<br>
Dear all,<br>
<br>
I'd like to contribute from the perspective of a discussion on Mike Cohen's Blog.<br>
<br>
The initial question was, how to obtain an amplitude envelope of a given signal which has in fact the same amplitude as the given signal, right?<br>
So coming from Nicos signal:<br>
<br>
clear all<br>
D = 4;       % total signal duration in seconds.<br>
sigD = 1;    % duration of the test oscillation within the signal.<br>
F = 10;      % frequency of the test oscillationin Hz.<br>
P = .25;     % Phase of the test oscillation. 2 pi radians = 360 degrees<br>
srate = 256; % sampling rate, i.e. N points per sec used to represent sine wave.<br>
T = 1/srate; % sampling period, i.e. for this e.g. points at 1 ms intervals<br>
time = T:T:D; % time vector.<br>
<br>
sigpoints = length(time)/2 - (sigD*srate)/2:(length(time)/2 + (sigD*srate)/2)-1;<br>
mysig = zeros(1,D*srate);<br>
mysig(sigpoints) = sin(2*F*time(sigpoints)*pi+ 2*pi*P);<br>
<br>
one way to obtain equal amplitudes is to normalize the wavelet by its maximal value within the frequency domain:<br>
<br>
% some preparations<br>
mysig = mysig';<br>
ss = size(mysig);<br>
cycles = 4;<br>
dt = 1/srate;<br>
sf = F/cycles;<br>
s = 1./(2*pi*sf);<br>
t = (-4*s:dt:4*s)';<br>
nM = length(t);<br>
halfMsiz = (nM-1)/2;<br>
hz = linspace(0,srate/2,floor(nM/2)+1);<br>
Ly = ss(1)*ss(2)+nM-1;<br>
Ly2=pow2(nextpow2(ss(1)*ss(2)+nM-1));<br>
<br>
% fft of signal<br>
X=fft(reshape(mysig,ss(1)*ss(2),1), Ly2);<br>
<br>
% building morlet wavelet (without a normalization factor)<br>
m =   exp(-t.^2/(2*s^2)).*exp(1i*2*pi*F.*t);<br>
H = fft(m,Ly2); % fft of wavelet<br>
<br>
% normalize wavelet spectrum<br>
H = H./max(H);<br>
<br>
y =  ifft(X.*H,Ly2);<br>
y = y(floor(halfMsiz+1):Ly-ceil(halfMsiz));<br>
y_amp = 2* abs(y);<br>
<br>
figure; plot(time,mysig,'b',time,y_amp,'r')<br>
<br>
This seems to work for any combination of srate and cycles (except when number of cycles become large) because the signal spectrum is convolved by spectral wavelet values being maximally one.<br>
<br>
I have not fully worked my way through Andreas' example. It normalizes the wavelet in time, not in frequency domain as here. So it is probably not comparable.<br>
But doing time domain normalization within the lines above by just replacing the kernel formula:<br>
<br>
m =   exp(-t.^2/(2*s^2)).*exp(1i*2*pi*F.*t) ./ sqrt(srate); % unit energy<br>
<br>
and commenting out the max(H) normalization, however, yields an amplitude envelope which is 2.5 times larger than the original signal amplitude and increases when the number of wavelet cycles is increased. But as Andreas suggestion referred to the dftfilt3
 output, the matter becomes more complicated as this function uses it's own normalization factor:<br>
A = 1./sqrt(s*sqrt(pi));<br>
and there are problably some more relevant differences (not even going into the timefreq function).<br>
<br>
In sum, this post may have fostered the general confusion (or at least mine) but for a more puristic approach to the matter of wavelet normalization, the lines above might be of some value (kudos to mike x cohen, of course).<br>
<br>
All the best<br>
Norman<br>
<br>
<br>
----- On Aug 12, 2016, at 6:06 PM, Andreas Widmann <a href="mailto:widmann@uni-leipzig.de" target="_blank">
widmann@uni-leipzig.de</a> wrote:<br>
<br>
> Dear Niko,<br>
><br>
> I’m puzzled by this difference since a long time too (and as you have written a<br>
> book chapter on WT actually I would have hoped you could help resolving this<br>
> issue ;).<br>
><br>
> (Morlet) wavelet normalization always appeared somewhat arbitrary to me (as<br>
> signal amplitude will never be directly reflected across the whole TF plane for<br>
> peaky spectra/time courses). To my understanding the most common normalization<br>
> for wavelets is unit energy (and Gabor). The help text for timefreq states that<br>
> dftfilt3 is "exact Tallon Baudry“. TB (1998, JNeurosci) states that "Wavelets<br>
> were normalized so that their total energy was 1,…“.<br>
><br>
> The wavelets produced by dftfilt3 appear to always have an energy of srate (thus<br>
> they are *not* unit energy normalized?!):<br>
> [wavelet,cycles,freqresol,timeresol] = dftfilt3(F, ncycles, srate);<br>
> E = sum( abs( wavelet{ 1 } ) .^ 2 )<br>
> Consequently, to my understanding the correct „normfactor“ should be sqrt( E )<br>
> or better sqrt( srate ).<br>
><br>
> You might want to confirm by looking at the TF transform of the (real part of<br>
> the) wavelet itself<br>
> wavelet{ 1 } = wavelet{ 1 } / sqrt( srate ); % Unit energy normalize<br>
> mysig = zeros(1,D*srate);<br>
> delay = ceil( ( length( mysig ) - length( wavelet{ 1 } ) ) / 2 );<br>
> mysig( delay:delay + length(  wavelet{ 1 } ) - 1 )  = real( wavelet{ 1 } ) * 2;<br>
> % Discard imag part<br>
> normfactor = sqrt( srate );<br>
> which should now have a peak amplitude of 1 (independent of sampling rate and<br>
> signal duration).<br>
><br>
> As the issue appears to be not only in EEGLAB but also other implementations, I<br>
> always assumed my reasoning to be incorrect. Is it? What am I missing?<br>
><br>
> Best,<br>
> Andreas<br>
><br>
>> Am 10.08.2016 um 11:58 schrieb Niko Busch <<a href="mailto:niko.busch@gmail.com" target="_blank">niko.busch@gmail.com</a>>:<br>
>><br>
>> Dear Makoto (and everyone who replied to me personally regarding this post),<br>
>><br>
>> thank you for your reply! I see that the result of the wavelet transform inside<br>
>> the timefreq function is dependent on the length of the signal, which in turn<br>
>> is dependent on the number of cycles and sampling rate. However, simply<br>
>> dividing by the length of the wavelet does not seem to be the solution either.<br>
>> I modified the code below by including a "normalization factor", which<br>
>> currently is simply the length of the wavelet. Dividing the wavelet transformed<br>
>> amplitudes by this factor gives the right order of magnitude, but the results<br>
>> are still quite off. By increasing the sampling rate or number of cycles, the<br>
>> results are even more off. I believe we are on the right track, but something<br>
>> is still missing. Do you have any ideas?<br>
>><br>
>> Cheers,<br>
>> Niko<br>
>><br>
>> %% Create sine wave<br>
>> clear all<br>
>> D = 4;       % total signal duration in seconds.<br>
>> sigD = 1;    % duration of the test oscillation within the signal.<br>
>> F = 10;      % frequency of the test oscillationin Hz.<br>
>> P = .25;     % Phase of the test oscillation. 2 pi radians = 360 degrees<br>
>> srate = 256; % sampling rate, i.e. N points per sec used to represent sine wave.<br>
>> T = 1/srate; % sampling period, i.e. for this e.g. points at 1 ms intervals<br>
>> t = [T:T:D]; % time vector.<br>
>><br>
>> sigpoints = length(t)/2 - (sigD*srate)/2:(length(t)/2 + (sigD*srate)/2)-1;<br>
>> mysig = zeros(1,D*srate);<br>
>> mysig(sigpoints) = sin(2*F*t(sigpoints)*pi+ 2*pi*P);<br>
>><br>
>> %% TF computation<br>
>> ncycles = 4;<br>
>><br>
>> [wavelet,cycles,freqresol,timeresol] = dftfilt3(F, ncycles, srate);<br>
>> normfactor = length(wavelet{1});<br>
>><br>
>> [tf, outfreqs, outtimes] = timefreq(mysig', srate, ...<br>
>>     'cycles', ncycles, 'wletmethod', 'dftfilt3', 'freqscale', 'linear', ...<br>
>>     'freqs', F);<br>
>><br>
>> %% Plot<br>
>> figure; hold all<br>
>> plot(t,mysig);<br>
>> plot(outtimes./1000,abs(tf)./normfactor)<br>
>> xlabel('Time (seconds)');<br>
>> ylabel('Amplitude');<br>
>> legend('input signal', 'wavelet result')<br>
>><br>
>> _______________________________________________<br>
>> Eeglablist page: <a href="http://sccn.ucsd.edu/eeglab/eeglabmail.html" target="_blank">
http://sccn.ucsd.edu/eeglab/eeglabmail.html</a><br>
>> To unsubscribe, send an empty email to <a href="mailto:eeglablist-unsubscribe@sccn.ucsd.edu" target="_blank">
eeglablist-unsubscribe@sccn.ucsd.edu</a><br>
>> For digest mode, send an email with the subject "set digest mime" to<br>
>> <a href="mailto:eeglablist-request@sccn.ucsd.edu" target="_blank">eeglablist-request@sccn.ucsd.edu</a><br>
><br>
> _______________________________________________<br>
> Eeglablist page: <a href="http://sccn.ucsd.edu/eeglab/eeglabmail.html" target="_blank">
http://sccn.ucsd.edu/eeglab/eeglabmail.html</a><br>
> To unsubscribe, send an empty email to <a href="mailto:eeglablist-unsubscribe@sccn.ucsd.edu" target="_blank">
eeglablist-unsubscribe@sccn.ucsd.edu</a><br>
> For digest mode, send an email with the subject "set digest mime" to<br>
> <a href="mailto:eeglablist-request@sccn.ucsd.edu" target="_blank">eeglablist-request@sccn.ucsd.edu</a><br>
<br>
<br>
<br>
---------- Forwarded message ----------<br>
From: "Quitadamo, Lucia" <<a href="mailto:l.quitadamo@aston.ac.uk" target="_blank">l.quitadamo@aston.ac.uk</a>><br>
To: "<a href="mailto:eeglablist@sccn.ucsd.edu" target="_blank">eeglablist@sccn.ucsd.edu</a>" <<a href="mailto:eeglablist@sccn.ucsd.edu" target="_blank">eeglablist@sccn.ucsd.edu</a>><br>
Cc: <br>
Date: Sat, 13 Aug 2016 15:20:20 +0000<br>
Subject: [Eeglablist] uimenu issue<o:p></o:p></p>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Hello everybody,<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">I am creating an EEGLAB plugin for the analysis and detection of high-frequency oscillations (HFOs). I have created a set of functions which can be called by means of a list of
 uimenus which I already integrated in the EEGLAB interface. I would like to enable some of the uimenus only if some variables  (created by different functions) are present in the workspace. Do you know how to do that? I have tried with “userdata” property,
 but I have been able just to disable the uimenu at the startup.<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Thanks for your support.<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Best,<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Lucia<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><br>
<br>
---------- Forwarded message ----------<br>
From: Alex Abe <<a href="mailto:nabra005@odu.edu" target="_blank">nabra005@odu.edu</a>><br>
To: <<a href="mailto:eeglablist@sccn.ucsd.edu" target="_blank">eeglablist@sccn.ucsd.edu</a>><br>
Cc: <br>
Date: Fri, 12 Aug 2016 13:55:17 -0400<br>
Subject: [Eeglablist] BCI-Lab question<o:p></o:p></p>
<div>
<p class="MsoNormal">Hi, <o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">I am running the search function in BCI_lab, and it is giving me an error which I am not able to solve. Can any BCI_lab expert help me out ? If I do not use search, the program compiles without an error and provides an output. <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">I am using Matlab 2014a version. I tried running on 2011a and it still gives me the same error. Do let me know if you need any other info. <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">My command line that calls the search function is as follows: <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<div>
<p class="MsoNormal">myapproach = {'CSP' 'SignalProcessing',{'EpochExtraction',[search(0:0.5:1.0),search(2.0:0.5:3.0)],'FIRFilter',[6 8 29 30]}};<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">The error I receive is below:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<div>
<p class="MsoNormal">Attempt to reference field of non-structure array.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Error in ParadigmBaseSimplified>@(x)length(x.streams)>1 (line 168)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">                if any(cellfun(@(x)length(x.streams) > 1,collection))<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Error in ParadigmBaseSimplified/calibrate (line 168)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">                if any(cellfun(@(x)length(x.streams) > 1,collection))<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Error in <a href="mailto:bci_train/@(varargin)instance.calibrate(varargin%7b:%7d)">
bci_train/@(varargin)instance.calibrate(varargin{:})</a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Error in<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">bci_train>@(trainset,varargin)utl_complete_model(calibrate_func('collection',{trainset},varargin{:}),predict_func)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">(line 704)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">        'trainer', @(trainset,varargin)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">        utl_complete_model(calibrate_func('collection',{trainset},varargin{:}),predict_func), ...<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Error in utl_evaluate_fold (line 29)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">    model = opts.trainer(trainset,opts.args{:});<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Error in par_beginschedule (line 157)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">            sched(t) = {{t,tasks{t}{1}(tasks{t}{2:end})}}; end<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Error in par_schedule (line 60)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">id = par_beginschedule(tasks,opts);<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Error in utl_crossval (line 200)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">    results = par_schedule(tasks, 'engine',opts.engine_cv, 'pool',opts.pool, 'policy',opts.policy);<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Error in utl_searchmodel>@(varargin)utl_crossval(data,nestedcv_ctrl,'args',varargin) (line 147)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">    objective_function = @(varargin) utl_crossval(data,nestedcv_ctrl,'args',varargin);<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Error in hlp_wrapresults (line 51)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">        [a{1:len}] = f(varargin{:});<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Error in par_beginschedule (line 157)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">            sched(t) = {{t,tasks{t}{1}(tasks{t}{2:end})}}; end<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Error in par_schedule (line 60)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">id = par_beginschedule(tasks,opts);<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Error in utl_gridsearch (line 146)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">outputs = par_schedule(tasks, 'engine',opts.engine_gs,'pool',opts.pool,'policy',opts.policy);<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Error in utl_searchmodel (line 156)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">    [stats.bestidx,stats.inputs,stats.outputs] = utl_gridsearch(gridsearch_ctrl, opts.args{:});<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Error in utl_nested_crossval>@(P,varargin)utl_searchmodel(P,opts,'scheme',opts.opt_scheme) (line 98)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">    opts.trainer = @(P,varargin) utl_searchmodel(P,opts,'scheme',opts.opt_scheme);<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Error in utl_evaluate_fold (line 29)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">    model = opts.trainer(trainset,opts.args{:});<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Error in par_beginschedule (line 157)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">            sched(t) = {{t,tasks{t}{1}(tasks{t}{2:end})}}; end<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Error in par_schedule (line 60)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">id = par_beginschedule(tasks,opts);<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Error in utl_crossval (line 200)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">    results = par_schedule(tasks, 'engine',opts.engine_cv, 'pool',opts.pool, 'policy',opts.policy);<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Error in utl_nested_crossval (line 102)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">[measure,stats] = utl_crossval(data, opts, 'scheme',opts.eval_scheme);<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Error in bci_train>run_computation (line 759)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">    [measure,stats] = utl_nested_crossval(opts.data, crossval_args{:});<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Error in hlp_scope>make_func/@(f,a,frame__f1)feval(f,a{:})<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Error in hlp_scope (line 51)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">[varargout{1:nargout}] = func(f,varargin);<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Error in bci_train (line 730)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">[measure,model,stats] =<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">hlp_scope({'fingerprint_check',0,'fingerprint_create',0},@run_computation,opts,crossval_args);<o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Alex<o:p></o:p></p>
</div>
</div>
</div>
<p class="MsoNormal"><br>
<br>
---------- Forwarded message ----------<br>
From: Nick Wan <<a href="mailto:nickwan@aggiemail.usu.edu" target="_blank">nickwan@aggiemail.usu.edu</a>><br>
To: EEGLAB List <<a href="mailto:eeglablist@sccn.ucsd.edu" target="_blank">eeglablist@sccn.ucsd.edu</a>><br>
Cc: <br>
Date: Fri, 12 Aug 2016 20:48:36 -0600<br>
Subject: Re: [Eeglablist] headplot.m and 2014b -- can't seem to plot a head<o:p></o:p></p>
<div>
<div>
<p class="MsoNormal"><span style="font-family:"Arial",sans-serif">Hi all, I figured it out. Wasn't converting my angles file right! <o:p></o:p></span></p>
</div>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">On Fri, Aug 12, 2016 at 3:23 AM, Nick Wan <<a href="mailto:nickwan@aggiemail.usu.edu" target="_blank">nickwan@aggiemail.usu.edu</a>> wrote:<o:p></o:p></p>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<div>
<div>
<p class="MsoNormal"><span style="font-family:"Arial",sans-serif">Hi all,<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Arial",sans-serif"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Arial",sans-serif">I tried to run<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Arial",sans-serif">>>headplot example<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Arial",sans-serif">It ran, but the plot came up blank. I can rotate the plot, but it's just an empty plot, no head model or anything. I'm running 13.4.3b on r2014b. EEGLAB is at the top of my path list, followed
 by MATLAB toolboxes.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Arial",sans-serif"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Arial",sans-serif">I tried loading in the sample dataset but that also didn't render the 3D plot.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Arial",sans-serif"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Arial",sans-serif">Any help would be much appreciated! <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:#888888"><o:p> </o:p></span></p>
</div>
<p class="MsoNormal"><span style="color:#888888">-- <o:p></o:p></span></p>
<div>
<div>
<p class="MsoNormal"><span style="color:#888888">Nick Wan<o:p></o:p></span></p>
<div>
<p class="MsoNormal"><span style="color:#888888">Graduate Student<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:#888888"><o:p> </o:p></span></p>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-family:"Arial",sans-serif;color:#888888">Utah State University Psychology Department<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Arial",sans-serif;color:#888888;background:white">2810 Old Main Hill</span><span style="font-family:"Arial",sans-serif;color:#888888"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Arial",sans-serif;color:#888888">Logan, UT 84322<o:p></o:p></span></p>
</div>
</div>
<div>
<p class="MsoNormal"><span style="color:#888888"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:#888888">Office: HSRC 004<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:#888888">Phone: <a href="tel:435-554-8788" target="_blank">
435-554-8788</a><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:#888888">Blog: <a href="http://truebra.in" target="_blank">
truebra.in</a><o:p></o:p></span></p>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<p class="MsoNormal"><br>
<br clear="all">
<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal">-- <o:p></o:p></p>
<div>
<div>
<p class="MsoNormal">Nick Wan<o:p></o:p></p>
<div>
<p class="MsoNormal">Graduate Student<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-family:"Arial",sans-serif">Utah State University Psychology Department<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Arial",sans-serif;background:white">2810 Old Main Hill</span><span style="font-family:"Arial",sans-serif"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Arial",sans-serif">Logan, UT 84322<o:p></o:p></span></p>
</div>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Office: HSRC 004<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Phone: <a href="tel:435-554-8788" target="_blank">435-554-8788</a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Blog: <a href="http://truebra.in" target="_blank">truebra.in</a><o:p></o:p></p>
</div>
</div>
</div>
</div>
<p class="MsoNormal"><br>
<br>
---------- Forwarded message ----------<br>
From: Stephen Politzer-Ahles <<a href="mailto:politzerahless@gmail.com" target="_blank">politzerahless@gmail.com</a>><br>
To: "Haggarty, Connor" <<a href="mailto:C.J.Haggarty@2014.ljmu.ac.uk" target="_blank">C.J.Haggarty@2014.ljmu.ac.uk</a>><br>
Cc: "<a href="mailto:eeglablist@sccn.ucsd.edu" target="_blank">eeglablist@sccn.ucsd.edu</a>" <<a href="mailto:eeglablist@sccn.ucsd.edu" target="_blank">eeglablist@sccn.ucsd.edu</a>><br>
Date: Sat, 13 Aug 2016 06:08:07 +0800<br>
Subject: Re: [Eeglablist] Trigger manipulation<o:p></o:p></p>
<div>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">EEGLAB doesn't have built-in function for this, but ERPLAB's binlister can do it. Alternatively, you can just write a MATLAB loop that does it; there should be an example or two in some of my previous messages
 on this list.<o:p></o:p></p>
</div>
<p class="MsoNormal">Best,<o:p></o:p></p>
</div>
<p class="MsoNormal">Steve<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><br clear="all">
<o:p></o:p></p>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">---<o:p></o:p></p>
</div>
<p class="MsoNormal">Stephen Politzer-Ahles<br>
University of Oxford<br>
Language and Brain Lab<br>
Faculty of Linguistics, Phonetics & Philology<br>
<a href="http://users.ox.ac.uk/%7Ecpgl0080/" target="_blank">http://users.ox.ac.uk/~cpgl0080/</a><o:p></o:p></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">On Sat, Aug 13, 2016 at 6:07 AM, Stephen Politzer-Ahles <<a href="mailto:stephen.politzer-ahles@ling-phil.ox.ac.uk" target="_blank">stephen.politzer-ahles@ling-phil.ox.ac.uk</a>> wrote:<o:p></o:p></p>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<div>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">EEGLAB doesn't have built-in function for this, but ERPLAB's binlister can do it. Alternatively, you can just write a MATLAB loop that does it; there should be an example or two in some of my previous messages
 on this list.<o:p></o:p></p>
</div>
<p class="MsoNormal">Best,<o:p></o:p></p>
</div>
<p class="MsoNormal">Steve<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><br clear="all">
<o:p></o:p></p>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal"><br>
<br>
---<o:p></o:p></p>
</div>
<p class="MsoNormal">Stephen Politzer-Ahles<br>
University of Oxford<br>
Language and Brain Lab<br>
Faculty of Linguistics, Phonetics & Philology<br>
<a href="http://users.ox.ac.uk/~cpgl0080/" target="_blank">http://users.ox.ac.uk/~cpgl0080/</a><o:p></o:p></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">On Fri, Aug 12, 2016 at 9:07 PM, Haggarty, Connor <<a href="mailto:C.J.Haggarty@2014.ljmu.ac.uk" target="_blank">C.J.Haggarty@2014.ljmu.ac.uk</a>> wrote:<o:p></o:p></p>
<div>
<div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<p class="MsoNormal">Hi,<br>
<br>
<br>
<br>
I have a question about changing trigger codes for epochs.<br>
<br>
I am completing a study with somatosensory stimuli.<br>
<br>
One trigger is sent by E-Prime which codes the speed of stroking touch (delivered by the experimenter), sometime after this a trigger is sent from a laser showing the exact point at which the experimenter first touches the participant.<br>
<br>
The laser is the precise onset of touch however, this code is the same each time. In order to epoch and bin these data properly I need a way to code the laser trigger so that it is an addition (or some calculation) of the previous (stimulus type) trigger and
 the precise stimulus laser onset trigger.<br>
<br>
Is there some function in EEGLab or some coding that will allow me to do this?<br>
<br>
<br>
<br>
Thank you<br>
<br>
<br>
<br>
Connor<br>
<br>
________________________________<br>
Important Notice: the information in this email and any attachments is for the sole use of the intended recipient(s). If you are not an intended recipient, or a person responsible for delivering it to an intended recipient, you should delete it from your system
 immediately without disclosing its contents elsewhere and advise the sender by returning the email or by telephoning a number contained in the body of the email. No responsibility is accepted for loss or damage arising from viruses or changes made to this
 message after it was sent. The views contained in this email are those of the author and not necessarily those of Liverpool John Moores University.<br>
_______________________________________________<br>
Eeglablist page: <a href="http://sccn.ucsd.edu/eeglab/eeglabmail.html" target="_blank">
http://sccn.ucsd.edu/eeglab/eeglabmail.html</a><br>
To unsubscribe, send an empty email to <a href="mailto:eeglablist-unsubscribe@sccn.ucsd.edu" target="_blank">
eeglablist-unsubscribe@sccn.ucsd.edu</a><br>
For digest mode, send an email with the subject "set digest mime" to <a href="mailto:eeglablist-request@sccn.ucsd.edu" target="_blank">
eeglablist-request@sccn.ucsd.edu</a><o:p></o:p></p>
</blockquote>
</div>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</blockquote>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal"><br>
<br>
---------- Forwarded message ----------<br>
From: Tarik S Bel-Bahar <<a href="mailto:tarikbelbahar@gmail.com" target="_blank">tarikbelbahar@gmail.com</a>><br>
To: "Haggarty, Connor" <<a href="mailto:C.J.Haggarty@2014.ljmu.ac.uk" target="_blank">C.J.Haggarty@2014.ljmu.ac.uk</a>><br>
Cc: "<a href="mailto:eeglablist@sccn.ucsd.edu" target="_blank">eeglablist@sccn.ucsd.edu</a>" <<a href="mailto:eeglablist@sccn.ucsd.edu" target="_blank">eeglablist@sccn.ucsd.edu</a>><br>
Date: Sat, 13 Aug 2016 21:35:54 -0400<br>
Subject: Re: [Eeglablist] Trigger manipulation<br>
Hello Connor,some notes below, best wishes.<br>
<br>
<br>
*****************************************************************************<br>
If you haven't had a chance to, google eeglablist for the past<br>
mentions and suggestions regarding changing events. "eeglablist + edit<br>
events". There should  be some code examples there too. Here are some<br>
recent ones. Check out the function eeg_addnewevents too.<br>
<a href="https://sccn.ucsd.edu/pipermail/eeglablist/2015/009246.html" target="_blank">https://sccn.ucsd.edu/pipermail/eeglablist/2015/009246.html</a><br>
<a href="https://sccn.ucsd.edu/pipermail/eeglablist/2015/009265.html" target="_blank">https://sccn.ucsd.edu/pipermail/eeglablist/2015/009265.html</a><br>
<br>
There's a range of ways to edit the events, including through the GUI,<br>
by importing events, and via scripts that modify the EEG.event<br>
structure. These should all be documented on the wiki and eeglablist.<br>
<br>
You can go to Edit > EEG events, modify or add an event, and after<br>
closing the gui window for event editing, type eegh to see the Event<br>
Editing command script that was run, which you can copy, modify.<br>
You'll also want to check help documentation for the function that<br>
gets run. For example one can create a loop in a small script that go<br>
through each of the events, has a counter for each kind of event<br>
you're looking for, and then modifies the label. You could do it event<br>
by event in loop, or you could have variables to hold the times and<br>
labels, and then use the eeg_addnewevents function to update the whole<br>
event structure.<br>
<br>
Google the following eeglab wiki pages.<br>
Chapter_03:_Event_Processing<br>
A02: Importing Event Epoch Info - SCCN<br>
<br>
See also the IV.4.3.EEG.event portion of the eeglab tutorial mirror here:<br>
<a href="http://cognitrn.psych.indiana.edu/busey/temp/eeglabtutorial4.301/scripttut/script_tutorial.html#EEG.event" target="_blank">cognitrn.psych.indiana.edu/busey/temp/eeglabtutorial4.301/scripttut/script_tutorial.html#EEG.event</a>:<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
On Fri, Aug 12, 2016 at 9:07 AM, Haggarty, Connor<br>
<<a href="mailto:C.J.Haggarty@2014.ljmu.ac.uk" target="_blank">C.J.Haggarty@2014.ljmu.ac.uk</a>> wrote:<br>
> Hi,<br>
><br>
><br>
><br>
> I have a question about changing trigger codes for epochs.<br>
><br>
> I am completing a study with somatosensory stimuli.<br>
><br>
> One trigger is sent by E-Prime which codes the speed of stroking touch (delivered by the experimenter), sometime after this a trigger is sent from a laser showing the exact point at which the experimenter first touches the participant.<br>
><br>
> The laser is the precise onset of touch however, this code is the same each time. In order to epoch and bin these data properly I need a way to code the laser trigger so that it is an addition (or some calculation) of the previous (stimulus type) trigger
 and the precise stimulus laser onset trigger.<br>
><br>
> Is there some function in EEGLab or some coding that will allow me to do this?<br>
><br>
><br>
><br>
> Thank you<br>
><br>
><br>
><br>
> Connor<br>
><br>
> ________________________________<br>
> Important Notice: the information in this email and any attachments is for the sole use of the intended recipient(s). If you are not an intended recipient, or a person responsible for delivering it to an intended recipient, you should delete it from your
 system immediately without disclosing its contents elsewhere and advise the sender by returning the email or by telephoning a number contained in the body of the email. No responsibility is accepted for loss or damage arising from viruses or changes made to
 this message after it was sent. The views contained in this email are those of the author and not necessarily those of Liverpool John Moores University.<br>
> _______________________________________________<br>
> Eeglablist page: <a href="http://sccn.ucsd.edu/eeglab/eeglabmail.html" target="_blank">
http://sccn.ucsd.edu/eeglab/eeglabmail.html</a><br>
> To unsubscribe, send an empty email to <a href="mailto:eeglablist-unsubscribe@sccn.ucsd.edu" target="_blank">
eeglablist-unsubscribe@sccn.ucsd.edu</a><br>
> For digest mode, send an email with the subject "set digest mime" to <a href="mailto:eeglablist-request@sccn.ucsd.edu" target="_blank">
eeglablist-request@sccn.ucsd.edu</a><br>
<br>
<br>
<br>
---------- Forwarded message ----------<br>
From: Tarik S Bel-Bahar <<a href="mailto:tarikbelbahar@gmail.com" target="_blank">tarikbelbahar@gmail.com</a>><br>
To: Nick Wan <<a href="mailto:nickwan@aggiemail.usu.edu" target="_blank">nickwan@aggiemail.usu.edu</a>><br>
Cc: EEGLAB List <<a href="mailto:eeglablist@sccn.ucsd.edu" target="_blank">eeglablist@sccn.ucsd.edu</a>><br>
Date: Sat, 13 Aug 2016 22:03:56 -0400<br>
Subject: Re: [Eeglablist] headplot.m and 2014b -- can't seem to plot a head<o:p></o:p></p>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal"><span style="color:#333399">Hello Nick, there may be a problem with that example, feel free to report it on eeglab bugzilla. The steps below take 5 minutes and give you a headplot with sample data you can find in your full eeglab folder.
 As usual, googling eeglablist and reviewing the eeglab tutorial for your topics can be helpful.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:#333399"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:#333399"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:#333399"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:#333399">***************************************************************************<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:#333399">The headplot requires co-registration of the correct channels with the head, for the currently loaded file. The loaded data also needs to be epoched data, I believe.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:#333399"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:#333399">If you haven't had chance to yet, review the following pages and similar pages:
<a href="https://sccn.ucsd.edu/wiki/Chapter_06:_Data_Averaging" target="_blank">https://sccn.ucsd.edu/wiki/Chapter_06:_Data_Averaging</a><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:#333399">This shows you how to make plots with tutorial data, an important step.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:#333399"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:#333399">To get 3d headplots now quickly and easily, do the following steps:<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:#333399"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:#333399">Go to the "sample data" folder in your eeglab folder.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:#333399">Load the file "eeglab_data_epochs_ica.set"<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:#333399">In case you haven't tried the full tutorial yet, this file is used in the online eeglab tutorial pages.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="color:#333399">Then try either of the following from the GUI</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="color:#333399">Plot > Erp Map Series > 3D</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="color:#333399">Then go to Plot > Components > 3D</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="color:#333399">You need to specify a specific time or a specific component in the respective gui window. But leave everything else with defaults. </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="color:#333399">In both cases (ERPS or Components) you should see a Tailarach transformation matrix already in the GUI window that pops up. You can click Manual registration if you want to show yourself that the electrode locations
 are properly co-registered with the head (they are). </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="color:#333399">This is the transformation matrix that should be in there:</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="color:#333399">-0.355789     -6.33688      12.3705    0.0533239    0.0187461     -1.55264      1.06367     0.987721     0.932694</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="color:#333399">Then click OK, and a "example" figure should pop up! Yes ?</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="color:#333399">*Remember to check google eeglablist and check the online tutorial for your topics of interest.</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
</div>
</div>
<p class="MsoNormal"><br>
<br>
---------- Forwarded message ----------<br>
From: Tarik S Bel-Bahar <<a href="mailto:tarikbelbahar@gmail.com" target="_blank">tarikbelbahar@gmail.com</a>><br>
To: <<a href="mailto:colivero@sri.utoronto.ca" target="_blank">colivero@sri.utoronto.ca</a>><br>
Cc: eeglablist <<a href="mailto:eeglablist@sccn.ucsd.edu" target="_blank">eeglablist@sccn.ucsd.edu</a>><br>
Date: Sat, 13 Aug 2016 22:07:00 -0400<br>
Subject: Re: [Eeglablist] Artifact rejection on continuous data<br>
Hello,<br>
If you're using ERPLAB primarily, you'll want to check with the ERPLAB<br>
user list.<br>
See link below for info on basic artifact rejection in eeglab<br>
<a href="https://sccn.ucsd.edu/wiki/Chapter_01:_Rejecting_Artifacts" target="_blank">https://sccn.ucsd.edu/wiki/Chapter_01:_Rejecting_Artifacts</a><br>
There are also multiple options for data rejection available inside<br>
eeglab, both traditional and ICA based.<br>
Cheers!<br>
<br>
<br>
<br>
On Thu, Aug 11, 2016 at 3:14 PM,  <<a href="mailto:colivero@sri.utoronto.ca" target="_blank">colivero@sri.utoronto.ca</a>> wrote:<br>
> Hello,<br>
><br>
> I am doing artifact rejection on continuous data using ERPLAB. When I run<br>
> it, it shows me the scroll plot for me to go over and double check with<br>
> the marked areas that exceeded the threshold I choose. Is there a way to<br>
> deselect/unreject some of these marked for rejection areas? I know that if<br>
> you click on the area it deselects but when I press reject it still<br>
> rejects the areas I deselected. Sometimes it marks areas around my event<br>
> markers but I do not want these deleted.<br>
><br>
> Any help is greatly appreciated.<br>
><br>
> Thank you<br>
><br>
> _______________________________________________<br>
> Eeglablist page: <a href="http://sccn.ucsd.edu/eeglab/eeglabmail.html" target="_blank">
http://sccn.ucsd.edu/eeglab/eeglabmail.html</a><br>
> To unsubscribe, send an empty email to <a href="mailto:eeglablist-unsubscribe@sccn.ucsd.edu" target="_blank">
eeglablist-unsubscribe@sccn.ucsd.edu</a><br>
> For digest mode, send an email with the subject "set digest mime" to <a href="mailto:eeglablist-request@sccn.ucsd.edu" target="_blank">
eeglablist-request@sccn.ucsd.edu</a><br>
<br>
<br>
<br>
---------- Forwarded message ----------<br>
From: Winslow Strong <<a href="mailto:winslow.strong@gmail.com" target="_blank">winslow.strong@gmail.com</a>><br>
To: <<a href="mailto:eeglablist@sccn.ucsd.edu" target="_blank">eeglablist@sccn.ucsd.edu</a>><br>
Cc: <br>
Date: Sat, 13 Aug 2016 16:57:26 -0700<br>
Subject: [Eeglablist] SIFT resampling surrogate distributions with 1 trial<o:p></o:p></p>
<div>
<p class="MsoNormal">I'd like to use a resampling technique (e.g. bootstrap) to get p-values and test stats for SIFT connectivity metrics for 1 subject across n conditions.  <o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">This is a steady-state condition study, hence there's only 1 trial per condition.  I'm trying to analyze whether certain connectivity metrics (i.e. their averages over a condition) are statistically significantly different across the conditions. 
 I was under the impression I could use SIFT's surrogate distribution generator to obtain the surrogate distribution for these calculations, but when I run that from the GUI for bootstrap, I get the error:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">"Unable to compute bootstrap distributions for a single trial"<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Is this surrogate function only designed to do boostrapping over trials? Or is there a way to do it over windows within a condition?<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><br>
_______________________________________________<br>
eeglablist mailing list <a href="mailto:eeglablist@sccn.ucsd.edu" target="_blank">
eeglablist@sccn.ucsd.edu</a><br>
Eeglablist page: <a href="http://www.sccn.ucsd.edu/eeglab/eeglabmail.html" target="_blank">
http://www.sccn.ucsd.edu/eeglab/eeglabmail.html</a><br>
To unsubscribe, send an empty email to <a href="mailto:eeglablist-unsub@sccn.ucsd.edu" target="_blank">
eeglablist-unsub@sccn.ucsd.edu</a><br>
To switch to non-digest mode, send an empty email to <a href="mailto:eeglablist-nodigest@sccn.ucsd.edu" target="_blank">
eeglablist-nodigest@sccn.ucsd.edu</a><o:p></o:p></p>
</blockquote>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</div>
<p class="MsoNormal"><br>
_______________________________________________<br>
eeglablist mailing list <a href="mailto:eeglablist@sccn.ucsd.edu">eeglablist@sccn.ucsd.edu</a><br>
Eeglablist page: <a href="http://www.sccn.ucsd.edu/eeglab/eeglabmail.html" target="_blank">
http://www.sccn.ucsd.edu/eeglab/eeglabmail.html</a><br>
To unsubscribe, send an empty email to <a href="mailto:eeglablist-unsub@sccn.ucsd.edu">
eeglablist-unsub@sccn.ucsd.edu</a><br>
To switch to non-digest mode, send an empty email to <a href="mailto:eeglablist-nodigest@sccn.ucsd.edu">
eeglablist-nodigest@sccn.ucsd.edu</a><o:p></o:p></p>
</blockquote>
</div>
<p class="MsoNormal"><br>
<br clear="all">
<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal">-- <o:p></o:p></p>
<div>
<div>
<div>
<p class="MsoNormal">James Jones-Rounds<o:p></o:p></p>
</div>
<p class="MsoNormal">Laboratory Manager<br>
Human Development EEG and Psychophysiology (HEP) Laboratory,<o:p></o:p></p>
<div>
<p class="MsoNormal">Department of Human Development,<br>
--------------------------------------------<br>
Cornell University | Ithaca, NY<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">607-255-9883<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><a href="mailto:eeg@cornell.edu" target="_blank">eeg@cornell.edu</a><o:p></o:p></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>