measure_spectrum()#
- InstroSDR.measure_spectrum( ) Measurement | None[source]#
Acquire one block and publish four scalar spectrum features per channel.
Publishes
spectrum.peak_power_db,spectrum.peak_freq_hz(Hz),spectrum.mean_power_db, andspectrum.occupied_bw_hz(Hz, the band holding 99% of total power). The spectrum array itself is not published; usecompute_psdfor it.- Parameters:
- Returns:
Measurement | None – The published features, or
Noneif the read returned no samples.- Raises:
ValueError – If
n_samplesis not positive.