Plotting¶
Configuration¶
- sdr.plot.use_style()
Applies
sdr
’s defaultmatplotlib
rcParams.
Time-domain¶
- sdr.plot.time_domain(x: ndarray[Any, dtype[_ScalarType_co]], *, ...)
- sdr.plot.time_domain(t: ndarray[Any, dtype[_ScalarType_co]], x, ...)
Plots a time-domain signal \(x[n]\).
-
sdr.plot.raster(x: NDArray, length: int | None =
None
, ...) Plots a raster of the time-domain signal \(x[n]\).
Frequency-domain¶
Spectral estimation¶
- sdr.plot.periodogram(x: ArrayLike, ...)
Plots the estimated power spectral density \(P_{xx}\) of a time-domain signal \(x[n]\) using Welch’s method.
- sdr.plot.spectrogram(x: ArrayLike, ...)
Plots the spectrogram of a time-domain signal \(x[n]\) using Welch’s method.
Modulation¶
- sdr.plot.constellation(x_hat: NDArray[complex128], ...)
Plots the constellation of the complex symbols \(\hat{x}[k]\).
- sdr.plot.symbol_map(modulation, ...)
Plots the symbol map of the complex symbols \(\hat{x}[k]\).
-
sdr.plot.eye(x: NDArray, sps: int, span: int =
2
, ...) Plots the eye diagram of the baseband modulated signal \(x[n]\).
-
sdr.plot.phase_tree(x: NDArray, sps: int, span: int =
2
, ...) Plots the phase tree of a continuous-phase modulated (CPM) signal signal \(x[n]\).
- sdr.plot.ber(ebn0: NDArray[float64], ber: NDArray[float64], **)
Plots the bit error rate (BER) as a function of \(E_b/N_0\).
- sdr.plot.ser(esn0: NDArray[float64], ser: NDArray[float64], **)
Plots the symbol error rate (SER) as a function of \(E_s/N_0\).
Detection¶
- sdr.plot.p_d(x: ArrayLike, p_d: ArrayLike, ...)
Plots the probability of detection \(P_d\) as a function of received SNR or ENR.
- sdr.plot.roc(p_fa: ArrayLike, p_d: ArrayLike, ...)
Plots the receiver operating characteristic (ROC) curve as a function of \(P_{fa}\).
- sdr.plot.detector_pdfs(...)
Plots the probability density functions (PDFs) of the detector under \(\mathcal{H}_0\) and \(\mathcal{H}_1\).
Filter analysis¶
- sdr.plot.impulse_response(filter, ...)
Plots the impulse response \(h[n]\) of a filter.
- sdr.plot.step_response(filter, ...)
Plots the step response \(s[n]\) of a filter.
- sdr.plot.zeros_poles(filter, ...)
Plots the zeros and poles of the filter.
- sdr.plot.magnitude_response(filter, ...)
Plots the magnitude response \(|H(\omega)|^2\) of the filter.
- sdr.plot.phase_response(filter, ...)
Plots the phase response \(\angle H(\omega)\) of the filter.
- sdr.plot.phase_delay(filter, ...)
Plots the phase delay \(\tau_{\phi}(\omega)\) of the filter.
- sdr.plot.group_delay(filter, ...)
Plots the group delay \(\tau_g(\omega)\) of the IIR filter.
- sdr.plot.filter(filter, ...)
Plots the magnitude response \(|H(\omega)|^2\), impulse response \(h[n]\), and zeros and poles of the filter.