Error with Baseline

I am trying to baseline my data using:

power=tfr_array_morlet(epochs.get_data(),[‘sfreq’], freqs=freqs, n_cycles=n_cycles, output=‘avg_power’)

rescale(power, epochs.times, (-0.2, 0.2), mode=‘zscore’)

But I obtain an output with only NaN values (while using ‘mean’ it works fine). How can I manage to get a result with ‘zscore’?

I suspect the standard deviation of your power during baseline is zero so the zscore is NaN

1 Like

Thanks! Should I then try some data transformation? (if yes, do you have any suggestions?) Or does this mean that I can’t apply ‘zscore’ in this case?

I suspect your baseline is too short

1 Like