 # frequency bands within morlet

Hello all,
I am using morlet wavelets for my data. I am trying to find a way to adjust the code in such a way that I can visualize the power per frequency band [12-17Hz], [17-23Hz], [23-29 Hz]. Right now it seems that power is computed for every single frequency from 12 up to 29.

I am following this tutorial:

Frequency and time-frequency sensor analysis — MNE 0.23.0 documentation

This is a piece from my code I am trying to adjust:

``````###determining the frequencies###
freqs = np.arange(12, 29, 1)      # full range
freqsbeta1 = np.arange(12, 17, 1)  # beta1 (12-17Hz)
freqsbeta2 = np.arange(17, 23, 1)  # beta2 (17-23Hz)
freqsbeta3 = np.arange(23, 29, 1)  # beta3 (23-29Hz)

#different number of cycle per frequency
n_cycles = freqs / 2.
n_cycles1 = freqsbeta1 / 2.
n_cycles2 = freqsbeta2 / 2.
n_cycles3 = freqsbeta3 / 2.

baseline = [-6.5, -5.5]  # baseline interval (in s)
baseline2 = [-7, -6]
baseline3 = [-0.1, -0.01]

powerprep1allbands, itc1 = tfr_morlet(concatpreparationb1, freqs=freqs, n_cycles=n_cycles, use_fft=True,
return_itc=True, n_jobs=1)
``````

And here is how I visualize it:

``````powerprep1allbands.plot(['C3'], tmin=-0.5, tmax=1.5, baseline=baseline, mode='percent', title=powerprep1allbands.ch_names)
``````

Can someone tell me how I can get it seperated on the basis of the three frequency bands?