[Mne_analysis] Averaging over channels

Mikołaj Magnuski mmagnuski at swps.edu.pl
Thu Dec 8 05:22:04 EST 2016
Search archives:

Hi,

you can get directly to the evoked data by accessing the .data field:

evoked_deviant.data

it is a channels x timesamples numpy array, so to average over all channels
you would do:

evkd_deviant_chan_avg = evoked_deviant.data.mean(axis=0)

​

2016-12-07 17:09 GMT+01:00 Stephen Johnston <sjayejohnston at gmail.com>:

> Hi All
>
> I'm new at using MNE. Like it so far, but struggling a little getting
> access/manipulating EEG channel data.
>
> So far I have managed to get through pre-processing and have managed to
> extract my channels of interest, in this case 'Oz', 'O1', 'O2' and 'Pz' and
> calculated my evoked potentials for my events of interest, an example of
> how I'm doing that, for one event type follows...
>
> picks = [raw.ch_names.index(ch) for ch in ['OZ', 'O1', 'O2','PZ']]
>
> reject = dict(eeg=50e-6)
> event_id, tmin, tmax = {'deviant5': 5}, -0.2, 0.5
> epochs_params = dict(events=events, picks=picks, event_id=event_id,
> tmin=tmin, tmax=tmax,
>                      reject=None)
>
> evoked_deviant = mne.Epochs(raw, **epochs_params).average()
>
> The issue is (I'm calculating an MMN difference wave) - I want to average
> over the Occipital channels, to essentially make one 'new' channel, and I
> can't find the command/data to be able to do that.
>
> I'm sure it's simple, but I've been bashing my head a bit trying to figure
> it out.
>
> Any help much appreciated.
>
> Best
>
> Steve
>
>
>
> _______________________________________________
> Mne_analysis mailing list
> Mne_analysis at nmr.mgh.harvard.edu
> 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
> 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/20161208/5de9e616/attachment-0001.html 


More information about the Mne_analysis mailing list