-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathreadme_example.py
More file actions
38 lines (31 loc) · 1.37 KB
/
readme_example.py
File metadata and controls
38 lines (31 loc) · 1.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/usr/bin/env python
"""Minimal range-Doppler map example (used in the README).
Steps:
1. Define a radar system (carrier, power, gains, timing).
2. Choose a waveform (Barker-13 coded pulse).
3. Define a target (range, range-rate, RCS).
4. Generate the RDM — this builds the datacube, adds noise, applies the
matched filter, and Doppler-processes to produce the range-Doppler map.
"""
import matplotlib.pyplot as plt
from rad_lab import rdm, Radar, Target, Return, barker_coded_waveform
# -- Define the radar --
radar = Radar(
fcar=10e9, # carrier frequency [Hz]
tx_power=1e3, # transmit power [W]
tx_gain=10 ** (30 / 10), # transmit gain [linear], 30 dB
rx_gain=10 ** (30 / 10), # receive gain [linear], 30 dB
op_temp=290, # noise temperature [K]
sample_rate=20e6, # ADC sample rate [Hz]
noise_factor=10 ** (8 / 10), # noise factor [linear], 8 dB
total_losses=10 ** (8 / 10), # system losses [linear], 8 dB
prf=200e3, # pulse repetition frequency [Hz]
dwell_time=2e-3, # coherent processing interval [s]
)
# -- Define the waveform: Barker-13 BPSK with 10 MHz bandwidth --
waveform = barker_coded_waveform(10e6, nchips=13)
# -- Define a single skin return --
return_list = [Return(target=Target(range=0.5e3, range_rate=1.0e3, rcs=1))]
# -- Generate and display the range-Doppler map --
rdm.gen(radar, waveform, return_list)
plt.show()