<p><span style="padding: 3px 10px; border-radius: 5px; color: #ffffff; font-weight: bold; display: inline-block; background-color: #ff0000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;External Email - Use Caution&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></p><p></p><div dir="ltr"><div>Hello again, <br></div><div><br></div><div>Alex, thank you very much for your help! I am glad that the solution was so straightforward, even though it is a little embarrassing that the problem was such a dumb mistake. <br></div><div>Anyway, as expected, epoching works perfectly with the tmin/max defined in seconds, rather than ms. <br></div><div>Best, <br></div><div>Daniel<br></div><div><div class="gmail_extra"><br><div class="gmail_quote">On 5 June 2018 at 18:00,  <span dir="ltr">&lt;<a href="mailto:mne_analysis-request@nmr.mgh.harvard.edu" target="_blank">mne_analysis-request@nmr.mgh.<wbr>harvard.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Send Mne_analysis mailing list submissions to<br>
        <a href="mailto:mne_analysis@nmr.mgh.harvard.edu" target="_blank">mne_analysis@nmr.mgh.harvard.e<wbr>du</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
        <a href="https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis" rel="noreferrer" target="_blank">https://mail.nmr.mgh.harvard.e<wbr>du/mailman/listinfo/mne_analys<wbr>is</a><br>
or, via email, send a message with subject or body &#39;help&#39; to<br>
        <a href="mailto:mne_analysis-request@nmr.mgh.harvard.edu" target="_blank">mne_analysis-request@nmr.mgh.h<wbr>arvard.edu</a><br>
<br>
You can reach the person managing the list at<br>
        <a href="mailto:mne_analysis-owner@nmr.mgh.harvard.edu" target="_blank">mne_analysis-owner@nmr.mgh.har<wbr>vard.edu</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than &quot;Re: Contents of Mne_analysis digest...&quot;<br>
<br>
<br>
Today&#39;s Topics:<br>
<br>
   1. Re: Epoch() classifies all epochs as &quot;bad&quot;        (Alexandre<br>
      Gramfort) (Alexandre Gramfort)<br>
<br>
<br>
------------------------------<wbr>------------------------------<wbr>----------<br>
<br>
Message: 1<br>
Date: Tue, 5 Jun 2018 09:27:04 +0200<br>
From: Alexandre Gramfort &lt;<a href="mailto:alexandre.gramfort@inria.fr" target="_blank">alexandre.gramfort@inria.fr</a>&gt;<br>
Subject: Re: [Mne_analysis] Epoch() classifies all epochs as &quot;bad&quot;<br>
        (Alexandre Gramfort)<br>
To: Discussion and support forum for the users of MNE Software<br>
        &lt;<a href="mailto:mne_analysis@nmr.mgh.harvard.edu" target="_blank">mne_analysis@nmr.mgh.harvard.<wbr>edu</a>&gt;<br>
Message-ID:<br>
        &lt;CADeotZpHu5SSftPdxVrnOj=<a href="mailto:ku_jHy61SVRgxOZWTVCH4fkOeTg@mail.gmail.com" target="_blank">ku_jH<wbr>y61SVRgxOZWTVCH4fkOeTg@mail.gm<wbr>ail.com</a>&gt;<br>
Content-Type: text/plain; charset=&quot;utf-8&quot;<br>
<br>
        External Email - Use Caution        <br>
