High variability in TFr plots

Hi,
without looking too closesly at your code, have you looked at the data pre power calculation? I suggest calculating the mean and standard deviation pre-TFR to ensure your data is clean. Then I would plot the tfr without baseline, again making sure it looks good. If the tfr plots without baseline look okey, something is wrong with your formula. Did you have a look at the baseline correction method implemented in mne
? I am not sure I understand your baseline choice but usually you would use the condition specific signal as baseline.

Cheers,

Carina