Frequencies
Currently, scale_to_freq
computes the peak center frequencies of wavelets, via np.argmax(np.abs(wavelet_in_freq))
, which returns the peak's index, and can convert to physical via * fs
. Relevant reading: Wavelet "center frequency" explanation? Relation to CWT scales?, and on units, see bottom of this.
Colormap
It's turbo, left is minimum right is maximum value. Moreover, by default ssqueezepy.visuals.imshow
with abs=1
forces the lower limit to be 0
, which is a good idea for visualizing non-negatives.

Other
Is red corresponding to high overlapping and blue no overlapping for instance ?
Greater value = stronger correlation (similarity / inner product), of wavelet with input. out[5, 20] = sum(x * np.roll(psi_5, 20))
, where psi_5
is in time. See animation under "Continuous Wavelet Transform" here.
The amount of overlap never affects the values of CWT/STFT, only the total number of values: for frequency overlap, Sx.shape[0]
, for time overlap, Sx.shape[1]
. For ssqueezepy
's CWT, the time overlap is always maximum, hop_size=1
, and frequency overlap is controlled by nv
, CWT's equivalent of STFT's n_fft
(except nv
is density, so ~proportional to total number of wavelets).
The time-domain perspective is explained in more detail here under "Convolution <=> Windowed Fourier equivalence"; it's for STFT, but as far as any individual filter is concerned, they're exactly the same thing.
Strength of correlation, in short
First, if unfamiliar with how Fourier transform works, I highly recommend this clip. I've also skimmed this one on CWT - seems visually rich but I've no clue what's in it, maybe a better spending of time.
But in short, in physics the dot product measures the alignment of vectors - the greater the value, the stronger the alignment. It's exactly the same here in time, and similar in frequency: per convolution theorem, "convolution in time <=> multiplication in frequency", and we're multiplying by the wavelets' frequency responses in frequency, for every row of CWT, which measures the alignment of input signal's frequency with the wavelet's - and each wavelet is narrowly confined in frequency. And at the same time, each output point of convolution is the result of a dot product in time, and wavelets are also narrowly localized in time - hence, "time-frequency", localized in both!

CWT output for that wavelet is ifft
of the plot on right (minus the absolute value which is for visual convenience), which is one row, e.g. Wx[5]
. For your example that peaks at f=7
:

from ssqueezepy.visuals import plot
from numpy.fft import ifftshift, ifft
max_row_idx = np.where(np.abs(Wx) == np.abs(Wx).max())[0][0]
max_row_wavelet_fr = wavelet._Psih[max_row_idx]
# unpad by 156 to match `len(sig)`
max_row_wavelet_tm = ifftshift(ifft(max_row_wavelet_fr))[156:-156]
a = max_row_wavelet_tm.real
b = sig
a = a / np.abs(a).max()
b = b / np.abs(b).max()
plot(b, w=1.1, h=.7)
plot(a, title='signal; wavelet of "reddest" CWT row, real part')
Visualize the filters
You can tell everything about the transform from its filters. Below adds to your code:
from ssqueezepy.visuals import plot
from numpy.fft import ifft, ifftshift
# should take `cwt` at least once
psihs = wavelet._Psih
print(psihs.shape)
# show in freq domain
plot(psihs.T, color='tab:blue', show=1, title="CWT filterbank")
plot(psihs[:, :30].T, color='tab:blue', show=1, title="zoomed")
# show one in time domain
# for FFT-convolution, it's centered at index 0, `ifftshift` centers visually
pt = ifftshift(ifft(psihs[-50]))
plot(pt, complex=1, title="time-domain example")
plot(pt, abs=1, color='k', linestyle='--', show=1)