<div dir="ltr"><br><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Stephen Clarke</b> <span dir="ltr"><<a href="mailto:stephen.elisha.clarke@gmail.com">stephen.elisha.clarke@gmail.com</a>></span><br>Date: Tue, Dec 30, 2014 at 10:11 AM<br>Subject: cfg<br>To: <a href="mailto:fieldtrip@science.ru.nl">fieldtrip@science.ru.nl</a><br><br><br><div dir="ltr"><p class="MsoNormal" style="font-size:13.3333339691162px">Hello,</p><p class="MsoNormal" style="font-size:13.3333339691162px"><br></p><p class="MsoNormal" style="font-size:13.3333339691162px">A colleague and I are interested in using wavelets to analyze resting state (rMEG) and working memory (tMEG) data from the Human Connectome Project, in order to directly compare resting state and working memory conditions.</p><p class="MsoNormal" style="font-size:13.3333339691162px"><br></p><p class="MsoNormal" style="font-size:13.3333339691162px">It appears that ft_freqanalysis.m works with the preprocessed HCP data. <span style="font-size:13.3333339691162px">Our question concerns the cfg structures.</span></p><p class="MsoNormal" style="font-size:13.3333339691162px"><br></p><p class="MsoNormal" style="font-size:13.3333339691162px">For rMEG, the data.time structure is 1x147 cell, where each cell is a 1x1018 double, each going from <span style="font-size:13.3333339691162px">0 to 1.9995 (0.001966075273231 increments).</span></p><p class="MsoNormal" style="font-size:13.3333339691162px"><br></p><p class="MsoNormal" style="font-size:13.3333339691162px">tMEG recordings have been divided into epochs for TIM (onset of image) and TRESP (onset of response). The data.time structure is a 1x166 cell, where each cell is a 1x2035 double, each going from <span style="font-size:13.3333339691162px">-1.4996 to 2.4994 (0.002 increments).</span></p><p class="MsoNormal" style="font-size:13.3333339691162px"><br></p><p class="MsoNormal" style="font-size:13.3333339691162px">If we use the same cfg.foi / cfg.toi inputs for each case, we get cfg.freq structures which are not equivalent.</p><p class="MsoNormal" style="font-size:13.3333339691162px"><br></p><p class="MsoNormal" style="font-size:13.3333339691162px">E.g., when using</p><p class="MsoNormal" style="margin-bottom:0.0001pt;font-size:13.3333339691162px"><span style="font-size:10pt;font-family:'Courier New';color:rgb(34,139,34)">% cfg = [];</span><span style="font-size:12pt;font-family:'Courier New'"></span></p><p class="MsoNormal" style="margin-bottom:0.0001pt;font-size:13.3333339691162px"><span style="font-size:10pt;font-family:'Courier New';color:rgb(34,139,34)">% cfg.channel    = 'MEG';                  </span><span style="font-size:12pt;font-family:'Courier New'"></span></p><p class="MsoNormal" style="margin-bottom:0.0001pt;font-size:13.3333339691162px"><span style="font-size:10pt;font-family:'Courier New';color:rgb(34,139,34)">% cfg.method     = 'wavelet';               </span><span style="font-size:12pt;font-family:'Courier New'"></span></p><p class="MsoNormal" style="margin-bottom:0.0001pt;font-size:13.3333339691162px"><span style="font-size:10pt;font-family:'Courier New';color:rgb(34,139,34)">% cfg.width      = 7;</span><span style="font-size:12pt;font-family:'Courier New'"></span></p><p class="MsoNormal" style="margin-bottom:0.0001pt;font-size:13.3333339691162px"><span style="font-size:10pt;font-family:'Courier New';color:rgb(34,139,34)">% cfg.output     = 'pow';  </span><span style="font-size:12pt;font-family:'Courier New'"></span></p><p class="MsoNormal" style="margin-bottom:0.0001pt;font-size:13.3333339691162px"><span style="font-size:10pt;font-family:'Courier New';color:rgb(34,139,34)">% cfg.foi        = 1:0.01:100;                   </span><span style="font-size:12pt;font-family:'Courier New'"></span></p><p class="MsoNormal" style="margin-bottom:0.0001pt;font-size:13.3333339691162px"><span style="font-size:10pt;font-family:'Courier New';color:rgb(34,139,34)">% cfg.toi        = -0.5:0.1:1.5;   </span><span style="font-size:12pt;font-family:'Courier New'"></span></p><p class="MsoNormal" style="font-size:13.3333339691162px"> </p><p class="MsoNormal" style="font-size:13.3333339691162px">The TFRwave.freq outputs using this code are:</p><p class="MsoNormal" style="font-size:13.3333339691162px"><br></p><p class="MsoNormal" style="font-size:13.3333339691162px"> rMEG: cfg.freq --> size 1x200.</p><p class="MsoNormal" style="font-size:13.3333339691162px"> tMEG: cgf.freq --> size  1x400.</p><p class="MsoNormal" style="font-size:13.3333339691162px"><br></p><p class="MsoNormal" style="font-size:13.3333339691162px">As well, we get several warnings:              </p><p class="MsoNormal" style="font-size:13.3333339691162px">“<span style="color:rgb(237,125,49)">the input is raw data with 244 channels and 144 trials</span>”, which it is not (it is preprocessed data).</p><p class="MsoNormal" style="font-size:13.3333339691162px">“<span style="color:rgb(237,125,49)">the trial definition in the configuration is inconsistent with the actual data</span>”</p><p class="MsoNormal" style="font-size:13.3333339691162px">“<span style="color:rgb(237,125,49)">reconstructing sampleinfo by assuming that the trials are consecutive segments of a continuous recording</span>”</p><p class="MsoNormal" style="font-size:13.3333339691162px"><br></p><p class="MsoNormal" style="font-size:13.3333339691162px">By using different cfg inputs to account for differences in the time sampling for the resting and working memory data, we get similar errors, though both output .freq structures are ~1x400 in this case.</p><p class="MsoNormal" style="font-size:13.3333339691162px"><br></p><p class="MsoNormal" style="margin-bottom:0.0001pt;font-size:13.3333339691162px"><span style="font-size:10pt;font-family:'Courier New';color:rgb(34,139,34)">%%for resting state cfg_rs</span></p><p class="MsoNormal" style="margin-bottom:0.0001pt;font-size:13.3333339691162px"><span style="font-size:10pt;font-family:'Courier New';color:black">cfg_rs.foi        = 1:0.01:200;                 </span><span style="font-size:12pt;font-family:'Courier New'"></span></p><p class="MsoNormal" style="margin-bottom:0.0001pt;font-size:13.3333339691162px"><span style="font-size:10pt;font-family:'Courier New';color:black">cfg_rs.toi        = -1.5:0.002:2.5;</span><span style="font-size:12pt;font-family:'Courier New'"></span></p><p class="MsoNormal" style="margin-bottom:0.0001pt;font-size:13.3333339691162px"><span style="font-size:10pt;font-family:'Courier New';color:black"> </span><span style="font-size:12pt;font-family:'Courier New'"></span></p><p class="MsoNormal" style="margin-bottom:0.0001pt;font-size:13.3333339691162px"><span style="font-size:10pt;font-family:'Courier New';color:rgb(34,139,34)">%%for wm data cfg_wm</span></p><p class="MsoNormal" style="margin-bottom:0.0001pt;font-size:13.3333339691162px"><span style="font-size:10pt;font-family:'Courier New';color:black">cfg_wm.foi        = 1:0.01:100;                </span><span style="font-size:12pt;font-family:'Courier New'"></span></p><p class="MsoNormal" style="margin-bottom:0.0001pt;font-size:13.3333339691162px"><span style="font-size:10pt;font-family:'Courier New';color:black">cfg_wm.toi        = 0:0.0019:2;</span></p><p class="MsoNormal" style="margin-bottom:0.0001pt;font-size:13.3333339691162px"><span style="font-size:10pt;font-family:'Courier New';color:black"> </span></p>Any advice on appropriate configuration structures for wavelet analysis of this data would be greatly appreciated.<br><br>Thanks,<br><br>Steve<p class="MsoNormal" style="margin-bottom:0.0001pt;font-size:13.3333339691162px"><span style="font-size:12pt;font-family:'Courier New'"> </span></p></div>
</div><br></div>