# 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)