def procchunk(rx, tx, P:dict):
if P['rxfn'] is not None:
rx = scipy.signal.resample_poly(rx,
P['resample'].numerator,
P['resample'].denominator)
fs = P['txfs']
# %% resamples parameters
NrxPRI = int(fs * P['pri']) # Number of RX samples per PRI (resampled)
assert NrxPRI >= tx.size,'PRI must be longer than chirp length!'
NrxChirp = rx.size // NrxPRI # number of complete PRIs received in this data
assert NrxChirp == P['Nchirp']
Rxy = 0.
for i in range(P['Nchirp']):
r = rx[i*NrxPRI:(i+1)*NrxPRI]
Rxy += np.correlate(tx, r,'same')
if P['verbose']:
plotxcor(Rxy, fs)
draw()
pause(0.1)
return Rxy
评论列表
文章目录