Solved! How to visualize features calculated from the MEG or EEG time series

Below is the example code I used:

import os
import numpy as np
import mne
sample_data_folder = mne.datasets.sample.data_path()
sample_data_raw_file = os.path.join(sample_data_folder, 'MEG', 'sample',
raw =
ica = mne.preprocessing.ICA(n_components=20, random_state=97, max_iter=800)
ica.exclude = [1, 2]  # details on how we picked these are omitted here
ica.plot_properties(raw, picks=ica.exclude)

entr = np.zeros([dat.shape[0],1])
N=10000  # take 10000 as a quick test
for i in range(dat.shape[0]):
    #en = entropy(ts)  # entropy is my code
meginfo=mne.pick_info(, meg_channel_indices)
megidx=mne.pick_types(, meg='mag', eeg=False, exclude=[])
meginfo=mne.pick_info(, megidx)
mne.viz.plot_topomap(np.squeeze(entr[megidx]), meginfo, ch_type='meg', cmap='Spectral_r',extrapolate='head',sensors = True)