optic.comm.modulation.detector

detector(r, σ2, constSymb, px=None, rule='MAP')

Perform symbol detection using either the MAP (Maximum A Posteriori) or ML (Maximum Likelihood) rule.

Parameters:
  • r (np.array) – The received signal.

  • σ2 (float) – The noise variance.

  • constSymb (np.array) – The constellation symbols.

  • px (np.array, optional) – The prior probabilities of each symbol. If None, uniform priors are assumed.

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

Returns:

  • tuple

    A tuple containing:
    • np.array: The detected symbols.

    • np.array: The indices of the detected symbols in the constellation.

  • Notes

  • ——

  • If px is None or rule is ‘ML’, uniform priors are assumed.

References

[1] Proakis, J. G., & Salehi, M. Digital Communications (5th Edition). McGraw-Hill Education, 2008.