csiR = [] csiI = [] payload = ''.join(map(str,map(int,buffer[160:]))) payload = map(lambda x:int(x,base=2),[payload[i:i+8] for i in range(0, len(payload), 8)])
for i in xrange(30): index += 3 remainder = index % 8 for j in xrange(Nrx*Ntx): t = int(bin(payload[index / 8] >> remainder), 2) | int(bin(payload[index / 8 + 1] << (8 - remainder))[2:].zfill(8)[-8:], 2) tmp = t - 256if t > 127else t csiR.append(tmp) t = (payload[index / 8 + 1] >> remainder) | int(bin(payload[index / 8 + 2] << (8 - remainder))[2:].zfill(8)[-8:], 2) tmp = t - 256if t > 127else t csiI.append(tmp) index += 16