<div dir="ltr">Dear Martin,<div><br></div><div><span style="font-size:12.8px">> I have now looked at the new data with all conditions (event types) in one file. std_selectICsByCluster seems to work as intended when I analyze a design with each condition (sz and ct) by itself.</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">Good to confirm that.</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">> But std_envtopo is still giving the same error. I have 2 variables in the STUDY: event ('65310' '65311' '65312' and '65313' representing standard, deviant frequency, deviant duration and deviant frequency+duration) and condition (patient (sz) and control (ct)). I use a script to load each set into the STUDY, depending on whether the set belongs to patient or control 'condition', here for example condition 'sz': </span><br></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">Hmm I see.</span></div><div><span style="font-size:12.8px">Did you by any chance combine conditions using STUDY.design editor? I confirmed last Thursday that the current version of std_envtopo wrapper does not handle the combined condition names. I wrote a fix already so I will release it within a few hours.</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">About checking your code, unfortunately I can't offer personal consulting so don't expect too much. I just quickly scanned your code without running it on Matlab. It seems very well written. If I comment on it, I would say that it is not very useful to code STUDY creation part because you do not repeat it very often. I personally create STUDY all from GUI. Therefore, I don't know almost anything about STUDY creation by writing code! So I'm not the best person anyway to diagnose your problem.</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">Just in case, why don't you give me the brief summary of your problem, just in case I did not understand your problem. Meanwhile, I hope the std_envtopo() update will fix the problem.</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">Makoto</span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Oct 21, 2016 at 6:43 AM, Martin Randau <span dir="ltr"><<a href="mailto:cmmrandau@gmail.com" target="_blank">cmmrandau@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><span class=""><div>Hello again Clement and Makoto<br><br></div></span>I have now looked at the new data with all conditions (event types) in one file. std_selectICsByCluster seems to work as intended when I analyze a design with each condition (sz and ct) by itself. But std_envtopo is still giving the same error. I have 2 variables in the STUDY: event ('65310' '65311' '65312' and '65313' representing standard, deviant frequency, deviant duration and deviant frequency+duration) and condition (patient (sz) and control (ct)). I use a script to load each set into the STUDY, depending on whether the set belongs to patient or control 'condition', here for example condition 'sz': <br><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">[STUDY ALLEEG] = std_editset( STUDY, ALLEEG,'commands',{{ 'index',setIndex, 'load', setFile,'subject',folderName(<wbr>2:4),'condition','sz','<wbr>dipselect' 0.15 }} ); <br> <br>[STUDY ALLEEG] = std_checkset(STUDY, ALLEEG); <br></blockquote><div><br></div><div> I repeat this step with a for-loop running through the directory until all subjects are loaded, then I do:<br><br><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">[STUDY ALLEEG] = std_editset( STUDY, ALLEEG, 'name', dateName, 'task', 'MMN'); <br><br>CURRENTSTUDY = 1; <br><br>EEG = ALLEEG; <br><br>CURRENTSET = [1:length(EEG)];<br><br>[STUDY, ALLEEG] = std_checkset(STUDY, ALLEEG);<br><br>fprintf(fileID,'Finished loading datasets into STUDY... saving...\n');<br><br>% Save study<br><br>[STUDY EEG] = pop_savestudy( STUDY, EEG, 'filename',[dateName '.study'],'filepath', studyData);<br><br>eeglab redraw<br></blockquote><div><br></div><div>The first thing I do when entering the new STUDY is to got to Edit study info and I check 'Updata dataset info' as this information differs (I do not know why). Next I select a STUDY design. At first I tried selecting all subjects, all conditions (1st variable) and all events (2nd variable). Then I precompute channel measures, build preclustering array and cluster. I can plot all computed variables: scalp maps, ERP, dipoles and power spectrum. Running std_envtopo - which correctly identifies the two conditions (sz and ct) and the 4 events for each conditions - on this causes this error:<br><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Loading cluster ERPs... (done only once)<br>Reading erp data...<br>Computing the requested mean cluster scalp maps (only done once)<br><br>5/24 polarities inverted while reading component scalp maps<br><br>Inverting ERP component polarities based on scalp map polarities<br>Reading erp data...<br>Computing the requested mean cluster scalp maps (only done once)<br><br>8/35 polarities inverted while reading component scalp maps<br><br>Inverting ERP component polarities based on scalp map polarities<br>Reading erp data...<br>Computing the requested mean cluster scalp maps (only done once)<br><br>9/43 polarities inverted while reading component scalp maps<br><br>Inverting ERP component polarities based on scalp map polarities<br>Reading erp data...<br>Computing the requested mean cluster scalp maps (only done once)<br><br>3/31 polarities inverted while reading component scalp maps<br><br>Inverting ERP component polarities based on scalp map polarities<br>Reading erp data...<br>Computing the requested mean cluster scalp maps (only done once)<br><br>8/20 polarities inverted while reading component scalp maps<br><br>Inverting ERP component polarities based on scalp map polarities<br>Reading erp data...<br>Computing the requested mean cluster scalp maps (only done once)<br><br>10/42 polarities inverted while reading component scalp maps<br><br>Inverting ERP component polarities based on scalp map polarities<br>Reading erp data...<br>Computing the requested mean cluster scalp maps (only done once)<br><br>9/46 polarities inverted while reading component scalp maps<br><br>Inverting ERP component polarities based on scalp map polarities<br>Reading erp data...<br>Computing the requested mean cluster scalp maps (only done once)<br><br>10/39 polarities inverted while reading component scalp maps<br><br>Inverting ERP component polarities based on scalp map polarities<br>Reading erp data...<br>Computing the requested mean cluster scalp maps (only done once)<br><br>4/29 polarities inverted while reading component scalp maps<br><br>Inverting ERP component polarities based on scalp map polarities<br>Reading erp data...<br>Computing the requested mean cluster scalp maps (only done once)<br><br>1/12 polarities inverted while reading component scalp maps<br><br>Inverting ERP component polarities based on scalp map polarities<br>Reading erp data...<br>Computing the requested mean cluster scalp maps (only done once)<br><br>23/48 polarities inverted while reading component scalp maps<br><br>Inverting ERP component polarities based on scalp map polarities<br>Reading erp data...<br>Computing the requested mean cluster scalp maps (only done once)<br><br>5/33 polarities inverted while reading component scalp maps<br><br>Inverting ERP component polarities based on scalp map polarities<br>Reading erp data...<br>Computing the requested mean cluster scalp maps (only done once)<br><br>6/38 polarities inverted while reading component scalp maps<br><br>Inverting ERP component polarities based on scalp map polarities<br>Reading erp data...<br>Computing the requested mean cluster scalp maps (only done once)<br><br>6/40 polarities inverted while reading component scalp maps<br><br>Inverting ERP component polarities based on scalp map polarities<br>Reading erp data...<br>Computing the requested mean cluster scalp maps (only done once)<br><br>4/22 polarities inverted while reading component scalp maps<br><br>Inverting ERP component polarities based on scalp map polarities<br>Reading erp data...<br>Computing the requested mean cluster scalp maps (only done once)<br><br>3/14 polarities inverted while reading component scalp maps<br><br>Inverting ERP component polarities based on scalp map polarities<br>Reading erp data...<br>Computing the requested mean cluster scalp maps (only done once)<br><br>2/27 polarities inverted while reading component scalp maps<br><br>Inverting ERP component polarities based on scalp map polarities<br>Reading erp data...<br>Computing the requested mean cluster scalp maps (only done once)<br><br>1/16 polarities inverted while reading component scalp maps<br><br>Inverting ERP component polarities based on scalp map polarities<br>Reading erp data...<br>Computing the requested mean cluster scalp maps (only done once)<br><br>8/23 polarities inverted while reading component scalp maps<br><br>Inverting ERP component polarities based on scalp map polarities<br>Reading erp data...<br>Computing the requested mean cluster scalp maps (only done once)<br><br>6/41 polarities inverted while reading component scalp maps<br><br>Inverting ERP component polarities based on scalp map polarities<br>Reading erp data...<br>Computing the requested mean cluster scalp maps (only done once)<br><br>7/20 polarities inverted while reading component scalp maps<br><br>Inverting ERP component polarities based on scalp map polarities<br>Reading erp data...<br>Computing the requested mean cluster scalp maps (only done once)<br><br>4/23 polarities inverted while reading component scalp maps<br><br>Inverting ERP component polarities based on scalp map polarities<br>Reading erp data...<br>Computing the requested mean cluster scalp maps (only done once)<br><br>1/22 polarities inverted while reading component scalp maps<br><br>Inverting ERP component polarities based on scalp map polarities<br>Reading erp data...<br>Computing the requested mean cluster scalp maps (only done once)<br><br>4/15 polarities inverted while reading component scalp maps<br><br>Inverting ERP component polarities based on scalp map polarities<br>No outlier cluster: Cls 2 and after will be used.<br>No need to separate topos into groups.<span class=""><br>Error using * <br>Inner matrix dimensions must agree.<br><br>Error in std_envtopo (line 322)<br> convTopoErp{1, cls}{columnwise,rowwise} = tmpTopo3*erp; %min abs =<br> zero<br><br>Error in gui_std_envtopo>startButton_<wbr>Callback (line 560)<br>STUDY = std_envtopo(STUDY, ALLEEG, arguments{:});<br><br>Error in gui_mainfcn (line 96)<br> feval(varargin{:});<br><br>Error in gui_std_envtopo (line 42)<br> gui_mainfcn(gui_State, varargin{:});<br><br>Error in<br>@(hObject,eventdata)gui_std_<wbr>envtopo('startButton_Callback'<wbr>,hObject,eventdata,guidata(<wbr>hObject))<br><br> <br>Error while evaluating uicontrol Callback<br></span></blockquote><div><br></div><div>std_selectICsByCluster does not work either with this STUDY design:<br></div><div><br><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">New .set files with selected ICs selectICsByClusterected will NOT be created.<br>64 channels are commonly available across all datasets.<br>Old STUDY.selectICsByCluster is deleted for new results.<br>pop_loadset(): loading file /Users/nikolajbak/Documents/<wbr>MATLAB/Martin/PIPELINEv1.0/<wbr>STUDY_v13/D206/D206MMNA.bdf.<wbr>set ...<br>Scaling components to RMS microvolt<br>eeg_checkset: recomputing the ICA activation matrix ...<br>Scaling components to RMS microvolt<br>eeg_checkset: recomputing the ICA activation matrix ...<br>Computing projection ....<br>Computing projection ....<br>eeg_checkset: recomputing the ICA activation matrix ...<br>Error using std_selectICsByCluster (line 395)<br>Two within-subject conditions not supported.<br><br>Error in std_pop_selectICsByCluster><wbr>pushbutton4_Callback (line 186)<br>std_selectICsByCluster(STUDY, ALLEEG, EEG, clustInclude, clustExclude, savePath,<br>createStudySelectICsByCluster)<wbr>; % It will 'assign in' so no outputs.<span class=""><br><br>Error in gui_mainfcn (line 96)<br> feval(varargin{:});<br><br></span>Error in std_pop_selectICsByCluster (line 42)<span class=""><br> gui_mainfcn(gui_State, varargin{:});<br><br>Error in<br></span>@(hObject,eventdata)std_pop_<wbr>selectICsByCluster('<wbr>pushbutton4_Callback',hObject,<wbr>eventdata,guidata(hObject))<span class=""><br><br> <br>Error while evaluating uicontrol Callback<br></span></blockquote><div><br></div><div>So then I try a design only including the sz subjects with all 4 conditions. After precomputing component measures, std_envtopo gives the same error (std_selectICsByCluster works): <br><br></div><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">STUDY design 1 not modified<br>STUDY design 2 not modified<br>STUDY design 3 not modified<br>Selecting STUDY design 2<br>Resaving STUDY<br>Re-saving study file<br>Done.<br>Loading cluster ERPs... (done only once)<br>Reading erp data...<br>Computing the requested mean cluster scalp maps (only done once)<br><br>5/24 polarities inverted while reading component scalp maps<br><br>Inverting ERP component polarities based on scalp map polarities<br>Reading erp data...<br>Computing the requested mean cluster scalp maps (only done once)<br><br>8/35 polarities inverted while reading component scalp maps<br><br>Inverting ERP component polarities based on scalp map polarities<br>Reading erp data...<br>Computing the requested mean cluster scalp maps (only done once)<br><br>9/43 polarities inverted while reading component scalp maps<br><br>Inverting ERP component polarities based on scalp map polarities<br>Reading erp data...<br>Computing the requested mean cluster scalp maps (only done once)<br><br>3/31 polarities inverted while reading component scalp maps<br><br>Inverting ERP component polarities based on scalp map polarities<br>Reading erp data...<br>Computing the requested mean cluster scalp maps (only done once)<br><br>8/20 polarities inverted while reading component scalp maps<br><br>Inverting ERP component polarities based on scalp map polarities<br>Reading erp data...<br>Computing the requested mean cluster scalp maps (only done once)<br><br>10/42 polarities inverted while reading component scalp maps<br><br>Inverting ERP component polarities based on scalp map polarities<br>Reading erp data...<br>Computing the requested mean cluster scalp maps (only done once)<br><br>9/46 polarities inverted while reading component scalp maps<br><br>Inverting ERP component polarities based on scalp map polarities<br>Reading erp data...<br>Computing the requested mean cluster scalp maps (only done once)<br><br>10/39 polarities inverted while reading component scalp maps<br><br>Inverting ERP component polarities based on scalp map polarities<br>Reading erp data...<br>Computing the requested mean cluster scalp maps (only done once)<br><br>4/29 polarities inverted while reading component scalp maps<br><br>Inverting ERP component polarities based on scalp map polarities<br>Reading erp data...<br>Computing the requested mean cluster scalp maps (only done once)<br><br>1/12 polarities inverted while reading component scalp maps<br><br>Inverting ERP component polarities based on scalp map polarities<br>Reading erp data...<br>Computing the requested mean cluster scalp maps (only done once)<br><br>23/48 polarities inverted while reading component scalp maps<br><br>Inverting ERP component polarities based on scalp map polarities<br>Reading erp data...<br>Computing the requested mean cluster scalp maps (only done once)<br><br>5/33 polarities inverted while reading component scalp maps<br><br>Inverting ERP component polarities based on scalp map polarities<br>Reading erp data...<br>Computing the requested mean cluster scalp maps (only done once)<br><br>6/38 polarities inverted while reading component scalp maps<br><br>Inverting ERP component polarities based on scalp map polarities<br>Reading erp data...<br>Computing the requested mean cluster scalp maps (only done once)<br><br>6/40 polarities inverted while reading component scalp maps<br><br>Inverting ERP component polarities based on scalp map polarities<br>Reading erp data...<br>Computing the requested mean cluster scalp maps (only done once)<br><br>4/22 polarities inverted while reading component scalp maps<br><br>Inverting ERP component polarities based on scalp map polarities<br>Reading erp data...<br>Computing the requested mean cluster scalp maps (only done once)<br><br>3/14 polarities inverted while reading component scalp maps<br><br>Inverting ERP component polarities based on scalp map polarities<br>Reading erp data...<br>Computing the requested mean cluster scalp maps (only done once)<br><br>2/27 polarities inverted while reading component scalp maps<br><br>Inverting ERP component polarities based on scalp map polarities<br>Reading erp data...<br>Computing the requested mean cluster scalp maps (only done once)<br><br>1/16 polarities inverted while reading component scalp maps<br><br>Inverting ERP component polarities based on scalp map polarities<br>Reading erp data...<br>Computing the requested mean cluster scalp maps (only done once)<br><br>8/23 polarities inverted while reading component scalp maps<br><br>Inverting ERP component polarities based on scalp map polarities<br>Reading erp data...<br>Computing the requested mean cluster scalp maps (only done once)<br><br>6/41 polarities inverted while reading component scalp maps<br><br>Inverting ERP component polarities based on scalp map polarities<br>Reading erp data...<br>Computing the requested mean cluster scalp maps (only done once)<br><br>7/20 polarities inverted while reading component scalp maps<br><br>Inverting ERP component polarities based on scalp map polarities<br>Reading erp data...<br>Computing the requested mean cluster scalp maps (only done once)<br><br>4/23 polarities inverted while reading component scalp maps<br><br>Inverting ERP component polarities based on scalp map polarities<br>Reading erp data...<br>Computing the requested mean cluster scalp maps (only done once)<br><br>1/22 polarities inverted while reading component scalp maps<br><br>Inverting ERP component polarities based on scalp map polarities<br>Reading erp data...<br>Computing the requested mean cluster scalp maps (only done once)<br><br>4/15 polarities inverted while reading component scalp maps<br><br>Inverting ERP component polarities based on scalp map polarities<br>No outlier cluster: Cls 2 and after will be used.<br>No need to separate topos into groups.<span class=""><br>Error using * <br>Inner matrix dimensions must agree.<br><br>Error in std_envtopo (line 322)<br> convTopoErp{1, cls}{columnwise,rowwise} = tmpTopo3*erp; %min abs =<br> zero<br><br>Error in gui_std_envtopo>startButton_<wbr>Callback (line 560)<br>STUDY = std_envtopo(STUDY, ALLEEG, arguments{:});<br><br>Error in gui_mainfcn (line 96)<br> feval(varargin{:});<br><br>Error in gui_std_envtopo (line 42)<br> gui_mainfcn(gui_State, varargin{:});<br><br>Error in<br>@(hObject,eventdata)gui_std_<wbr>envtopo('startButton_Callback'<wbr>,hObject,eventdata,guidata(<wbr>hObject))<br><br> <br>Error while evaluating uicontrol Callback</span></blockquote><div><br></div><div>As a side note, I'm not sure if this following error message has any significance, nor do I know what it means. I save datasets as one .set file (not header and data). <br></div><div><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Note that your memory options for saving datasets does not correspond<br>to the format of the datasets on disk (ignoring memory options)<br></blockquote><div><br></div><div>If I create a STUDY from the GUI selecting for example 11 sz sets, std_envtopo works as intended. I am attaching my pipeline script for pre-processing and STUDY creation, if this could be of any help. I suspect there is something wrong in the way I create the STUDY. <br><br></div><div>Best wishes,<br></div><div>Martin<br></div></div></div></div></div></div><div class="gmail_extra"><span class=""><br clear="all"><div><div class="m_4307749788021674643gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div><div>Venlig hilsen / Best wishes<br>Martin<br></div><br></div><div>Stud. Med. <br></div><div>University of Copenhagen<br></div><div><br></div>Center for Neuropsychiatric Schizophrenia Research (CNSR) &
Center for Clinical Intervention and Neuropsychiatric Schizophrenia
Research (CINS)
<div>Copenhagen University Hospital<br>Psychiatric Centre Glostrup<br>Ndr. Ringvej <br>DK-2600 Glostrup<br>Denmark</div>
e-mail: <a href="mailto:nikolaj@cnsr.dk" target="_blank">cmmrandau@gmail.com</a> <br>phone: <a href="tel:%2B45%203864%200844" value="+4538640844" target="_blank">+45 42744285</a></div><div><div><div><br><div><div><div><div><br></div></div></div></div></div></div></div></div></div></div></div></div>
<br></span><div><div class="h5"><div class="gmail_quote">2016-10-20 21:03 GMT+02:00 Clement Lee <span dir="ltr"><<a href="mailto:cll008@eng.ucsd.edu" target="_blank">cll008@eng.ucsd.edu</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">My understanding (after checking with Makoto) is that the important part of the "running ICA twice" process is the removal of the bad epochs, not so much the ICA weights. So when you run your second instance of ICA, you're okay as long as you call an EEG set with bad epochs removed.<span class="m_4307749788021674643HOEnZb"><font color="#888888"><div><br></div><div>Clement</div></font></span></div><div class="m_4307749788021674643HOEnZb"><div class="m_4307749788021674643h5"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Oct 20, 2016 at 11:24 AM, Martin Randau <span dir="ltr"><<a href="mailto:cmmrandau@gmail.com" target="_blank">cmmrandau@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div><div><div>Hello again Clement and Makoto<br><br></div>I forgot to cc Makoto in my reply to Clement. My question is whether doing the following is the correct way when I want to run two ICA on the same dataset first on contionous data and again after removing bad epochs:<br><br></div><blockquote>contEEG = pop_runica(EEG);<br><br></blockquote></div><blockquote>% removing epochs<br><br></blockquote></div><blockquote>cleanEEG = pop_runica(contEEG);</blockquote><br><br></div>after which I save cleanEEG as a set (containing all conditions) and use this in the STUDY.<br><br></div>Best wishes,<br></div>Martin<br></div><div class="gmail_extra"><br clear="all"><div><div class="m_4307749788021674643m_7813874743669684398m_2231823059838243382gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div><div>Venlig hilsen / Best wishes<br>Martin<br></div><br></div><div>Stud. Med. <br></div><div>University of Copenhagen<br></div><div><br></div>Center for Neuropsychiatric Schizophrenia Research (CNSR) &
Center for Clinical Intervention and Neuropsychiatric Schizophrenia
Research (CINS)
<div>Copenhagen University Hospital<br>Psychiatric Centre Glostrup<br>Ndr. Ringvej <br>DK-2600 Glostrup<br>Denmark</div>
e-mail: <a href="mailto:nikolaj@cnsr.dk" target="_blank">cmmrandau@gmail.com</a> <br>phone: <a href="tel:%2B45%203864%200844" value="+4538640844" target="_blank">+45 42744285</a></div><div><div><div><br><div><div><div><div><br></div></div></div></div></div></div></div></div></div></div></div></div>
<br><div class="gmail_quote">2016-10-20 18:33 GMT+02:00 Clement Lee <span dir="ltr"><<a href="mailto:cll008@eng.ucsd.edu" target="_blank">cll008@eng.ucsd.edu</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Oh yes I misread your question. I'm not too familiar with running ICA twice, but doing it the way I wrote would NOT use the old ICA weights.</div><div class="m_4307749788021674643m_7813874743669684398m_2231823059838243382HOEnZb"><div class="m_4307749788021674643m_7813874743669684398m_2231823059838243382h5"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Oct 20, 2016 at 8:39 AM, Martin Randau <span dir="ltr"><<a href="mailto:cmmrandau@gmail.com" target="_blank">cmmrandau@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">Thank you Clement, I will try this. But don't you mean </p>
<p dir="ltr">cleanEEG = pop_runica(contEEG) so that we apply the second ICA to contEEG that came out of the first ICA? </p>
<p dir="ltr">Best wishes,<br>
Martin </p>
<div class="gmail_extra"><br><div class="gmail_quote">On Oct 18, 2016 21:47, "Clement Lee" <<a href="mailto:cll008@eng.ucsd.edu" target="_blank">cll008@eng.ucsd.edu</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">No problem at all. Keep us posted and let us know if you run into any problems.<div><br></div><div>For scripting ICA twice, what you have should work as long as you save after the first instance and before the second. Alternatively, it may be better practice to use something like 'contEEG' and 'cleanEEG' as variable names to keep a clear record.</div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><br></div><div>contEEG = pop_runica(EEG); % ica of continuous EEG</div><div><br></div><div>%% remove bad epochs of EEG; </div></blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div>% steps to clean bad epochs here in this section</div><div>%%</div><div><br></div></blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div>cleanEEG = pop_runica(EEG) % ica of cleaned EEG</div></blockquote><br><div>Of course, for any processes thereafter you would call 'contEEG' or 'cleanEEG' instead of just 'EEG'.</div><div><br></div><div>Clement</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Oct 18, 2016 at 12:32 PM, Martin Randau <span dir="ltr"><<a href="mailto:cmmrandau@gmail.com" target="_blank">cmmrandau@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div><div>Dear Clement and Makoto,<br><br></div>Thank you for your replies. I think the problem was that I had created separate sets for each condition. I am currently re-processing my test data consisting of 30 subjects (15 patients and 15 controls) and expect this to be ready by Thursday (my computer is not the fastest available).<br><br></div>My setup is EEG data on an oddball paradigm (standard stimulus, duration deviant, frequency deviant and frequency+duration deviant) in order to analyze MMN, much like the Rissling, Makeig et al article. We have data from about 100 subjects in total.<br><br>I run a pre-processing pipeline much inspired by Makoto's pipeline but I run 2x ICA, one on continous data and one after removal of 5-10% bad epochs. I then create 4 separate sets for each stimulus type and load them into a STUDY as different conditions. This last part seems to be the problem! <br><br>In my new setup I have one set per subject and divide the two groups (patient and control) as different 'conditions' instead of 'groups', and plan to use 'events' as markers for the stimulus types. <br><br></div>I also had some problems using std_selectICsByCluster but I suspect this is also because I had different sets for the conditions.<br><br></div>I will get back to you on Thursday or Friday when I have tested my new data.<br><br></div>While I have you on the line, I have another question regarding running ICA twice. In my script I simply have EEG = pop_runica(EEG) twice, once before epoching and again after removing bad epochs. Is this the correct way, or am I running a new ICA and not including the old weights? I have read on the list about applying ICA weights to the data but I have not studied this further, as I assumed running pop_runica a second time automatically includes the old ICA. <br><br></div>Once again, thank you for taking the time to help out! :)<br></div><div class="gmail_extra"><span><br clear="all"><div><div class="m_4307749788021674643m_7813874743669684398m_2231823059838243382m_829419659770227261m_2725323328770160735m_-3538197375798658433m_-8986139902175364335gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div><div>Venlig hilsen / Best wishes<br>Martin<br></div><br></div><div>Stud. Med. <br></div><div>University of Copenhagen<br></div><div><br></div>Center for Neuropsychiatric Schizophrenia Research (CNSR) &
Center for Clinical Intervention and Neuropsychiatric Schizophrenia
Research (CINS)
<div>Copenhagen University Hospital<br>Psychiatric Centre Glostrup<br>Ndr. Ringvej <br>DK-2600 Glostrup<br>Denmark</div>
e-mail: <a href="mailto:nikolaj@cnsr.dk" target="_blank">cmmrandau@gmail.com</a> <br>phone: <a href="tel:%2B45%203864%200844" value="+4538640844" target="_blank">+45 42744285</a></div><div><div><div><br><div><div><div><div><br></div></div></div></div></div></div></div></div></div></div></div></div>
<br></span><div><div class="m_4307749788021674643m_7813874743669684398m_2231823059838243382m_829419659770227261m_2725323328770160735m_-3538197375798658433h5"><div class="gmail_quote">2016-10-18 21:06 GMT+02:00 Clement Lee <span dir="ltr"><<a href="mailto:cll008@eng.ucsd.edu" target="_blank">cll008@eng.ucsd.edu</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Sorry for your troubles Martin, and thanks for reporting the issue. In addition to Makoto's questions, I'm curious if you used any optional inputs while running std_envtopo, and whether or not you used an older version of std_envtopo on the same dataset before downloading the current version.<span class="m_4307749788021674643m_7813874743669684398m_2231823059838243382m_829419659770227261m_2725323328770160735m_-3538197375798658433m_-8986139902175364335HOEnZb"><font color="#888888"><div><br></div><div>Clement</div></font></span><div><div class="m_4307749788021674643m_7813874743669684398m_2231823059838243382m_829419659770227261m_2725323328770160735m_-3538197375798658433m_-8986139902175364335h5"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Oct 18, 2016 at 12:51 AM, Makoto Miyakoshi <span dir="ltr"><<a href="mailto:mmiyakoshi@ucsd.edu" target="_blank">mmiyakoshi@ucsd.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Dear Martin,<div><br></div><div>Sorry for inconvenience.</div><div><br></div><div><font color="#ff0000">Error using *<br>Inner matrix dimensions must agree.<br><br>Error in std_envtopo (line 322)<br> convTopoErp{1, cls}{columnwise,rowwise} = tmpTopo3*erp; </font><br></div><div class="gmail_extra"><br></div><div class="gmail_extra">Hmm this means you have different number of IC topos and ERPs. How could it be possible? I definitely need more info to troubleshoot this. What's your STUDY design, and how did you create STUDY? Did you, for example, separate conditions into different .set files?</div><div class="gmail_extra"><br></div><div class="gmail_extra">Makoto</div><div class="gmail_extra"><br></div><div class="gmail_extra"><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Oct 10, 2016 at 1:22 AM, Martin Randau <span dir="ltr"><<a href="mailto:cmmrandau@gmail.com" target="_blank">cmmrandau@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Hello all,<br><div><br>I am having problems with the plugin std_envtopo. When running it from the gui on a study composed of 2 groups with 4 conditions each fresh after clustering I get this error:<br><br><blockquote>Error using *<br>Inner matrix dimensions must agree.<br><br>Error in std_envtopo (line 322)<br> convTopoErp{1, cls}{columnwise,rowwise} = tmpTopo3*erp; %min abs =<br> zero<br><br>Error in gui_std_envtopo>startButton_Ca<wbr>llback (line 560)<br>STUDY = std_envtopo(STUDY, ALLEEG, arguments{:});<br><br>Error in gui_mainfcn (line 96)<br> feval(varargin{:});<br><br>Error in gui_std_envtopo (line 42)<br> gui_mainfcn(gui_State, varargin{:});<br><br>Error in<br>@(hObject,eventdata)gui_std_en<wbr>vtopo('startButton_Callback',h<wbr>Object,eventdata,guidata(hObje<wbr>ct))<br><br> <br>Error while evaluating uicontrol Callback</blockquote><div><div>Sometimes the error goes away after running the 'precompute component measures' -> 'build preclustering array' -> 'cluster components' but this is often not the case. I do not know what is causing the error, so please let me know if you need more information. I am able to plot everything (scalp maps, ERP, dipoles, power spectrum) from the 'edit/plot clusters' menu. Number of sessions, conditions and groups are consistent in the dataset.<br><br><br clear="all"><div><div class="m_4307749788021674643m_7813874743669684398m_2231823059838243382m_829419659770227261m_2725323328770160735m_-3538197375798658433m_-8986139902175364335m_-2416736054733668775m_-5599449754252668647gmail-m_-6972430818643483882gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div><div>Venlig hilsen / Best wishes<br>Martin<br></div><br></div><div>Stud. Med. <br></div><div>University of Copenhagen<br></div><div><br></div>Center for Neuropsychiatric Schizophrenia Research (CNSR) &
Center for Clinical Intervention and Neuropsychiatric Schizophrenia
Research (CINS)
<div>Copenhagen University Hospital<br>Psychiatric Centre Glostrup<br>Ndr. Ringvej <br>DK-2600 Glostrup<br>Denmark</div>
e-mail: <a href="mailto:nikolaj@cnsr.dk" target="_blank">cmmrandau@gmail.com</a> <br>phone: <a value="+4538640844" href="tel:%2B45%203864%200844" target="_blank">+45 42744285</a></div><div><div><div><br><div><div><div><div><br></div></div></div></div></div></div></div></div></div></div></div></div>
</div></div></div></div>
<br>______________________________<wbr>_________________<br>
Eeglablist page: <a href="http://sccn.ucsd.edu/eeglab/eeglabmail.html" rel="noreferrer" target="_blank">http://sccn.ucsd.edu/eeglab/ee<wbr>glabmail.html</a><br>
To unsubscribe, send an empty email to <a href="mailto:eeglablist-unsubscribe@sccn.ucsd.edu" target="_blank">eeglablist-unsubscribe@sccn.uc<wbr>sd.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.e<wbr>du</a><span class="m_4307749788021674643m_7813874743669684398m_2231823059838243382m_829419659770227261m_2725323328770160735m_-3538197375798658433m_-8986139902175364335m_-2416736054733668775HOEnZb"><font color="#888888"><br></font></span></blockquote></div><span class="m_4307749788021674643m_7813874743669684398m_2231823059838243382m_829419659770227261m_2725323328770160735m_-3538197375798658433m_-8986139902175364335m_-2416736054733668775HOEnZb"><font color="#888888"><br><br clear="all"><span class="m_4307749788021674643m_7813874743669684398HOEnZb"><font color="#888888"><span class="m_4307749788021674643m_7813874743669684398m_2231823059838243382m_829419659770227261HOEnZb"><font color="#888888"><div><br></div>-- <br><div class="m_4307749788021674643m_7813874743669684398m_2231823059838243382m_829419659770227261m_2725323328770160735m_-3538197375798658433m_-8986139902175364335m_-2416736054733668775m_-5599449754252668647gmail_signature"><div dir="ltr">Makoto Miyakoshi<br>Swartz Center for Computational Neuroscience<br>Institute for Neural Computation, University of California San Diego<br></div></div>
</font></span></font></span></font></span></div></div><span class="m_4307749788021674643m_7813874743669684398HOEnZb"><font color="#888888"><span class="m_4307749788021674643m_7813874743669684398m_2231823059838243382m_829419659770227261HOEnZb"><font color="#888888">
</font></span></font></span></blockquote></div><span class="m_4307749788021674643m_7813874743669684398HOEnZb"><font color="#888888"><span class="m_4307749788021674643m_7813874743669684398m_2231823059838243382m_829419659770227261HOEnZb"><font color="#888888"><br></font></span></font></span></div></div></div></div><span class="m_4307749788021674643m_7813874743669684398HOEnZb"><font color="#888888"><span class="m_4307749788021674643m_7813874743669684398m_2231823059838243382m_829419659770227261HOEnZb"><font color="#888888">
</font></span></font></span></blockquote></div><span class="m_4307749788021674643m_7813874743669684398HOEnZb"><font color="#888888"><span class="m_4307749788021674643m_7813874743669684398m_2231823059838243382m_829419659770227261HOEnZb"><font color="#888888"><br></font></span></font></span></div></div></div><span class="m_4307749788021674643m_7813874743669684398HOEnZb"><font color="#888888"><span class="m_4307749788021674643m_7813874743669684398m_2231823059838243382m_829419659770227261HOEnZb"><font color="#888888">
</font></span></font></span></blockquote></div><span class="m_4307749788021674643m_7813874743669684398HOEnZb"><font color="#888888"><span class="m_4307749788021674643m_7813874743669684398m_2231823059838243382m_829419659770227261HOEnZb"><font color="#888888"><br></font></span></font></span></div><span class="m_4307749788021674643m_7813874743669684398HOEnZb"><font color="#888888">
</font></span></blockquote></div></div><span class="m_4307749788021674643m_7813874743669684398HOEnZb"><font color="#888888">
</font></span></blockquote></div><span class="m_4307749788021674643m_7813874743669684398HOEnZb"><font color="#888888"><br></font></span></div>
</div></div></blockquote></div><br></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Makoto Miyakoshi<br>Swartz Center for Computational Neuroscience<br>Institute for Neural Computation, University of California San Diego<br></div></div>
</div>