<br>
hi,<br>
<br>
you wrote:<br>
<br>
tmin=-500, tmax=2000<br>
<br>
so 500s before stim and 2000s after.<br>
<br>
Use:<br>
<br>
tmin=-0.5, tmax=2.<br>
<br>
and it should work.<br>
<br>
Best,<br>
Alex<br>
<br>
<br>
On Mon, Jun 4, 2018 at 4:45 PM, d p &lt;<a href="mailto:aglasis@gmail.com" target="_blank">aglasis@gmail.com</a>&gt; wrote:<br>
&gt;         External Email - Use Caution<br>
&gt;<br>
&gt; Dear Alex &amp; list,<br>
&gt;<br>
&gt; Following Alex G. recommendation (thanks, by the way) I checked the plot<br>
&gt; with events (raw.plot(events=events); which perfectly displays all the<br>
&gt; events at the correct timing), the sampling frequency (which is correctly<br>
&gt; identified from <a href="http://raw.info" rel="noreferrer" target="_blank">raw.info</a>[&#39;sfreq&#39;] as 2048.0) and the first sample (also<br>
&gt; correctly identifying the index of the first sample in the raw data file).<br>
&gt;<br>
&gt; So, I am still stuck: the Epochs command still correctly detects the events<br>
&gt; by the event_ids (epoch count is correct), but when the epochs are read it<br>
&gt; sets them all as &#39;IGNORED&#39;, and occasionally  &#39;NO_DATA&#39; or &#39;TOO_SHORT&#39;.<br>
&gt;<br>
&gt; I put some sample data and a simplified version of the code that fails to<br>
&gt; produce epochs on the following dropbox folder:<br>
&gt; <a href="https://www.dropbox.com/sh/09b71oumga8xm4y/AABg04xw-cCiCnn9FMSSqODca?dl=0" rel="noreferrer" target="_blank">https://www.dropbox.com/sh/09b<wbr>71oumga8xm4y/AABg04xw-cCiCnn9F<wbr>MSSqODca?dl=0</a><br>
&gt;<br>
&gt; Thanks in advance for your help!<br>
&gt; Best,<br>
&gt; Daniel<br>
&gt;<br>
&gt;<br>
&gt; On 30 May 2018 at 18:00, &lt;<a href="mailto:mne_analysis-request@nmr.mgh.harvard.edu" target="_blank">mne_analysis-request@nmr.mgh.<wbr>harvard.edu</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; Send Mne_analysis mailing list submissions to<br>
&gt;&gt;         <a href="mailto:mne_analysis@nmr.mgh.harvard.edu" target="_blank">mne_analysis@nmr.mgh.harvard.<wbr>edu</a><br>
&gt;&gt;<br>
&gt;&gt; To subscribe or unsubscribe via the World Wide Web, visit<br>
&gt;&gt;         <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_analy<wbr>sis</a><br>
&gt;&gt; or, via email, send a message with subject or body &#39;help&#39; to<br>
&gt;&gt;         <a href="mailto:mne_analysis-request@nmr.mgh.harvard.edu" target="_blank">mne_analysis-request@nmr.mgh.<wbr>harvard.edu</a><br>
&gt;&gt;<br>
&gt;&gt; You can reach the person managing the list at<br>
&gt;&gt;         <a href="mailto:mne_analysis-owner@nmr.mgh.harvard.edu" target="_blank">mne_analysis-owner@nmr.mgh.ha<wbr>rvard.edu</a><br>
&gt;&gt;<br>
&gt;&gt; When replying, please edit your Subject line so it is more specific<br>
&gt;&gt; than &quot;Re: Contents of Mne_analysis digest...&quot;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; Today&#39;s Topics:<br>
&gt;&gt;<br>
&gt;&gt;    1. Re: Epoch() classifies all epochs as &quot;bad&quot; (d p)<br>
&gt;&gt;    2. Re: Epoch() classifies all epochs as &quot;bad&quot; (Alexandre Gramfort)<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; ------------------------------<wbr>------------------------------<wbr>----------<br>
&gt;&gt;<br>
&gt;&gt; Message: 1<br>
&gt;&gt; Date: Wed, 30 May 2018 14:36:12 +0200<br>
&gt;&gt; From: d p &lt;<a href="mailto:aglasis@gmail.com" target="_blank">aglasis@gmail.com</a>&gt;<br>
&gt;&gt; Subject: Re: [Mne_analysis] Epoch() classifies all epochs as &quot;bad&quot;<br>
&gt;&gt; To: <a href="mailto:mne_analysis@nmr.mgh.harvard.edu" target="_blank">mne_analysis@nmr.mgh.harvard.e<wbr>du</a><br>
&gt;&gt; Message-ID:<br>
&gt;&gt;<br>
&gt;&gt; &lt;<a href="mailto:CAED_QJc1kJ%2BFFzkXSPMgHBZDvtFCntNe7-1iK_BNHpJDo57rdg@mail.gmail.com" target="_blank">CAED_QJc1kJ+FFzkXSPMgHBZDvtFC<wbr>ntNe7-1iK_BNHpJDo57rdg@mail.<wbr>gmail.com</a>&gt;<br>
&gt;&gt; Content-Type: text/plain; charset=&quot;utf-8&quot;<br>
&gt;&gt;<br>
&gt;&gt;         External Email - Use Caution<br>
&gt;&gt;<br>
&gt;&gt; Dear Marijn &amp; List<br>
&gt;&gt;<br>
&gt;&gt; Thanks for your suggestion about  drop_log. I tried that and also<br>
&gt;&gt; plot_drop_log, and according to that all epochs are either &quot;IGNORED&quot; or<br>
&gt;&gt; &quot;NO_DATA&quot;  according to dropped_log. Also, in the plot_drop_log, 100%<br>
&gt;&gt; events are either &quot;NO_DATA&quot; or &quot;TOO_SHORT&quot;.<br>
&gt;&gt;<br>
&gt;&gt; I saw in the documentation that &quot; ?NO_DATA? or ?TOO_SHORT? if epoch didn?t<br>
&gt;&gt; contain enough data&quot;, but I don&#39;t understand what does &quot;didn&#39;t contain<br>
&gt;&gt; enough data&quot; mean? I have a 64-channel eeg recording, epochs are ~3seconds<br>
&gt;&gt; long, and epoch markers, timing, amount of epochs, etc. is identified<br>
&gt;&gt; perfectly by the find_events calls. Also, all other pre-processing steps<br>
&gt;&gt; (filtering, bad channel interpolation, re-referencing, etc.) worked just<br>
&gt;&gt; fine.<br>
&gt;&gt;<br>
&gt;&gt; Thanks in advance for any comments and suggestions,<br>
&gt;&gt; Daniel<br>
&gt;&gt;<br>
&gt;&gt; PS: Sorry about writing from different emails. I&#39;ll make sure that in the<br>
&gt;&gt; future I only use the registered one.<br>
&gt;&gt;<br>
&gt;&gt; Date: Tue, 29 May 2018 20:01:33 +0300<br>
&gt;&gt; From: Marijn van Vliet &lt;<a href="mailto:w.m.vanvliet@gmail.com" target="_blank">w.m.vanvliet@gmail.com</a>&gt;<br>
&gt;&gt; Subject: Re: [Mne_analysis] Epoch() classifies all epochs as &quot;bad&quot;<br>
&gt;&gt; To: Discussion and support Software &lt;<a href="mailto:mne_analysis@nmr.mgh.harvard.edu" target="_blank">mne_analysis@nmr.mgh.harvard.<wbr>edu</a>&gt;<br>
&gt;&gt; Message-ID: &lt;<a href="mailto:3E3699E3-BEAC-40BD-BB15-B9141C4A96F3@gmail.com" target="_blank">3E3699E3-BEAC-40BD-BB15-B9141<wbr>C4A96F3@gmail.com</a>&gt;<br>
&gt;&gt; Content-Type: text/plain; charset=&quot;us-ascii&quot;<br>
&gt;&gt;<br>
&gt;&gt; Dear Daniel,<br>
&gt;&gt;<br>
&gt;&gt; you can try looking at epochs.drop_log after all epochs are dropped. The<br>
&gt;&gt; drop_log contains for each dropped epoch the reason why it was dropped.<br>
&gt;&gt;<br>
&gt;&gt; best,<br>
&gt;&gt; Marijn.<br>
&gt;&gt; &gt; On 29 May 2018, at 18:34, Daniel Preciado &lt;<a href="mailto:daniel.preciadov@gmail.com" target="_blank">daniel.preciadov@gmail.com</a>&gt;<br>
&gt;&gt; wrote:<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;         External Email - Use Caution<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Dear list,<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; I am having trouble with epoching eeg data. For some reason, the epoch()<br>
&gt;&gt; call classifies all epochs as bad, and I always end up with an empty<br>
&gt;&gt; Epochs<br>
&gt;&gt; object.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; If I try epoching with &quot;preload=False&quot;, it reads correctly the epochs,<br>
&gt;&gt; and the detected epochs perfectly matching the amount of trials and other<br>
&gt;&gt; experiment parameters. But whenever I try to do anything with the Epochs<br>
&gt;&gt; object (e.g. plotting), all events are deleted, and thus everything else<br>
&gt;&gt; throws zeroDivisionErrors. And if I call back the epochs object after<br>
&gt;&gt; this,<br>
&gt;&gt; it is empty (epoch counts are set to 0).<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; I have tried all types of combinations of arguments, but the result is<br>
&gt;&gt; always the same: It seems to correctly recognize the epochs if the data is<br>
&gt;&gt; not Preloaded, but everything is discarded if the data is preloade, or if<br>
&gt;&gt; I<br>
&gt;&gt; try to do anything with the epochs object. I have tried different things<br>
&gt;&gt; with the arguments, including reject=None, Baseline=(None, None),<br>
&gt;&gt; preload=False, reject=None, flat=None, reject_tmin=None, reject_tmax=None,<br>
&gt;&gt; detrend=None, on_missing=&#39;error&#39;, metadata=None, verbose=None. I have also<br>
&gt;&gt; tried creating the epochs with the minimum arguments necessary (Data,<br>
&gt;&gt; Event_data, Event_id), but it is always the same result.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; I have also tried the same code on different datasets, but it always<br>
&gt;&gt; discards all epochs, no matter what.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; I do not understand why Epoch() classifies all data (from different<br>
&gt;&gt; people, different sessions) as bad, can anyone help me to figure this out,<br>
&gt;&gt; and hopefully fix it?<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Thanks!<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; ______________________________<wbr>_________________<br>
&gt;&gt; &gt; Mne_analysis mailing list<br>
&gt;&gt; &gt; <a href="mailto:Mne_analysis@nmr.mgh.harvard.edu" target="_blank">Mne_analysis@nmr.mgh.harvard.e<wbr>du</a><br>
&gt;&gt; &gt; <a href="https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis" rel="noreferrer" target="_blank">https://mail.nmr.mgh.harvard.e<wbr>du/mailman/listinfo/mne_analys<wbr>is</a><br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; The information in this e-mail is intended only for the person to whom<br>
&gt;&gt; &gt; it<br>
&gt;&gt; is<br>
&gt;&gt; &gt; addressed. If you believe this e-mail was sent to you in error and the<br>
&gt;&gt; e-mail<br>
&gt;&gt; &gt; contains patient information, please contact the Partners Compliance<br>
&gt;&gt; HelpLine at<br>
&gt;&gt; &gt; <a href="http://www.partners.org/complianceline" rel="noreferrer" target="_blank">http://www.partners.org/compli<wbr>anceline</a> . If the e-mail was sent to you<br>
&gt;&gt; &gt; in<br>
&gt;&gt; error<br>
&gt;&gt; &gt; but does not contain patient information, please contact the sender and<br>
&gt;&gt; properly<br>
&gt;&gt; &gt; dispose of the e-mail.<br>
&gt;&gt; -------------- next part --------------<br>
&gt;&gt; An HTML attachment was scrubbed...<br>
&gt;&gt; URL:<br>
&gt;&gt; <a href="http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20180530/d9c7a3b8/attachment-0001.html" rel="noreferrer" target="_blank">http://mail.nmr.mgh.harvard.ed<wbr>u/pipermail/mne_analysis/attac<wbr>hments/20180530/d9c7a3b8/attac<wbr>hment-0001.html</a><br>
&gt;&gt;<br>
&gt;&gt; ------------------------------<br>
&gt;&gt;<br>
&gt;&gt; Message: 2<br>
&gt;&gt; Date: Wed, 30 May 2018 14:47:41 +0200<br>
&gt;&gt; From: Alexandre Gramfort &lt;<a href="mailto:alexandre.gramfort@inria.fr" target="_blank">alexandre.gramfort@inria.fr</a>&gt;<br>
&gt;&gt; Subject: Re: [Mne_analysis] Epoch() classifies all epochs as &quot;bad&quot;<br>
&gt;&gt; To: Discussion and support forum for the users of MNE Software<br>
&gt;&gt;         &lt;<a href="mailto:mne_analysis@nmr.mgh.harvard.edu" target="_blank">mne_analysis@nmr.mgh.<wbr>harvard.edu</a>&gt;<br>
&gt;&gt; Message-ID:<br>
&gt;&gt;<br>
&gt;&gt; &lt;<a href="mailto:CADeotZrEDFQRQvyc1EY23qd3g899uzrePgu8vyWCPGYq4zoqFQ@mail.gmail.com" target="_blank">CADeotZrEDFQRQvyc1EY23qd3g899<wbr>uzrePgu8vyWCPGYq4zoqFQ@mail.gm<wbr>ail.com</a>&gt;<br>
&gt;&gt; Content-Type: text/plain; charset=&quot;utf-8&quot;<br>
&gt;&gt;<br>
&gt;&gt;         External Email - Use Caution<br>
&gt;&gt;<br>
&gt;&gt; you can check your events with:<br>
&gt;&gt;<br>
&gt;&gt; raw.plot(events=events)<br>
&gt;&gt;<br>
&gt;&gt; also check the sfreq and raw.first_samp.<br>
&gt;&gt;<br>
&gt;&gt; if you&#39;re stuck please share a file and a script with dropbox.<br>
&gt;&gt;<br>
&gt;&gt; Alex<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; ------------------------------<br>
&gt;&gt;<br>
&gt;&gt; ______________________________<wbr>_________________<br>
&gt;&gt; Mne_analysis mailing list<br>
&gt;&gt; <a href="mailto:Mne_analysis@nmr.mgh.harvard.edu" target="_blank">Mne_analysis@nmr.mgh.harvard.e<wbr>du</a><br>
&gt;&gt; <a href="https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis" rel="noreferrer" target="_blank">https://mail.nmr.mgh.harvard.e<wbr>du/mailman/listinfo/mne_analys<wbr>is</a><br>
&gt;&gt;<br>
&gt;&gt; End of Mne_analysis Digest, Vol 124, Issue 42<br>
&gt;&gt; ******************************<wbr>***************<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; ______________________________<wbr>_________________<br>
&gt; Mne_analysis mailing list<br>
&gt; <a href="mailto:Mne_analysis@nmr.mgh.harvard.edu" target="_blank">Mne_analysis@nmr.mgh.harvard.e<wbr>du</a><br>
&gt; <a href="https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis" rel="noreferrer" target="_blank">https://mail.nmr.mgh.harvard.e<wbr>du/mailman/listinfo/mne_analys<wbr>is</a><br>
&gt;<br>
&gt;<br>
&gt; The information in this e-mail is intended only for the person to whom it is<br>
&gt; addressed. If you believe this e-mail was sent to you in error and the<br>
&gt; e-mail<br>
&gt; contains patient information, please contact the Partners Compliance<br>
&gt; HelpLine at<br>
&gt; <a href="http://www.partners.org/complianceline" rel="noreferrer" target="_blank">http://www.partners.org/compli<wbr>anceline</a> . If the e-mail was sent to you in<br>
&gt; error<br>
&gt; but does not contain patient information, please contact the sender and<br>
&gt; properly<br>
&gt; dispose of the e-mail.<br>
&gt;<br>
<br>
<br>
<br>
------------------------------<br>
<br>
______________________________<wbr>_________________<br>
Mne_analysis mailing list<br>
<a href="mailto:Mne_analysis@nmr.mgh.harvard.edu" target="_blank">Mne_analysis@nmr.mgh.harvard.e<wbr>du</a><br>
<a href="https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis" rel="noreferrer" target="_blank">https://mail.nmr.mgh.harvard.e<wbr>du/mailman/listinfo/mne_analys<wbr>is</a><br>
<br>
End of Mne_analysis Digest, Vol 125, Issue 2<br>
******************************<wbr>**************<br>
</blockquote></div><br></div></div></div>