optic.plot.plotDecisionBoundaries

plotDecisionBoundaries(constSymb, px=None, SNR=20, rule='MAP', gridStep=0.001, d=0.5, cmap=<matplotlib.colors.ListedColormap object>, fig=None, ax=None)

Plot decision boundaries for a given constellation symbols.

Parameters:
  • constSymb (array_like) – An array of complex constellation symbols.

  • px (array_like, optional) – Prior probabilities for each symbol in constSymb. If None, equal probabilities are assumed.

  • SNR (float, optional) – Signal-to-noise ratio in decibels (dB). Default is 20.

  • rule (str, optional) – The detection rule to use. Either ‘MAP’ (default) or ‘ML’.

  • gridStep (float, optional) – Step size for creating the decision boundary grid. Default is 0.001.

  • d (float, optional) – Margin added to the maximum and minimum values of real and imaginary parts of constSymb. Default is 0.5.

  • cmap (str or Colormap, optional) – Colormap to be used for the contour plot. Default is ‘turbo’.

  • fig (matplotlib.figure.Figure, optional) – Figure object for the plot. If None, a new figure is created. Default is None.

  • ax (matplotlib.axes.Axes, optional) – Axes object for the plot. If None, a new axes is created. Default is None.

Returns:

  • fig (matplotlib.figure.Figure) – The created matplotlib figure.

  • ax (matplotlib.axes.Axes) – The created matplotlib axes.

Notes

This function plots decision boundaries for a given set of constellation symbols in the complex plane. It uses the specified signal-to-noise ratio (SNR), detection rule, and prior probabilities (if available) to determine the decision boundaries.

The decision boundaries are plotted using a contour plot with colors representing the different decision regions.