optic.plot.plotPSD
- plotPSD(sig, Fs=1, Fc=0, NFFT=4096, fig=None, label=None)
Plot the power spectrum density (PSD) of a signal.
- Parameters:
sig (np.array) – input signal.
Fs (scalar, optional) – signal’s sampling frequency. The default is 1.
Fc (scalar, optional) – signal’s central frequency. The default is 0.
NFFT (scalar int, optional) – FFT size. The default is 4096.
fig (figure object, optional) – matplotlib figure handle. The default is [].
label (string, optional) – PSD plot label. The default is [].
- Returns:
fig (matplotlib figure object) – matplotlib figure object where the plot is generated.
matplotlib axes object – matplotlib axes object where the plot is displayed.