# reject parameter for epochs and get\_data()

**URL:** <https://mne.discourse.group/t/reject-parameter-for-epochs-and-get-data/984>\
**Category:** Mailing List Archive (read-only)\
**Tags:** list-archive\
**Created:** [April 5, 2016, 8:16am UTC](https://mne.discourse.group/t/reject-parameter-for-epochs-and-get-data/984 "2016-04-05T08:16:57Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [April 5, 2016, 8:16am UTC](https://mne.discourse.group/t/reject-parameter-for-epochs-and-get-data/984/1 "2016-04-05T08:16:57Z")

</div>

Dear MNE-Users,

I created epochs without specifiying any "reject" parameters. By reading  
the documentation, this parameter is None by default. However, when I want  
to get my data, I use epochs.get\_data() and some bad epochs are dropped. On  
which criterion are they dropped, given that any reject criterion was set?  
How can I get the data without rejecting any epochs?

My lines of code:

epochs\_s= mne.Epochs(raw, events, event\_id, tmin, tmax, picks=picks,  
baseline=(tmin\_bsl,0))

epochs\_s.get\_data()

Thanks a lot!

Laetitia  
-------------- next part --------------  
An HTML attachment was scrubbed...  
URL: [http://mail.nmr.mgh.harvard.edu/pipermail/mne\_analysis/attachments/20160405/4a62d31e/attachment.html](http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20160405/4a62d31e/attachment.html)

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [April 5, 2016, 8:25am UTC](https://mne.discourse.group/t/reject-parameter-for-epochs-and-get-data/984/2 "2016-04-05T08:25:18Z")

</div>

what is the content of event\_id and events?

Epochs only keeps the events that belong to event\_id

Alex  
-------------- next part --------------  
An HTML attachment was scrubbed...  
URL: [http://mail.nmr.mgh.harvard.edu/pipermail/mne\_analysis/attachments/20160405/3177fb5d/attachment.html](http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20160405/3177fb5d/attachment.html)

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [April 5, 2016, 8:29am UTC](https://mne.discourse.group/t/reject-parameter-for-epochs-and-get-data/984/3 "2016-04-05T08:29:01Z")

</div>

I have:  
event\_id = 200 and I got only epochs corresponding to this events when I  
created the epochs object. However I still have some bad epochs dropped  
(their event\_id are also 200) when I am usins epochs.get\_data()...

2016-04-05 10:25 GMT+02:00 Alexandre Gramfort \<  
alexandre.gramfort at telecom-paristech.fr\>:

> what is the content of event\_id and events?
> 
> Epochs only keeps the events that belong to event\_id
> 
> Alex
> 
> \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> Mne\_analysis mailing list  
> Mne\_analysis at nmr.mgh.harvard.edu  
> [Mne\_analysis Info Page](https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis)
> 
> The information in this e-mail is intended only for the person to whom it  
> is  
> addressed. If you believe this e-mail was sent to you in error and the  
> e-mail  
> contains patient information, please contact the Partners Compliance  
> HelpLine at  
> [MyComplianceReport.com: Compliance and Ethics Reporting](http://www.partners.org/complianceline) . If the e-mail was sent to you in  
> error  
> but does not contain patient information, please contact the sender and  
> properly  
> dispose of the e-mail.

-------------- next part --------------  
An HTML attachment was scrubbed...  
URL: [http://mail.nmr.mgh.harvard.edu/pipermail/mne\_analysis/attachments/20160405/f8074458/attachment.html](http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20160405/f8074458/attachment.html)

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [April 5, 2016, 8:34am UTC](https://mne.discourse.group/t/reject-parameter-for-epochs-and-get-data/984/4 "2016-04-05T08:34:23Z")

</div>

For instance, I have the following output: 118 epochs corresponding to  
events=200 are found, but when I applied get\_data, 19 epochs are dropped...

epochs\_s= mne.Epochs(raw,new\_events, event\_id,tmin,tmax, picks=picks,  
baseline=(tmin\_bsl,0))

&nbsp;&nbsp;&nbsp;&nbsp;...:

118 matching events found

Created an SSP operator (subspace dimension = 1)

1 projection items activated

epochs\_s.get\_data().shape

Applying baseline correction ... (mode: mean)

19 bad epochs dropped

Out[59]: (99, 366, 1701)

2016-04-05 10:29 GMT+02:00 Laetitia Grabot \<laetitia.grabot at gmail.com\>:

> I have:  
> event\_id = 200 and I got only epochs corresponding to this events when I  
> created the epochs object. However I still have some bad epochs dropped  
> (their event\_id are also 200) when I am usins epochs.get\_data()...
> 
> 2016-04-05 10:25 GMT+02:00 Alexandre Gramfort \<  
> alexandre.gramfort at telecom-paristech.fr\>:
> 
> > what is the content of event\_id and events?
> > 
> > Epochs only keeps the events that belong to event\_id
> > 
> > Alex
> > 
> > \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> > Mne\_analysis mailing list  
> > Mne\_analysis at nmr.mgh.harvard.edu  
> > [Mne\_analysis Info Page](https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis)
> > 
> > The information in this e-mail is intended only for the person to whom it  
> > is  
> > addressed. If you believe this e-mail was sent to you in error and the  
> > e-mail  
> > contains patient information, please contact the Partners Compliance  
> > HelpLine at  
> > [MyComplianceReport.com: Compliance and Ethics Reporting](http://www.partners.org/complianceline) . If the e-mail was sent to you  
> > in error  
> > but does not contain patient information, please contact the sender and  
> > properly  
> > dispose of the e-mail.

-------------- next part --------------  
An HTML attachment was scrubbed...  
URL: [http://mail.nmr.mgh.harvard.edu/pipermail/mne\_analysis/attachments/20160405/ac27206c/attachment.html](http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20160405/ac27206c/attachment.html)

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [April 5, 2016, 8:38am UTC](https://mne.discourse.group/t/reject-parameter-for-epochs-and-get-data/984/5 "2016-04-05T08:38:20Z")

</div>

Hi Laetitia,

what is the output if you type epochs\_s.drop\_log? That might give some  
clues of why they're dropped.

-Jaakko

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [April 5, 2016, 8:55am UTC](https://mne.discourse.group/t/reject-parameter-for-epochs-and-get-data/984/6 "2016-04-05T08:55:41Z")

</div>

Ahh, I get a list of [IGNORED], 19 [TOO\_SHORT] and ! So do you have an  
idea of why some epochs are too short ?

2016-04-05 10:38 GMT+02:00 Jaakko Lepp?kangas \<jaeilepp at student.jyu.fi\>:

> Hi Laetitia,
> 
> what is the output if you type epochs\_s.drop\_log? That might give some  
> clues of why they're dropped.
> 
> -Jaakko
> 
> > For instance, I have the following output: 118 epochs corresponding to  
> > events=200 are found, but when I applied get\_data, 19 epochs are dropped...
> > 
> > epochs\_s= mne.Epochs(raw,new\_events, event\_id,tmin,tmax, picks=picks,  
> > baseline=(tmin\_bsl,0))
> > 
> > &nbsp;&nbsp;&nbsp;&nbsp;...:
> > 
> > 118 matching events found
> > 
> > Created an SSP operator (subspace dimension = 1)
> > 
> > 1 projection items activated
> > 
> > epochs\_s.get\_data().shape
> > 
> > Applying baseline correction ... (mode: mean)
> > 
> > 19 bad epochs dropped
> > 
> > Out[59]: (99, 366, 1701)
> > 
> > 2016-04-05 10:29 GMT+02:00 Laetitia Grabot \<laetitia.grabot at gmail.com\>:
> > 
> > > I have:  
> > > event\_id = 200 and I got only epochs corresponding to this events when I  
> > > created the epochs object. However I still have some bad epochs dropped  
> > > (their event\_id are also 200) when I am usins epochs.get\_data()...
> > > 
> > > 2016-04-05 10:25 GMT+02:00 Alexandre Gramfort \<  
> > > alexandre.gramfort at telecom-paristech.fr\>:
> > > 
> > > > what is the content of event\_id and events?
> > > > 
> > > > Epochs only keeps the events that belong to event\_id
> > > > 
> > > > Alex
> > > > 
> > > > \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> > > > Mne\_analysis mailing list  
> > > > Mne\_analysis at nmr.mgh.harvard.edu  
> > > > [Mne\_analysis Info Page](https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis)
> > > > 
> > > > The information in this e-mail is intended only for the person to whom  
> > > > it is  
> > > > addressed. If you believe this e-mail was sent to you in error and the  
> > > > e-mail  
> > > > contains patient information, please contact the Partners Compliance  
> > > > HelpLine at  
> > > > [MyComplianceReport.com: Compliance and Ethics Reporting](http://www.partners.org/complianceline) . If the e-mail was sent to you  
> > > > in error  
> > > > but does not contain patient information, please contact the sender and  
> > > > properly  
> > > > dispose of the e-mail.
> > 
> > \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> > Mne\_analysis mailing list  
> > Mne\_analysis at nmr.mgh.harvard.edu  
> > [Mne\_analysis Info Page](https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis)
> > 
> > The information in this e-mail is intended only for the person to whom it  
> > is  
> > addressed. If you believe this e-mail was sent to you in error and the  
> > e-mail  
> > contains patient information, please contact the Partners Compliance  
> > HelpLine at  
> > [MyComplianceReport.com: Compliance and Ethics Reporting](http://www.partners.org/complianceline) . If the e-mail was sent to you  
> > in error  
> > but does not contain patient information, please contact the sender and  
> > properly  
> > dispose of the e-mail.
> 
> \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> Mne\_analysis mailing list  
> Mne\_analysis at nmr.mgh.harvard.edu  
> [Mne\_analysis Info Page](https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis)
> 
> The information in this e-mail is intended only for the person to whom it  
> is  
> addressed. If you believe this e-mail was sent to you in error and the  
> e-mail  
> contains patient information, please contact the Partners Compliance  
> HelpLine at  
> [MyComplianceReport.com: Compliance and Ethics Reporting](http://www.partners.org/complianceline) . If the e-mail was sent to you in  
> error  
> but does not contain patient information, please contact the sender and  
> properly  
> dispose of the e-mail.

-------------- next part --------------  
An HTML attachment was scrubbed...  
URL: [http://mail.nmr.mgh.harvard.edu/pipermail/mne\_analysis/attachments/20160405/3f8b76bb/attachment.html](http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20160405/3f8b76bb/attachment.html)

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [April 5, 2016, 9:31am UTC](https://mne.discourse.group/t/reject-parameter-for-epochs-and-get-data/984/7 "2016-04-05T09:31:09Z")

</div>

Could it be that you have triggers at the end of the data (or you have a  
big tmax) so that the ends of the epochs go beyond the recorded data?

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [April 5, 2016, 9:50am UTC](https://mne.discourse.group/t/reject-parameter-for-epochs-and-get-data/984/8 "2016-04-05T09:50:40Z")

</div>

Mmh, I'll check that. Thanks a lot for pointing me in the good directions!  
Laetitia

2016-04-05 11:31 GMT+02:00 Jaakko Lepp?kangas \<jaeilepp at student.jyu.fi\>:

> Could it be that you have triggers at the end of the data (or you have a  
> big tmax) so that the ends of the epochs go beyond the recorded data?
> 
> > Ahh, I get a list of [IGNORED], 19 [TOO\_SHORT] and ! So do you have an  
> > idea of why some epochs are too short ?
> > 
> > 2016-04-05 10:38 GMT+02:00 Jaakko Lepp?kangas \<jaeilepp at student.jyu.fi\>:
> > 
> > > Hi Laetitia,
> > > 
> > > what is the output if you type epochs\_s.drop\_log? That might give some  
> > > clues of why they're dropped.
> > > 
> > > -Jaakko
> > > 
> > > > For instance, I have the following output: 118 epochs corresponding to  
> > > > events=200 are found, but when I applied get\_data, 19 epochs are dropped...
> > > > 
> > > > epochs\_s= mne.Epochs(raw,new\_events, event\_id,tmin,tmax, picks=picks,  
> > > > baseline=(tmin\_bsl,0))
> > > > 
> > > > &nbsp;&nbsp;&nbsp;&nbsp;...:
> > > > 
> > > > 118 matching events found
> > > > 
> > > > Created an SSP operator (subspace dimension = 1)
> > > > 
> > > > 1 projection items activated
> > > > 
> > > > epochs\_s.get\_data().shape
> > > > 
> > > > Applying baseline correction ... (mode: mean)
> > > > 
> > > > 19 bad epochs dropped
> > > > 
> > > > Out[59]: (99, 366, 1701)
> > > > 
> > > > 2016-04-05 10:29 GMT+02:00 Laetitia Grabot \<laetitia.grabot at gmail.com\>:
> > > > 
> > > > > I have:  
> > > > > event\_id = 200 and I got only epochs corresponding to this events when  
> > > > > I created the epochs object. However I still have some bad epochs dropped  
> > > > > (their event\_id are also 200) when I am usins epochs.get\_data()...
> > > > > 
> > > > > 2016-04-05 10:25 GMT+02:00 Alexandre Gramfort \<  
> > > > > alexandre.gramfort at telecom-paristech.fr\>:
> > > > > 
> > > > > > what is the content of event\_id and events?
> > > > > > 
> > > > > > Epochs only keeps the events that belong to event\_id
> > > > > > 
> > > > > > Alex
> > > > > > 
> > > > > > \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> > > > > > Mne\_analysis mailing list  
> > > > > > Mne\_analysis at nmr.mgh.harvard.edu  
> > > > > > [Mne\_analysis Info Page](https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis)
> > > > > > 
> > > > > > The information in this e-mail is intended only for the person to  
> > > > > > whom it is  
> > > > > > addressed. If you believe this e-mail was sent to you in error and  
> > > > > > the e-mail  
> > > > > > contains patient information, please contact the Partners Compliance  
> > > > > > HelpLine at  
> > > > > > [MyComplianceReport.com: Compliance and Ethics Reporting](http://www.partners.org/complianceline) . If the e-mail was sent to  
> > > > > > you in error  
> > > > > > but does not contain patient information, please contact the sender  
> > > > > > and properly  
> > > > > > dispose of the e-mail.
> > > > 
> > > > \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> > > > Mne\_analysis mailing list  
> > > > Mne\_analysis at nmr.mgh.harvard.edu  
> > > > [Mne\_analysis Info Page](https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis)
> > > > 
> > > > The information in this e-mail is intended only for the person to whom  
> > > > it is  
> > > > addressed. If you believe this e-mail was sent to you in error and the  
> > > > e-mail  
> > > > contains patient information, please contact the Partners Compliance  
> > > > HelpLine at  
> > > > [MyComplianceReport.com: Compliance and Ethics Reporting](http://www.partners.org/complianceline) . If the e-mail was sent to you  
> > > > in error  
> > > > but does not contain patient information, please contact the sender and  
> > > > properly  
> > > > dispose of the e-mail.
> > > 
> > > \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> > > Mne\_analysis mailing list  
> > > Mne\_analysis at nmr.mgh.harvard.edu  
> > > [Mne\_analysis Info Page](https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis)
> > > 
> > > The information in this e-mail is intended only for the person to whom  
> > > it is  
> > > addressed. If you believe this e-mail was sent to you in error and the  
> > > e-mail  
> > > contains patient information, please contact the Partners Compliance  
> > > HelpLine at  
> > > [MyComplianceReport.com: Compliance and Ethics Reporting](http://www.partners.org/complianceline) . If the e-mail was sent to you  
> > > in error  
> > > but does not contain patient information, please contact the sender and  
> > > properly  
> > > dispose of the e-mail.
> > 
> > \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> > Mne\_analysis mailing list  
> > Mne\_analysis at nmr.mgh.harvard.edu  
> > [Mne\_analysis Info Page](https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis)
> > 
> > The information in this e-mail is intended only for the person to whom it  
> > is  
> > addressed. If you believe this e-mail was sent to you in error and the  
> > e-mail  
> > contains patient information, please contact the Partners Compliance  
> > HelpLine at  
> > [MyComplianceReport.com: Compliance and Ethics Reporting](http://www.partners.org/complianceline) . If the e-mail was sent to you  
> > in error  
> > but does not contain patient information, please contact the sender and  
> > properly  
> > dispose of the e-mail.
> 
> \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> Mne\_analysis mailing list  
> Mne\_analysis at nmr.mgh.harvard.edu  
> [Mne\_analysis Info Page](https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis)
> 
> The information in this e-mail is intended only for the person to whom it  
> is  
> addressed. If you believe this e-mail was sent to you in error and the  
> e-mail  
> contains patient information, please contact the Partners Compliance  
> HelpLine at  
> [MyComplianceReport.com: Compliance and Ethics Reporting](http://www.partners.org/complianceline) . If the e-mail was sent to you in  
> error  
> but does not contain patient information, please contact the sender and  
> properly  
> dispose of the e-mail.

-------------- next part --------------  
An HTML attachment was scrubbed...  
URL: [http://mail.nmr.mgh.harvard.edu/pipermail/mne\_analysis/attachments/20160405/be2b3898/attachment.html](http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20160405/be2b3898/attachment.html)
