-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
questions on frequency / phase calibration and DC bias cut #5
Comments
Hi @eshibusawa !
Have you tried to fix it and check the result already?! -- Edit -- |
Thank you for your reply!
assert_eps = 1E-7
cl = Coloradar()
rr = cl.getRecord('outdoor0', 0)
rr.load('scradar')
## rr.scradar.showPointcloudFromRaw()
# check single chip raw adc
adc_samples_sc = rr.scradar.raw
dc_sc = np.mean(adc_samples_sc)
dc3_sc = np.mean(adc_samples_sc, axis=3)
print(adc_samples_sc.shape)
print(dc_sc.shape)
print(dc3_sc.shape)
adc_dccut_sc = adc_samples_sc - dc_sc # scalar is broadcasted to ALL dimension
adc_dccut3_sc = adc_samples_sc - dc3_sc[:,:,:,np.newaxis] # newaxis is added for broadcasting range-dimension
print(np.max(np.abs(adc_dccut_sc - adc_dccut3_sc)) < assert_eps) # both results are not equal
rr.load('ccradar')
## rr.ccradar.showPointcloudFromRaw() # not officialy supported?
# check cascade raw adc
adc_samples_cc = rr.ccradar.raw
dc_cc = np.mean(adc_samples_cc)
dc3_cc = np.mean(adc_samples_cc, axis=3)
print(adc_samples_cc.shape)
print(dc_cc.shape)
print(dc3_cc.shape)
adc_dccut_cc = adc_samples_cc - dc_cc # scalar is broadcasted to ALL dimension
adc_dccut3_cc = adc_samples_cc - dc3_cc[:,:,:,np.newaxis] # newaxis is added for broadcasting range-dimension
print(np.max(np.abs(adc_dccut_cc - adc_dccut3_cc)) < assert_eps) # both results are not equal |
Hi,
Thank you for publishing very interesting repository. I have some questions about ADC data processing.
the reference channel in frequency / phase calibration
The coloradar ADC data has same layout to mmawve-repack and its shape [tx][rx][doppler][range]. The API uses index 0 in frequency and phase calibration matrix computation, so I think the reference channel is not master device but third slave device. I think both calibrations are channel to channel calibration and any channel can be selected for the reference. Is my understanding is correct?
DC bias removing
The API uses numpy's mean for removing DC component, however, this operation averages all element of the passed array. Following to the numpy reference, I think axis=3 argument is required for computing DC component in range-dimension.
https://numpy.org/doc/stable/reference/generated/numpy.mean.html
The text was updated successfully, but these errors were encountered: