<div dir="ltr">Thanks Virginie, <div><br></div><div>I opened a PR, which is based on your suggestion.</div><div class="gmail_extra"><br><div class="gmail_quote">2014-10-02 22:42 GMT+02:00 Virginie van Wassenhove <span dir="ltr">&lt;<a href="mailto:virginie.van.wassenhove@gmail.com" target="_blank">virginie.van.wassenhove@gmail.com</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">simply specify that &quot;if no event id are found in the data, an error will be automatically generated irrespective of the str&quot;<div><br><div>however, i am still unclear about what &quot;no_missing&quot; means: how would mne.epochs know in advance whether an event should be there or not (hence that it is missing)? </div></div></div></blockquote><div><br></div><div><br></div><div>The mismatch is produced as follows:</div><div><br></div><div>You pass an event_id that will be a dict in most cases, e.g. {&#39;left&#39;: 1, &#39;right&#39;:2}.</div><div><br></div><div>Second you pass events at which to segment the continuous recordings.</div><div>For simplicity let&#39;s assume we only have two of them.<br></div><div><br></div><div>np.array([[1, 0, 14],  [1, 0, 2]])</div><div><br></div><div>In this case the event id &#39;left&#39; is not found in the events (not in the data) and &#39;on_missing&#39; becomes relevant.</div><div><br></div><div>For the sourcecode see:  <a href="https://github.com/mne-tools/mne-python/blob/master/mne/epochs.py#L708">https://github.com/mne-tools/mne-python/blob/master/mne/epochs.py#L708</a></div><div><br></div><div>If no event id is found at all and &#39;on_missing&#39; is set to &#39;ignore&#39; it will crash here:</div><div><br></div><div><a href="https://github.com/mne-tools/mne-python/blob/master/mne/epochs.py#L731">https://github.com/mne-tools/mne-python/blob/master/mne/epochs.py#L731</a><br></div><div><br></div><div><br></div><div>-Denis</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><span class=""><font color="#888888"><div>-V</div></font></span><div><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Oct 2, 2014 at 6:30 PM, Alexandre Gramfort <span dir="ltr">&lt;<a href="mailto:alexandre.gramfort@telecom-paristech.fr" target="_blank">alexandre.gramfort@telecom-paristech.fr</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">



<div>
<div dir="ltr">
<div class="gmail_extra">nice to hear it works</div>
<div class="gmail_extra"><br>
</div>
<div class="gmail_extra">how would you phrase the doc? It is currently:</div>
<div class="gmail_extra"><br>
</div>
<div class="gmail_extra">
<div class="gmail_extra">    on_missing : str</div>
<div class="gmail_extra">        What to do if an event id is not found in the recording.</div>
<div class="gmail_extra">        Valid keys are &#39;error&#39; | &#39;warning&#39; | &#39;ignore&#39;</div>
<div class="gmail_extra">        Default is &#39;error&#39;. If on_missing is &#39;warning&#39; it will proceed but</div>
<div class="gmail_extra">        warn, if &#39;ignore&#39; it will proceed silently.</div>
<div><br>
</div>
<div>Alex</div>
</div>
</div>
</div>

</blockquote></div><br><br clear="all"><div><br></div><br>
</div></div></div></div></div>
<br>_______________________________________________<br>
Mne_analysis mailing list<br>
<a href="mailto:Mne_analysis@nmr.mgh.harvard.edu">Mne_analysis@nmr.mgh.harvard.edu</a><br>
<a href="https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis" 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" 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>