compute_psd()#
- InstroSDR.compute_psd( ) tuple[ndarray, ndarray] | None[source]#
Acquire one block and return one channel’s power spectral density. Publishes nothing.
Uses a Hann-windowed FFT. Frequencies are absolute, offset by the tuned center frequency.
- Parameters:
- Returns:
tuple[numpy.ndarray, numpy.ndarray] | None –
(frequencies_hz, power_db), frequencies in Hz and power in dB relative to one squared sample unit per Hz.Noneif the read returned no samples.- Raises:
ValueError – If
n_samplesis not positive.