Spectral measurement functions. More...
#include <memory_resource>#include <tuple>#include <nk/value/value.hpp>Go to the source code of this file.
Functions | |
| Value | nk::signal::bandpower (const Value &x, const Value &fs=Value::Empty, const Value &freqrange=Value::Empty, std::pmr::memory_resource *mr=nullptr) |
| Power in a frequency band (p = bandpower(x, fs, freqrange)). | |
| Value | nk::signal::meanfreq (const Value &x, const Value &fs=Value::Empty, std::pmr::memory_resource *mr=nullptr) |
| Power-weighted mean frequency. | |
| Value | nk::signal::medfreq (const Value &x, const Value &fs=Value::Empty, std::pmr::memory_resource *mr=nullptr) |
| Median frequency. | |
| Value | nk::signal::enbw (const Value &window, const Value &fs=Value::Empty, std::pmr::memory_resource *mr=nullptr) |
| Equivalent noise bandwidth of a window (b = enbw(window, fs)). | |
| std::tuple< Value, Value, Value, Value > | nk::signal::obw (const Value &x, const Value &fs=Value::Empty, double p=0.99, std::pmr::memory_resource *mr=nullptr) |
| Occupied bandwidth at fraction p of total power ([bw, flo, fhi, power] = obw(x, fs, p)). | |
| Value | nk::signal::powerbw (const Value &x, const Value &fs=Value::Empty, std::pmr::memory_resource *mr=nullptr) |
| 3-dB power bandwidth around the dominant peak. | |
| Value | nk::signal::spectralcrest (const Value &x, const Value &fs=Value::Empty, std::pmr::memory_resource *mr=nullptr) |
| Spectral crest: max(P) / mean(P) (peakedness). | |
| Value | nk::signal::spectralflatness (const Value &x, const Value &fs=Value::Empty, std::pmr::memory_resource *mr=nullptr) |
| Spectral flatness: geomean(P) / mean(P). | |
| Value | nk::signal::spectralentropy (const Value &x, const Value &fs=Value::Empty, std::pmr::memory_resource *mr=nullptr) |
| Shannon entropy of the normalised PSD. | |
| Value | nk::signal::spectralkurtosis (const Value &x, const Value &fs=Value::Empty, std::pmr::memory_resource *mr=nullptr) |
| Kurtosis of the PSD treated as a frequency distribution. | |
| Value | nk::signal::spectralskewness (const Value &x, const Value &fs=Value::Empty, std::pmr::memory_resource *mr=nullptr) |
| Skewness of the PSD treated as a frequency distribution. | |
| Value | nk::signal::snr (const Value &x, const Value &fs=Value::Empty, std::pmr::memory_resource *mr=nullptr) |
| Signal-to-noise ratio in dB. | |
| Value | nk::signal::sinad (const Value &x, const Value &fs=Value::Empty, std::pmr::memory_resource *mr=nullptr) |
| Signal-to-noise-and-distortion in dB. | |
| Value | nk::signal::thd (const Value &x, const Value &fs=Value::Empty, std::pmr::memory_resource *mr=nullptr) |
| Total harmonic distortion in dB. | |
| Value | nk::signal::sfdr (const Value &x, const Value &fs=Value::Empty, std::pmr::memory_resource *mr=nullptr) |
| Spurious-free dynamic range in dB. | |
| Value | nk::signal::instfreq (const Value &x, const Value &fs=Value::Empty, std::pmr::memory_resource *mr=nullptr) |
| Instantaneous frequency via Hilbert transform. | |
| Value | nk::signal::instbw (const Value &x, const Value &fs=Value::Empty, std::pmr::memory_resource *mr=nullptr) |
| Instantaneous bandwidth. | |
Spectral measurement functions.
Conventions:
Definition in file spectral_metrics.hpp.