Averaging over channels

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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20161207/f66bb4cc/attachment.html

hi,

there is indeed no out of the box solution to make a new dataset with this, yet
the plot_compare_evokeds allow you to view groups of channels

http://martinos.org/mne/dev/generated/mne.viz.plot_compare_evokeds.html#mne.viz.plot_compare_evokeds

See the picks parameter.

HTH
Alex

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>: