Receiver Operating Characteristic (ROC)

Calculate the receiver operation characteristic in a radar.

RadarSimPy is a radar simulation package built with python. Contact me if you are interested in this module.

This notebook is available on my GitHub.


  • numpy
  • scipy
  • plotly (visualization)

Calculate $P_d$ from $SNR$ and $P_{fa}$

Swerling 3 targets without integration

In [1]:
from radarsimpy import roc_pd, roc_snr
import numpy as np

snr = np.arange(-10, 30, 0.1)
pfa = np.array([1e-4, 1e-6, 1e-8])
pd = roc_pd(pfa, snr, 1, 'Swerling 3')
In [2]:
import plotly.graph_objs as go
from plotly.offline import iplot

it_pfa = np.nditer(pfa, flags=['f_index'])

data = []
while not it_pfa.finished:
        x=snr, y=pd[it_pfa.index, :], name='Pfa = '+str(it_pfa[0])))

layout = go.Layout(
    title='Swerling 3, N = 1',
    yaxis=dict(title='Probability of detection Pd'),
    xaxis=dict(title='SNR (dB)'),
fig = go.Figure(data=data, layout=layout)