static sdr.ReplicaCorrelator.roc(enr: float, p_fa: ArrayLike | None = None, complex: bool = True) tuple[NDArray[float_], NDArray[float_]]

Computes the receiver operating characteristic (ROC) curve.

Parameters:
enr: float

The received energy-to-noise ratio \(\mathcal{E}/\sigma^2\) in dB.

p_fa: ArrayLike | None = None

The probability of false alarm \(P_{FA}\). If None, the ROC curve is computed for p_fa = np.logspace(-10, 0, 101).

complex: bool = True

Indicates whether the signal is complex.

Returns:

  • The probability of false alarm \(P_{FA}\).

  • The probability of detection \(P_D\).

Examples

In [1]: plt.figure(figsize=(8, 4)); \
   ...: sdr.plot.roc(*sdr.ReplicaCorrelator.roc(-10), label="ENR = -10 dB"); \
   ...: sdr.plot.roc(*sdr.ReplicaCorrelator.roc(-5), label="ENR = -5 dB"); \
   ...: sdr.plot.roc(*sdr.ReplicaCorrelator.roc(0), label="ENR = 0 dB"); \
   ...: sdr.plot.roc(*sdr.ReplicaCorrelator.roc(5), label="ENR = 5 dB"); \
   ...: sdr.plot.roc(*sdr.ReplicaCorrelator.roc(10), label="ENR = 10 dB"); \
   ...: sdr.plot.roc(*sdr.ReplicaCorrelator.roc(15), label="ENR = 15 dB");
   ...: 
../../_images/sdr_ReplicaCorrelator_roc_1.png