[Mne_analysis] Fwd: [Martinos-python] .drop_bad problem

Eric Larson larson.eric.d at gmail.com
Wed Feb 6 16:45:25 EST 2019
Search archives:

        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



On Wed, Feb 6, 2019 at 6:35 AM Elena Orekhova <orekhova.elena.v at gmail.com>
wrote:

>         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
>
>
> ---------- Forwarded message ---------
> From: Alexandre Gramfort <alexandre.gramfort at telecom-paristech.fr>
> Date: Tue, 5 Feb 2019 at 22:40
> Subject: Re: [Martinos-python] .drop_bad problem
> To: Rockhill, Alexander P. <AROCKHILL at mgh.harvard.edu>
> Cc: Elena Orekhova <orekhova.elena.v at gmail.com>
>
>
> hi,
>
> you should ask such questions on the MNE mailing list:
>
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
>
> it could be due to the change in default parameters for filtering if you
> apply any.
>
> my 2c
>
> Alex
>
>
> On Tue, Feb 5, 2019 at 7:54 PM Rockhill, Alexander P. <
> AROCKHILL at mgh.harvard.edu> wrote:
>
>> Hi Elena,
>>
>>
>>    What do you mean by the real order of the epochs was different? It may
>> be helpful share the output of epochs.events before and after using
>> .drop_bad for both versions.
>>
>>
>> Best,
>>
>>
>> Alex
>>
>>
>> Translational NeuroEngineering Laboratory
>> Division of Neurotherapeutics, Department of Psychiatry
>> Massachusetts General Hospital, Martinos Center
>> 149 13th St Charlestown #2301, Boston, MA 02129
>> ------------------------------
>> *From:* martinos-python-bounces at nmr.mgh.harvard.edu <
>> martinos-python-bounces at nmr.mgh.harvard.edu> on behalf of Elena Orekhova
>> <orekhova.elena.v at gmail.com>
>> *Sent:* Tuesday, February 5, 2019 12:43:25 PM
>> *To:* martinos-python at nmr.mgh.harvard.edu
>> *Subject:* [Martinos-python] .drop_bad problem
>>
>>
>>         External Email - Use Caution
>>
>> Dear experts,
>>
>> I moved from MNE version 0.12.dev0 (Python:  2.7.6 | 64-bit |)  to mne
>> version 0.16.2 (3.6.6 |Anaconda, Inc.|) and noticed a problem.
>>
>> There was a difference in the result after applying
>>
>> epochs.drop_bad (reject=reject, flat=flat) in the two MNE versions.
>>
>>
>>
>> Although the number and the order of the events left after applying
>> ‘.drop_bad’ (or ‘.drop_bad_epochs’ in 0.12.dev0) was exactly the same in
>> the two MNE versions,  the real order of the epochs was different.  Inspection
>> of the results suggests that the error is in the 0.16.2, not 0.12.dev0
>>
>>
>>
>> Below is the information about software I used.
>>
>>
>>
>> Best regards,
>>
>> Elena
>>
>>
>>
>> ###########################
>>
>> *mne:           0.12.dev0:*
>>
>> mne.sys_info()
>>
>> Platform:      Darwin-18.2.0-x86_64-i386-64bit
>>
>> Python:        2.7.6 | 64-bit |
>>
>> (default, Sep 15 2014, 17:43:19) [GCC 4.2.1 (Apple Inc. build 5666) (dot
>> 3)]
>>
>> Executable:    /Users/elena/Library/Enthought/Canopy_64bit/
>> User/bin/pythonw
>>
>> *mne:           0.12.dev0 *
>>
>> numpy:         1.10.4
>>
>> {lapack=mkl_lapack95_lp64, blas=mkl_intel_lp64}
>>
>> scipy:         0.17.0
>>
>> matplotlib:    1.4.2
>>
>> sklearn:       0.17
>>
>> nibabel:       2.0.1
>>
>> nitime:        Not found
>>
>> mayavi:        4.4.3
>>
>> nose:          1.3.4
>>
>> pandas:        0.15.2
>>
>> pycuda:        Not found
>>
>> skcuda:        Not found
>>
>>
>>
>> ###########################
>>
>> *mne:           0.16.2: *
>>
>> mne.sys_info()
>>
>> Platform:      Darwin-18.2.0-x86_64-i386-64bit
>>
>> Python:        3.6.6 |Anaconda, Inc.|
>>
>> (default, Jun 28 2018, 11:07:29)
>>
>> [GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)]
>>
>> Executable:    /Users/elena/anaconda3/envs/mne/bin/python
>>
>> CPU:           i386: 4 cores
>>
>> Memory:        16.0 GB
>>
>> mne:           0.16.2
>>
>> numpy:         1.15.2 {blas=mkl_rt, lapack=mkl_rt}
>>
>> scipy:         1.1.0
>>
>> matplotlib:    3.0.0 {backend=Qt5Agg}
>>
>> sklearn:       0.20.0
>>
>> nibabel:       2.3.1
>>
>> mayavi:        4.6.2 {qt_api=pyqt5}
>>
>> pycuda:        Not found
>>
>> skcuda:        Not found
>>
>> pandas:        0.23.4
>>
>>
>>
>>
>>
>> _______________________________________________
>> martinos-python mailing list
>> martinos-python at nmr.mgh.harvard.edu
>> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/martinos-python
>
>
>
> --
> Best regards,
> Elena V. Orekhova
> _______________________________________________
> Mne_analysis mailing list
> Mne_analysis at nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20190206/b5af57e4/attachment-0001.html 


More information about the Mne_analysis mailing list