mmwave.dataloader.utils

mmwave.dataloader.utils.parse_tsw1400(path, num_chirps_per_frame, num_frames, num_ants, num_adc_samples, iq=True, num_adc_bits=16)

Parse the raw ADC data based on xWR16xx/IWR6843 and TSW1400 configuration.

Parse the row-majored binary output from raw ADC data capture to numpy ndarray with the shape of (numFrame, num_chirps_per_frame, num_ants, num_adc_samples). For more details, refer to the original document https://www.ti.com/lit/an/swra581b/swra581b.pdf.

Parameters:
  • path (str) – File path of the binary data.
  • num_chirps_per_frame (int) – Total number of chirps from all transmitters in a single frame.
  • num_frames (int) – Number of frames in the recorded binary data.
  • num_ants (int) – Number of physical receivers.
  • num_adc_samples (int) – Number of ADC samples.
  • iq (bool) – True if complex and False if real.
  • num_adc_bits (int) – Number of ADC quantization bits.
Returns:

Parsed ADC data with the shape of (num_frames, num_chirps_per_frame, num_ants, num_adc_samples)

Return type:

ndarray

Example

>>> # Suppose your binary data is located at "./data/radar_data.bin".
>>> adc_data = parse_tsw1400("./data/radar_data.bin", 128, 200, 4, 256)
>>> # Now your adc_data will be an ndarray with shape (200, 128, 4, 256) and dtype as complex.