morlet wavelet - tfr - power units

I ran mne.time_frequency.tfr_morlet on event data (eeg). I extracted times and power values for one event/condition. What is the unit of power here? log power?

I get negative power values when I average power.

time_points_plan_stop = (tfr_nobase_stop.times >= 2.3) & (tfr_nobase_stop.times <= 2.7)

power_plan_stop =[:, :, time_points_plan_stop].mean(axis=(0, 1))

average_power_plan_stop = power_plan_stop.mean()

print("Average of Mean Power for Planned Stop condition:", average_power_plan_stop)

How did you compute tfr_nobase_stop?


freqs = np.arange(5, 50., 1)

tfr_stop= mne.time_frequency.tfr_morlet(epochs_all_stop["stop"], freqs, 5, average=False, return_itc=False)


I’m actually not sure, but I don’t see any logarithms in the calculation:

@larsoner do you have an idea?

not sure why I get negative values when I average power using morlet for stop cue

I am not sure what the units are but I don’t think there should be any negative values (and no log should be taken) unless you baseline, e.g.:

>>> import numpy as np
>>> import mne
>>> epochs = mne.EpochsArray(np.random.default_rng(0).normal(0, 1, (10, 5, 1000)), mne.create_info(5, 1000., 'eeg'))
>>> tfr, _ = mne.time_frequency.tfr_morlet(epochs, [10.], 5)