Skip to content

Radar Utility

clean_heatmap(fft_in, q)

Applies percentile-based thresholding to clean a heatmap.

Parameters:

Name Type Description Default
fft_in ndarray

Input heatmap data (e.g., FFT output).

required
q float

Percentile threshold (0-100). Values below this percentile are set to the threshold.

required

Returns:

Type Description
ndarray

np.ndarray: Processed heatmap with low values clipped.

download_files(remote_dir, local_dir, files, start_time)

Downloads multiple radar data files from an mmWave radar's DSP board using SCP in parallel threads.

Parameters:

Name Type Description Default
remote_dir str

The directory path on the mmWave radar's DSP board containing the data files.

required
local_dir str

The local directory where the files will be saved.

required
files list

A list of file names to be downloaded.

required
start_time float

The timestamp marking the start of the download process.

required

get_doppler_fft(range_fft, n=None, dc_offset=None)

Computes the Doppler FFT of range-transformed data.

Parameters:

Name Type Description Default
range_fft ndarray

FFT-transformed range data.

required
n int

FFT length. Defaults to None.

None
dc_offset bool

If True, compensates for DC offset across all frames. If False, compensates within each Doppler bin. Defaults to None.

None

Returns:

Type Description
ndarray

np.ndarray: Doppler FFT output.

get_frames_count(idx_path)

Reads the number of frames from an index file.

Parameters:

Name Type Description Default
idx_path str

Path to the index binary file.

required

Returns:

Name Type Description
int int

Number of frames in the dataset.

get_iq_data_per_chip(data_path, frame_id, samples_per_frame, config)

Extracts in-phase (I) and quadrature (Q) data for a specific radar frame.

Parameters:

Name Type Description Default
data_path str

Path to the binary data file.

required
frame_id int

Index of the frame to extract.

required
samples_per_frame int

Total number of samples per frame.

required
config dict

Radar configuration dictionary.

required

Returns:

Type Description
ndarray

np.ndarray: Extracted IQ data with shape (chirp_per_loop, rx_per_device, num_of_loops, adc_per_chirp, 2).

get_range_fft(frames, n=None)

Computes the Range FFT of radar frames.

Parameters:

Name Type Description Default
frames ndarray

Input radar frames.

required
n int

FFT length. Defaults to None.

None

Returns:

Type Description
ndarray

np.ndarray: Range FFT output.

run_scp(remote_path, local_path, start_time)

Transfers a file from the mmWave radar's DSP board to a local machine using SCP.

Parameters:

Name Type Description Default
remote_path str

Full path to the file on the DSP board.

required
local_path str

Destination path on the local machine.

required
start_time float

Timestamp for tracking transfer duration.

required