Other Parts Discussed in Thread: DCA1000EVM
Hi,
I'm trying to process the raw ADC data captured through the DCA1000EVM in python.
However I seem to be getting results that suggest that I might be indexing into the raw data wrongly. The binary file had been preprocessed by:
"Packet_Reorder_Zerofill.exe adc_data_Raw_0.bin adc_data_test3.bin test.log"
Am I interpreting the configuration or documentation on the bytes order wrongly?
Configuration used:
----------------
def form_data_cube(config, flat_array):
samples_per_frame = config['adcSamples'] * config['numChirps'] * config['numLanes']
if config['isComplex']:
data = flat_array.reshape(-1, 8)
data = data[:, :4] + 1j* data[:, 4:]
data.reshape(-1)
else:
data = flat_array
samples_to_discard = len(data)%samples_per_frame
if samples_to_discard >0:
print("Warning: there seems to be incomplete frames. {} samples discarded.".format(samples_to_discard))
data = data[:-samples_to_discard]
return data.reshape(-1, config['numChirps'], config['adcSamples'], config['numLanes'])
samples = np.fromfile('test/adc_data_test2.bin', dtype='int16')
config = {'numChirps': 128, 'adcSamples': 256, 'numLanes': 4}
radar_data_cube = form_data_cube(config, samples)
#adcCfg, profileCfg and frameCfg sets 4RX channels, 256 ADC samples, and 128 chirps, 1024 frames
#However, this step results in a (564, 128, 256, 4) data array with 81920 trailing samples that cannot form a full frame
#RX0 range/doppler FFT
f0_rx0 = radar_data2[0, :, :, 0]
print(f0_rx0.shape) #prints (128, 256)
range_fft = np.fft.fft(f0_rx0)
doppler_fft = np.fft.fftshift(np.fft.fft(range_fft, axis=0), axes=0)
plt.figure()
plt.imshow(np.abs(range_fft[:, :128]))
plt.figure()
plt.imshow(np.abs(doppler_fft[:, :128])
Range FFT for RX0 (x-axis is range)
Range/Doppler FFT

