How to see the erds (induced power) differences for different conditions in a specific frequency band? and to graphically view the frequency response in a specific frequency band averaged over time

Hi all,

I was referring to this article: Young infants process prediction errors at the theta rhythm - ScienceDirect

My work is also aligned with the computations shown here in the figure:

Fig. . The grand mean spectral characteristics for unexpected versus expected events for the outcome picture. (A) The left panels show the time-frequency response across all scalp-recorded electrodes for unexpected and expected events and the difference (unexpected – expected), with regard to a βˆ’0.1–0 s baseline. The right panels show the frequency response between 2 and 15 Hz, averaged over time. The gray area indicates the 4–5 Hz range. (B) The upper topography shows the unexpected - expected difference in 4–5 Hz activity across the whole time window of analysis (0–2 s, baseline: βˆ’0.1–0 s). The lower topographies show the activity for expected and unexpected events, separately. (C) The corresponding time course for the 4–5 Hz response across all scalp-electrodes and the whole 0–2 s time window shows a significant difference between unexpected versus expected events, p = 0.025.

Please if you can guide how to get similar graphs A (difference of the conditions and the graphs in the right panel) ,B and C using MNE. I am new to using MNE, your help is highly appreciated.
Many thanks.

Is it correct to computer the difference in spectrum pertubations for the two conditions, like this:
induced_power_difference = induced_power_condition1 - induced_power_condition2

hi @swa

to me there is not one way of doing things but my default way to contrast power would be to
subtract but after log transform (data in dB is you wish) so it’s like doing a ratio of power.

HTH
Alex

will it be correct like this?
induced_power_difference = induced_power_condition1.apply_baseline( (a,b), mode=β€˜logratio’) - induced_power_condition2.apply_baseline((a,b), mode=β€˜logratio’))

Also, any suggestions how to plot a certain freq band response for the complete trial? (Figure C)

Your suggestions will be very helpful. Thanks