[Mne_analysis] Fwd: Convert pandas dataframe back to Evoked (UPDATED!)

Eric Larson larson.eric.d at gmail.com
Tue Aug 7 16:23:32 EDT 2018
Search archives:

        External Email - Use Caution        

>
> Sorry for spamming, but the second I pressed "send" I realized that I
> could simply set the time points correctly as NewEvoked.times =
> OriginalEvoked.times. That seems to work fine and that would solve my main
> question.
>

This is not a safe operation because it creates inconsistencies between
various parameters of the EvokedArray object.

Given `tmin` in the `EvokedArray` constructor and `info['sfreq']`, you
should be able to get `evoked.times` to be correct (assuming equal spacing
of samples, which is implicitly required for EvokedArray). Perhaps you
weren't setting `tmin` properly, or `info['sfreq']` was not set to the
correct value?

Regarding to/frame dataframe, I would instead just use `evoked.data`
directly as a NumPy array, do my computations there, and then create a new
object with EvokedArray.

Eric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20180807/1cdab816/attachment.html 


More information about the Mne_analysis mailing list