Obtain signal data from baseline correction

raw = mne.io.read_raw_fif(sample_data_raw_file)

events, event_id = mne.events_from_annotations(raw)
epochs = mne.Epochs(raw, events)

average = epochs.average()
times = average.times * 1e3

baseline_corrected = average.apply_function(fun = mne.baseline.rescale, times=epochs.times,
                                            baseline=(-2.0, 0), mode='zscore')

Baseline adjustment went well. But is there a way to view each channel like when using raw.plot()? The last line of code returns mne.EvokedArray. How can I get filtered signal data other than evoked data for each channel?

baseline_corrected.plot_topo() will show you every channel. However, Iā€™m guessing you want to compare amplitudes of channels side-by-side, in which case I think you want to create a grid layout: mne.channels.make_grid_layout.

layout = mne.channels.make_grid_layout(baseline_corrected.info, picks="meg", n_col=1)
baseline_corrected.plot_topo(layout=layout)
2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.