[Martinos-python] .drop_bad problem

External Email - Use Caution

*Dear Alexandre and Alexander,*

I also fwd this message to the mne_analysis at nmr.mgh.harvard.edu

Results of .drop_bad in v 0.16.2 (python 3.6.6) and .drop_bad_epochs in
0.12.dev (python 2.7.6) are different.

This is not filtering. I tested performance of the .drop_bad in v 0.16.2
(python 3.6.6) and .drop_bad_epochs in 0.12.dev (python 2.7.6) without any
additional operations on the data. Result is clearly different! The
difference, however, starts only after the 25th epoch.

I did:

*data=epochs_rej.get_data() *

*average_over_epoch=np.mean(np.mean(data [:, 0:306, :], 2),1) *

The ?*average_over_epoch*? is exactly the same in both versions up to the
25th epoch, but is absolutely different afterwards.

I uploaded the epoches and the corresponding raw files:

https://we.tl/t-Rmfow2yf2k

and

https://we.tl/t-N69ztC2qtt

Best regards,
Elena

External Email - Use Caution

I can confirm that the good epochs 25-89 (of 97) appear different with
`epochs.plot()`, despite the epochs.events and epochs.selections attributes
being the same. However `epochs.selection` shows that the first of the
original events that would be skipped is the 25th, so this is presumably a
bug with `mne.Epochs` selecting the wrong data under some circumstances.

Given that 0.12 is almost 3 years old now, we have fixed a lot of bugs
since then. It's likely that there is some bug in 0.12 that was fixed in
0.16 (or earlier). Can you provide a minimal script that takes the raw data
you sent (which appears to be identical in both archives?) and creates
`-epo.fif` files that differ between 0.12 and 0.16? The `mne.Epochs`
constructor parameters probably matter here.

Eric

External Email - Use Caution

Dear Eric,
I attached the scripts.
I am sure that the problem is with v0.16, not with v0.12, because if I use
v0.16, but do the bad epochs rejection manually the result is the same as
with v0.12.

Best regards,
Elena
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20190207/f92714c1/attachment.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: step4_epoch_v12py2_simple.py
Type: text/x-python-script
Size: 2162 bytes
Desc: not available
Url : http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20190207/f92714c1/attachment.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: step4_epoch_v16py3_simple.py
Type: text/x-python-script
Size: 1987 bytes
Desc: not available
Url : http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20190207/f92714c1/attachment-0001.bin