# Epoch() classifies all epochs as "bad"	(Alexandre Gramfort)

**URL:** <https://mne.discourse.group/t/epoch-classifies-all-epochs-as-bad-alexandre-gramfort/1538>\
**Category:** Mailing List Archive (read-only)\
**Tags:** list-archive\
**Created:** [June 4, 2018, 2:45pm UTC](https://mne.discourse.group/t/epoch-classifies-all-epochs-as-bad-alexandre-gramfort/1538 "2018-06-04T14:45:12Z")\
**Posts on this page:** 2\
**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:** [June 4, 2018, 2:45pm UTC](https://mne.discourse.group/t/epoch-classifies-all-epochs-as-bad-alexandre-gramfort/1538/1 "2018-06-04T14:45:12Z")

</div>

External Email - Use Caution

Dear Alex & list,

Following Alex G. recommendation (thanks, by the way) I checked the plot  
with events (raw.plot(events=events); which perfectly displays all the  
events at the correct timing), the sampling frequency (which is correctly  
identified from raw.info['sfreq'] as 2048.0) and the first sample (also  
correctly identifying the index of the first sample in the raw data file).

So, I am still stuck: the Epochs command still correctly detects the events  
by the event\_ids (epoch count is correct), but when the epochs are read it  
sets them all as 'IGNORED', and occasionally 'NO\_DATA' or 'TOO\_SHORT'.

I put some sample data and a simplified version of the code that fails to  
produce epochs on the following dropbox folder:  
[https://www.dropbox.com/sh/09b71oumga8xm4y/AABg04xw-cCiCnn9FMSSqODca?dl=0](https://www.dropbox.com/sh/09b71oumga8xm4y/AABg04xw-cCiCnn9FMSSqODca?dl=0)

Thanks in advance for your help!  
Best,  
Daniel

---

<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:** [June 5, 2018, 7:27am UTC](https://mne.discourse.group/t/epoch-classifies-all-epochs-as-bad-alexandre-gramfort/1538/2 "2018-06-05T07:27:04Z")

</div>

External Email - Use Caution

hi,

you wrote:

tmin=-500, tmax=2000

so 500s before stim and 2000s after.

Use:

tmin=-0.5, tmax=2.

and it should work.

Best,  
Alex
