<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Arial,Helvetica,sans-serif;" dir="ltr">
<p>Dear Eric,</p>
<p><br>
</p>
<p>No worries about not being explicit.&nbsp;I actually&nbsp;did implement your suggestion as written below the first time around. So, to be clear,&nbsp;</p>
<p><span style="background-color: rgb(248, 248, 248); font-size: 0.85em; font-family: Consolas, Inconsolata, Courier, monospace, serif, EmojiFont; color: rgb(33, 33, 33);"><br>
</span></p>
<p><span style="background-color: rgb(248, 248, 248); font-size: 0.85em; font-family: Consolas, Inconsolata, Courier, monospace, serif, EmojiFont; color: rgb(33, 33, 33);">evokeds[subject] = {cond: epochs[subject][cond][0].average() for cond in conditions}</span></p>
<p><br>
</p>
<p><span style="font-family: Calibri, Arial, Helvetica, sans-serif, EmojiFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, NotoColorEmoji, &quot;Segoe UI Symbol&quot;, &quot;Android Emoji&quot;, EmojiSymbols; font-size: 16px;">...only returns a single epoch. Sorry for the miscommunication.</span><br>
</p>
<div id="Signature">
<div id="divtagdefaultwrapper" dir="ltr" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Arial, Helvetica, sans-serif, EmojiFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, NotoColorEmoji, &quot;Segoe UI Symbol&quot;, &quot;Android Emoji&quot;, EmojiSymbols;">
<p><span style="color:rgb(0,0,0); font-family:arial,sans-serif; font-size:12.8px">---------------------------------------------------------</span></p>
<span style="color:rgb(0,0,0)"></span>
<p><span style="color:rgb(0,0,0); font-family:arial,sans-serif; font-size:12.8px">Lyam Bailey, BSc.</span><br>
<span style="color:rgb(0,0,0)"></span></p>
<span style="color:rgb(0,0,0)"></span>
<p></p>
<span style="color:rgb(0,0,0)"></span>
<div style="color:rgb(136,136,136); font-family:arial,sans-serif; font-size:12.8px">
<span style="color:rgb(0,0,0)">Graduate Student</span></div>
<span style="color:rgb(0,0,0)"></span>
<div style="color:rgb(136,136,136); font-family:arial,sans-serif; font-size:12.8px">
<span style="color:rgb(0,0,0)">Department of Psychology &amp; Neuroscience</span></div>
<span style="color:rgb(0,0,0)"></span>
<div style="color:rgb(136,136,136); font-family:arial,sans-serif; font-size:12.8px">
<span style="color:rgb(0,0,0)">Dalhousie University</span></div>
<br>
<p></p>
</div>
</div>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> mne_analysis-bounces@nmr.mgh.harvard.edu &lt;mne_analysis-bounces@nmr.mgh.harvard.edu&gt; on behalf of Eric Larson &lt;larson.eric.d@gmail.com&gt;<br>
<b>Sent:</b> Wednesday, June 21, 2017 3:06:33 PM<br>
<b>To:</b> Discussion and support forum for the users of MNE Software<br>
<b>Subject:</b> Re: [Mne_analysis] Indexing the nth epoch of a condition</font>
<div>&nbsp;</div>
</div>
<div>
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
<div id="m_-1920194034686313253gmail-m_1932312320510065682divtagdefaultwrapper" style="font-size:12pt;color:rgb(0,0,0);font-family:Calibri,Arial,Helvetica,sans-serif" dir="ltr">
<p>Thanks for your email. Unfortunately this didn't work - it simply returned a single epoch per subject (the first epoch in the dataset, I suspect).</p>
</div>
</div>
</blockquote>
<div>This sounds very close to what you want. I probably should have been more explicit and noted that the code I suggested would need to be looped over conditions (cond), like:<br>
</div>
<div></div>
<div class="m_-1920194034686313253markdown-here-wrapper">
<pre style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;font-size:1em;line-height:1.2em;margin:1.2em 0px"><code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline;white-space:pre-wrap;overflow:auto;border-radius:3px;border:1px solid rgb(204,204,204);padding:0.5em 0.7em;display:block!important">evokeds[subject] = {cond: epochs[subject][cond][0].<wbr>average() for cond in conditions}
</code></pre>
<div title="MDH:PGRpdj5gYGA8L2Rpdj48ZGl2PmZvciBzdWJqZWN0IGluIHN1YmplY3RzOjwvZGl2PjxkaXY&#43;PHNw
YW4gc3R5bGU9ImNvbG9yOiByZ2IoMCwgMCwgMCk7IGZvbnQtZmFtaWx5OiBDYWxpYnJpLCBBcmlh
bCwgSGVsdmV0aWNhLCBzYW5zLXNlcmlmOyBmb250LXNpemU6IDEzLjMzMzNweDsiPiZuYnNwOyAm
bmJzcDsgZXZva2VkW3N1YmplY3RdID0ge2NvbmQ6KGVwb2Noc1tzdWJqZWN0XVtjb25kXVswXSku
PC9zcGFuPjx3YnIgc3R5bGU9ImNvbG9yOiByZ2IoMCwgMCwgMCk7IGZvbnQtZmFtaWx5OiBDYWxp
YnJpLCBBcmlhbCwgSGVsdmV0aWNhLCBzYW5zLXNlcmlmOyBmb250LXNpemU6IDEzLjMzMzNweDsi
PjxzcGFuIHN0eWxlPSJjb2xvcjogcmdiKDAsIDAsIDApOyBmb250LWZhbWlseTogQ2FsaWJyaSwg
QXJpYWwsIEhlbHZldGljYSwgc2Fucy1zZXJpZjsgZm9udC1zaXplOiAxMy4zMzMzcHg7Ij5hdmVy
YWdlKCkgZm9yIGNvbmQgaW4gJm5ic3A7KGNvbmRpdGlvbnMpfTwvc3Bhbj48YnI&#43;PC9kaXY&#43;PGRp
dj5gYGA8L2Rpdj48ZGl2PjwvZGl2Pg==" style="height:0;width:0;max-height:0;max-width:0;overflow:hidden;font-size:0em;padding:0;margin:0">
​</div>
</div>
<div>HTH,<br>
</div>
<div>Eric</div>
<div><br>
</div>
</div>
</div>
</div>
</div>
</body>
</html>