Esempio n. 1
0
import matplotlib.pyplot as plt

set_log_level(verbose="ERROR")

# load the data
ch_type = "grad"
X, y = assemble_epochs("answer", ch_type=ch_type)

info_src = bp.epochs.fpath(subject="01")
info = read_info(info_src)
sel_idx = pick_types(info, meg=ch_type)
info.pick_channels([info.ch_names[s] for s in sel_idx])

erf_low = EpochsArray(X[y == LOW_CONF_EPOCH, ...], info, tmin=-1).average()
erf_high = EpochsArray(X[y == HIGH_CONF_EPOCH, ...], info, tmin=-1).average()
erf_low.apply_baseline()
erf_high.apply_baseline()

# erf_diff = combine_evoked([erf_low, -erf_high], weights="equal")
# f1 = erf_low.plot_joint(
#     times=[-1, -0.92, -0.734, 0.132, 0.192, 0.288, 0.4], show=False
# )
# f1.set_size_inches(14, 6)
# plt.title("Low confidence ERF", fontsize=20)
# plt.show()

# f2 = erf_high.plot_joint(
#     times=[-1, -0.92, -0.734, 0.132, 0.192, 0.288, 0.4], show=False
# )
# f2.set_size_inches(14, 6)
# plt.title("High confidence ERF", fontsize=20)