I have calculated the STFT with scipy python library:
f_spec, t_spec, Spectro= sc.signal.spectrogram(My_Signal, fs=1.0, window='hamming', nperseg=180, noverlap=None, nfft=2048, detrend=False, return_onesided=False, scaling='density', axis=-1, mode='complex')
I wanted to get the same result as spectrogram function of MATLAB and now I want to calcluate its PSD in dB. In fact I have found several expression in internet such as :
PSD = 10*log10(abs(Spectro))
I am not sure what to use can any one help me?