Why does my CIR data show this?

image
and here is my code to get CIR data:
int i;
for(i=0;i<FRAME_LEN_MAX;i++){
rx_buffer[i]=0;
}
for(i=0;i<ACCUM_DATA_LEN;i++){
accum_data[i]=0;
}
rx_diag.firstPath=0;
rx_diag.firstPathAmp1=0;
rx_diag.firstPathAmp2=0;
rx_diag.firstPathAmp3=0;
rx_diag.maxGrowthCIR=0;
rx_diag.maxNoise=0;
fp_int=0;
dwt_setrxtimeout(0);
dwt_rxenable(0);
while (!((status_reg = dwt_read32bitreg(SYS_STATUS_ID)) & (SYS_STATUS_RXFCG | SYS_STATUS_ALL_RX_ERR)))
{ UART_CheckReceive();};
if (status_reg & SYS_STATUS_RXFCG)
{
uint32 frame_len;
// GPIO_ResetBits(GPIOA, GPIO_Pin_2);
/* Clear good RX frame event in the DW1000 status register. /
dwt_write32bitreg(SYS_STATUS_ID, SYS_STATUS_RXFCG);
/
A frame has been received, read it into the local buffer. /
frame_len = dwt_read32bitreg(RX_FINFO_ID) & RX_FINFO_RXFL_MASK_1023;
dwt_readrxdata(rx_buffer, frame_len, 0);
/
Check that the frame is a poll sent by “DS TWR initiator” example.
* As the sequence number field of the frame is not relevant, it is cleared to simplify the validation of the frame. */
rx_buffer[ALL_MSG_SN_IDX] = 0;
dwt_readdiagnostics(&rx_diag);
fp_int=rx_diag.firstPath/64;
dwt_readaccdata(accum_data,ACCUM_DATA_LEN,(fp_int - 5) 4 );
for(i=0;i<ACCUM_DATA_LEN;i++){
send[i+1]=accum_data[i];
}
USART_puts((uint8_t
)send,(1+ACCUM_DATA_LEN)*2);
Delayms(1000);

then I plot the CIR data in python through serial port
if data_bytes[0] == 0xd6 and data_bytes[1] == 0x6d:
i = 3
j = 0
while i < handledataLen/2:
realpart = struct.unpack(‘h’,data_bytes[i:i+2])[0]
cirnumber_realpart[j] = realpart
imagpart = struct.unpack(‘h’,data_bytes[i+2:i+4])[0]
cirnumber_imagpart[j] = imagpart
a = complex(realpart, imagpart)
#print(realpart,imagpart)
cirnumber[j]=max(abs(realpart), abs(imagpart)) + 1 / 4 * min(abs(realpart), abs(imagpart))
i = i + 4
j = j + 1
cirnumber_total.append(cirnumber)
plt.plot(cirnumber)
plt.show()

I ran into a bottleneck in the CIR data area, please help me. Thank you very much!