rdm
Range-Doppler map (RDM) generation and plotting.
Provides the :func:gen entry point that simulates a full CPI — adding skin
and jammer returns to a datacube, applying matched filtering, Doppler
windowing, and the slow-time FFT — and a set of plot helpers for RTMs and RDMs.
gen(radar, waveform, return_list, seed=0, plot=True, debug=False, snr=False, window='chebyshev', window_kwargs=None)
Generate a Range-Doppler Map (RDM) for a single Coherent Processing Interval (CPI).
Simulates received radar data for one or more targets moving at constant range rates and processes it to produce an RDM, accounting for radar system parameters, waveform characteristics, and noise.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
radar
|
Radar
|
Radar system parameters. See
:class: |
required |
waveform
|
WaveformSample
|
WaveformSample created by a factory function
(e.g. :func: |
required |
return_list
|
list
|
List of :class: |
required |
seed
|
int
|
Random number generator seed for reproducibility. Defaults to 0. |
0
|
plot
|
bool
|
If True, plots the final RDM. Defaults to True. |
True
|
debug
|
bool
|
If True, plots intermediate processing steps and prints diagnostic statistics. Defaults to False. |
False
|
snr
|
bool
|
If True, output amplitudes are normalised to SNR (voltage ratio). If False, output amplitudes are in Volts. Defaults to False. |
False
|
window
|
str
|
Doppler window function applied before the slow-time FFT.
One of |
'chebyshev'
|
window_kwargs
|
dict | None
|
Optional dict forwarded to the underlying
|
None
|
Returns:
| Name | Type | Description |
|---|---|---|
tuple |
tuple[ndarray, ndarray, ndarray, ndarray]
|
A four-element tuple
|
Source code in src/rad_lab/rdm.py
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 | |
plot_rdm(rdot_axis, r_axis, data, title, cbar_min=-100, volt_to_dbm=True)
Plots a range-Doppler matrix (RDM).
The RDM shows radar data after pulse compression and Doppler processing.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
rdot_axis
|
ndarray
|
1D array of range-rate values in m/s. |
required |
r_axis
|
ndarray
|
1D array of range values in meters. |
required |
data
|
ndarray
|
2D complex array representing the RDM. |
required |
title
|
str
|
The title for the plot. |
required |
cbar_min
|
float
|
The minimum value for the color bar. Defaults to -100. |
-100
|
volt_to_dbm
|
bool
|
If True, converts data from voltage to dBm for plotting. If False, plots power in Watts. Defaults to True. |
True
|
Returns:
| Type | Description |
|---|---|
tuple[Figure, Axes]
|
The figure and axes objects of the plot. |
Source code in src/rad_lab/rdm.py
177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 | |
plot_rdm_snr(rdot_axis, r_axis, data, title, cbar_min=0, volt_ratio_to_db=True)
Plots a range-Doppler matrix in terms of Signal-to-Noise Ratio (SNR).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
rdot_axis
|
ndarray
|
1D array of range-rate values in m/s. |
required |
r_axis
|
ndarray
|
1D array of range values in meters. |
required |
data
|
ndarray
|
2D array representing the RDM with amplitudes as a linear SNR voltage ratio (i.e., S_voltage / N_voltage). |
required |
title
|
str
|
The title for the plot. |
required |
cbar_min
|
float
|
The minimum value for the color bar. Defaults to 0. |
0
|
volt_ratio_to_db
|
bool
|
If True, converts the SNR voltage ratio to dB. Defaults to True. |
True
|
Returns:
| Type | Description |
|---|---|
tuple[Figure, Axes]
|
The figure and axes objects of the plot. |
Source code in src/rad_lab/rdm.py
227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 | |
plot_rtm(r_axis, data, title)
Plots the magnitude and phase of a range-time matrix (RTM).
The RTM shows radar data before Doppler processing, with range on one axis and pulse number (slow-time) on the other.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
r_axis
|
ndarray
|
1D array of range values in meters. |
required |
data
|
ndarray
|
2D complex array representing the RTM, with shape (num_range_bins, num_pulses). |
required |
title
|
str
|
The title for the plot. |
required |
Source code in src/rad_lab/rdm.py
145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 | |