task-related component analysis

MNE-Python version:0.23.4
operating system:windows10

Hi,I want to average the data from all channels. But I only find the function that directly draws the picture.
code:
mne.viz.plot_compare_evokeds(evokeds=evoked, combine=‘mean’)
Is there any other way to directly get the average processed data of all channels?
Much appreciated

Once you have your mne.Epochs instance, e.g. epochs, you can create the evoked response with epochs.average(). This average method creates an mne.Evoked instance that contains the data averaged by channel.

More information on this tutorial: The Evoked data structure: evoked/averaged data — MNE 0.24.1 documentation

Sorry, I meant to merge data from all channels together. Just like doing TRCA operation on SSVEP data

Oh my bad! I misread the first post.
I don’t think there is any built-in solution in MNE. You can retrieve the underlying data array with .get_data() and then compute the mean across the channel dimension with numpy.

Just to develop on the response of @mscheltienne (assuming your Evoked data are ready and stored in erp variable):

erp_chan_avg = erp.data.mean(axis=0)

this gives you an array of channel-averages in time. If you want to perform the averaging only on a subset of channels you can use .pick_channels() before the command above, for example:

erp.pick_channels(['O1', 'Oz', 'O2'])