<div dir="ltr"><p dir="ltr">I see. Sounds like that would work, I&#39;ll give it a try. thanks.<br></p><p>FWIW, from the POV of a new mne-python user, the examples quite prominently use &quot;evoked&quot; to mean &quot;average of epochs&quot; (e.g., <a href="http://martinos.org/mne/dev/auto_tutorials/plot_introduction.html?highlight=evoked">http://martinos.org/mne/dev/auto_tutorials/plot_introduction.html?highlight=evoked</a>).  I probably missed the Epochs.iter_evoked method() on the basis of its name (because I didn&#39;t want averages, and it wasn&#39;t immediately obvious that &quot;nave=1&quot; meant &quot;n_epochs_to_average=1&quot;, i.e., no averaging).<br></p><p>So now I&#39;m doubly-puzzled: why does Epochs.next() not return a single epoch, and why does Epochs.iter_evoked() not return an average of epochs?  I understand the need to preserve some backwards-compatibility, but the naming conventions here seem very ad-hoc to me and worth changing prior to a 1.0 release.  Until then, I guess I&#39;ll just change the docstrings to match what these methods actually do.<br></p>On Apr 5, 2016 5:11 PM, &quot;Mainak Jas&quot; &lt;<a href="mailto:mainakjas@gmail.com" target="_blank">mainakjas@gmail.com</a>&gt; wrote:<br type="attribution"><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 dir="ltr"><div>Sorry if I wasn&#39;t clear but iter_evoked() gives you a single epoch -- not an average. It has nave=1.<br><br></div>Mainak<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Apr 6, 2016 at 1:45 AM, Dan McCloy <span dir="ltr">&lt;<a href="mailto:drmccloy@uw.edu" target="_blank">drmccloy@uw.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">thanks Mainak, but my use case is a little strange, and I don&#39;t think iter_evoked will help.  I need potentially different crop windows for each event type (same length, but different start/end points), but I need to keep the individual epochs (not averages) because they&#39;re getting fed into a classifier.  I&#39;m happy to do a PR to change the docs if the consensus is that it is indeed the docs that should change, not the implementation of next().<br></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Apr 5, 2016 at 4:27 PM, Mainak Jas <span dir="ltr">&lt;<a href="mailto:mainakjas@gmail.com" target="_blank">mainakjas@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div><div><div>Hi Dan,<br><br></div>Since you are iterating over single epochs, it might make more sense to use the iterator which returns an evoked object. You can do something like:<br><br></div>for ev in epochs.iter_evoked()<br>    ev.crop(tmin, tmax)<br><br></div><div>Does this help? Fix to the docs is more than welcome.<br><br></div>Best regards,<br></div>Mainak<div><div><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Apr 5, 2016 at 10:05 PM, Dan McCloy <span dir="ltr">&lt;<a href="mailto:drmccloy@uw.edu" target="_blank">drmccloy@uw.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span>On Tue, Apr 5, 2016 at 12:19 PM, Chris Holdgraf <span dir="ltr">&lt;<a href="mailto:choldgraf@berkeley.edu" target="_blank">choldgraf@berkeley.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">sometimes it&#39;s more useful to return arrays.</div></blockquote><div><br></div></span>Sure, but that&#39;s why there is a get_data method, right?  IMO the 
docstring reflects how I expected it to work before even reading the 
docstring, so my vote would be to make .next() actually do that, rather 
than changing the docstring to reflect what it does currently.  Issue 
created: <a href="https://github.com/mne-tools/mne-python/issues/3099" target="_blank">https://github.com/mne-tools/mne-python/issues/3099</a><div><div><img src="https://ssl.gstatic.com/ui/v1/icons/mail/images/cleardot.gif"> <br></div></div><div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="gmail_extra"><br><div class="gmail_quote"><div><div>On Tue, Apr 5, 2016 at 12:03 PM, Dan McCloy <span dir="ltr">&lt;<a href="mailto:drmccloy@uw.edu" target="_blank">drmccloy@uw.edu</a>&gt;</span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div><div dir="ltr"><div><div><div><div>I was puzzled today why this works...<br><br></div><div>for ix, _ in enumerate(epochs):<br></div><div>    new_epoch = epochs[ix].crop(tmin, tmax, copy=True)<br></div><div><br></div>... but this does not:<br><br></div>for epoch in epochs:<br></div>    new_epoch = epoch.crop(..., copy=True)<br><br>AttributeError: &#39;numpy.ndarray&#39; object has no attribute &#39;crop&#39;<br><br></div>According to the docs, Epochs.next() is supposed to return an instance of the epochs object, but it doesn&#39;t: looking at the code, it actually returns something like self._data[self._current].  I would have expected it to return something like self.__get_item__(self._current).  So are the docs wrong, or is the definition of Epochs.next() implemented wrong?<br><br>Daniel McCloy<br><a href="http://dan.mccloy.info/" target="_blank">http://dan.mccloy.info/</a><br>Postdoctoral Research Associate<br>Institute for Learning and Brain Sciences<br>University of Washington<br><br></div>
<br></div></div>_______________________________________________<br>
Mne_analysis mailing list<br>
<a href="mailto:Mne_analysis@nmr.mgh.harvard.edu" target="_blank">Mne_analysis@nmr.mgh.harvard.edu</a><br>
<a href="https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis" rel="noreferrer" target="_blank">https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_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/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><span><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div><div dir="ltr"><div><div dir="ltr"><div><span style="color:rgb(136,136,136);font-size:13px;background-color:rgb(255,255,255)"><font face="garamond, serif">_____________________________________</font></span></div><div><font color="#888888" face="garamond, serif"><br></font></div><div><font color="#666666" face="garamond, serif">PhD Candidate in Neuroscience | <a href="http://hwni.org/" target="_blank">UC Berkeley</a></font></div><div><font color="#666666" face="garamond, serif">Editor and Web Director | <a href="http://sciencereview.berkeley.edu/" target="_blank">Berkeley Science Review</a></font></div><div><span style="color:rgb(136,136,136);font-size:13px;background-color:rgb(255,255,255)"><font face="garamond, serif">_____________________________________</font></span></div></div></div></div></div>
</font></span></div>
<br>_______________________________________________<br>
Mne_analysis mailing list<br>
<a href="mailto:Mne_analysis@nmr.mgh.harvard.edu" target="_blank">Mne_analysis@nmr.mgh.harvard.edu</a><br>
<a href="https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis" rel="noreferrer" target="_blank">https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_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/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></div></div><br></div></div>
<br>_______________________________________________<br>
Mne_analysis mailing list<br>
<a href="mailto:Mne_analysis@nmr.mgh.harvard.edu" target="_blank">Mne_analysis@nmr.mgh.harvard.edu</a><br>
<a href="https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis" rel="noreferrer" target="_blank">https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_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/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></div></div></div>
<br>_______________________________________________<br>
Mne_analysis mailing list<br>
<a href="mailto:Mne_analysis@nmr.mgh.harvard.edu" target="_blank">Mne_analysis@nmr.mgh.harvard.edu</a><br>
<a href="https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis" rel="noreferrer" target="_blank">https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_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/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>
</div></div><br>_______________________________________________<br>
Mne_analysis mailing list<br>
<a href="mailto:Mne_analysis@nmr.mgh.harvard.edu" target="_blank">Mne_analysis@nmr.mgh.harvard.edu</a><br>
<a href="https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis" rel="noreferrer" target="_blank">https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_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/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>
<br>_______________________________________________<br>
Mne_analysis mailing list<br>
<a href="mailto:Mne_analysis@nmr.mgh.harvard.edu" target="_blank">Mne_analysis@nmr.mgh.harvard.edu</a><br>
<a href="https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis" rel="noreferrer" target="_blank">https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_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/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>
</div>