Your question is trickier than it seems.
The short answer is: use pywt's scale2freq
built-in function to return the frequency associated with a given wavelet at a given scale. For instance, the code below returns the frequency of the Daubechies 4 wavelet, at scale 5 (0.14285714285714285):
import pywt
pywt.scale2frequency('db4',5)
You could get to the same result by computing the central frequency of your db4 wavelet (0.7142857142857143) and then dividing by the scale (5)
import pywt
pywt.central_frequency('db4')/5
Please note that this is not the actual central frequency of the signal! This quantity is called a pseudo-frequency because it is independent from the signal being analyzed.
In order to recover the central frequency of the signal, you need to divide the pseudo-frequency by the sampling rate of the signal:
import pywt
pywt.scale2frequency('db4',5)/dt
Where dt
is your sampling rate.
I hope this helps!
PS: I suggest plotting the spectrum of the reconstructed signal to convince yourself that the central frequency matches the value output by the aforementioned analytical formula.