<div dir="ltr">No problem, glad it&#39;s working!<div><br></div><div>Eric</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jun 21, 2017 at 10:27 AM, Lyam Bailey <span dir="ltr">&lt;<a href="mailto:Lyam.Bailey@dal.ca" target="_blank">Lyam.Bailey@dal.ca</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



<div>

<div id="m_5143015961154667447divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Arial,Helvetica,sans-serif" dir="ltr">
<p></p>
<p 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">
Dear Eric,</p>
<p 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">
<br>
</p>
<p 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">
Many apologies...please disregard my last email. It seems that I was misreading my output - your suggestion DID indeed work. In answer to your question, by &#39;returns&#39; I was referring to which epochs were being selected for averaging. So
<span style="color:rgb(33,33,33);font-family:Consolas,Inconsolata,Courier,monospace,serif,EmojiFont;font-size:13.6px;background-color:rgb(248,248,248)">
epochs[subject][cond][0] </span>selec<wbr>ted/returned the first instance of each condition, as intended.</p>
<p 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">
<br>
</p>
<p 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">
Thanks very much for the help, and again, sorry for the miscommunication. </p>
<div><br>
</div>
Kind regards
<p></p>
<p>Lyam</p><span class="">
<p><br>
</p>
<div id="m_5143015961154667447Signature">
<div id="m_5143015961154667447divtagdefaultwrapper" 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">------------------------------<wbr>---------------------------</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>
</span></div>
<hr style="display:inline-block;width:98%">
<div id="m_5143015961154667447divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><span class=""><b>From:</b> <a href="mailto:mne_analysis-bounces@nmr.mgh.harvard.edu" target="_blank">mne_analysis-bounces@nmr.mgh.<wbr>harvard.edu</a> &lt;<a href="mailto:mne_analysis-bounces@nmr.mgh.harvard.edu" target="_blank">mne_analysis-bounces@nmr.mgh.<wbr>harvard.edu</a>&gt; on behalf of Eric Larson &lt;<a href="mailto:larson.eric.d@gmail.com" target="_blank">larson.eric.d@gmail.com</a>&gt;<br>
</span><b>Sent:</b> Wednesday, June 21, 2017 3:20:30 PM<span class=""><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</span></font>
<div> </div>
</div>
<div>
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<div id="m_5143015961154667447m_8099910858284257811m_1517192722679457779divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Arial,Helvetica,sans-serif" dir="ltr">
<span>
<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].avera<wbr>ge() for cond in conditions}</span></p>
<p><br>
</p>
</span><div><div class="h5">
<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></p>
</div></div></div>
</div>
</blockquote><div><div class="h5">
<div>Can you be a bit clearer about what you mean by &quot;returns&quot;? Which variables are what length? For example, if evokeds[subject] is a length-1 dictionary (what I think you&#39;re saying), this is only possible if `conditions` is itself also length 1. But every
 entry in the `evokeds[subject]` dict should be an Evoked instance with `nave==1`, namely the first (valid) epoch from that condition, which is what I think you&#39;re trying to get.</div>
<div><br>
</div>
<div>Eric</div>
<div><br>
</div>
</div></div></div>
</div>
</div>
</div>
</div>

<br>______________________________<wbr>_________________<br>
Mne_analysis mailing list<br>
<a href="mailto:Mne_analysis@nmr.mgh.harvard.edu">Mne_analysis@nmr.mgh.harvard.<wbr>edu</a><br>
<a href="https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis" rel="noreferrer" target="_blank">https://mail.nmr.mgh.harvard.<wbr>edu/mailman/listinfo/mne_<wbr>analysis</a><br>
<br>
<br>
The information in this e-mail is intended only for the person to whom it is<br>
addressed. If you believe this e-mail was sent to you in error and the e-mail<br>
contains patient information, please contact the Partners Compliance HelpLine at<br>
<a href="http://www.partners.org/complianceline" rel="noreferrer" target="_blank">http://www.partners.org/<wbr>complianceline</a> . If the e-mail was sent to you in error<br>
but does not contain patient information, please contact the sender and properly<br>
dispose of the e-mail.<br>
<br></blockquote></div><br></div>