-
sdr.plot.phase_tree(x: ArrayLike, sps: int, span: int =
2
, sample_rate: float | None =None
, color: 'index' | str ='index'
, ax: Axes | None =None
, **kwargs) Plots the phase tree of a continuous-phase modulated (CPM) signal signal \(x[n]\).
- Parameters:¶
- x: ArrayLike¶
The baseband CPM signal \(x[n]\).
- sps: int¶
The number of samples per symbol.
- span: int =
2
¶ The number of symbols per raster.
- sample_rate: float | None =
None
¶ The sample rate \(f_s\) of the signal in samples/s. If
None
, the x-axis will be labeled as “Symbol”.- color: 'index' | str =
'index'
¶ Indicates how to color the rasters. If
"index"
, the rasters are colored based on their index. If a valid Matplotlib color, the rasters are all colored with that color.- ax: Axes | None =
None
¶ The axis to plot on. If
None
, the current axis is used.- **kwargs¶
Additional keyword arguments to pass to
sdr.plot.raster()
.
Example
Modulate 100 MSK symbols.
In [1]: msk = sdr.MSK(); \ ...: s = np.random.randint(0, msk.order, 100); \ ...: x = msk.modulate(s) ...:
In [2]: plt.figure(); \ ...: sdr.plot.phase_tree(x, msk.sps) ...: