I have a question which is backwards of what most people seem to want. I'm working with numpy arrays, and I have to deal with a hardware bug in our data acquisition system. My data comes in as pairs of uint16s, which need to be split into 2 arrays. Right now, this is what I'm doing:
ql = open('/dev/quicklogic', 'rb')
self.rawData = numpy.fromfile(ql, numpy.uint16, 50000) # grab 50k integers
self.rawFlour = self.rawData[0::2] # deinterlace the array
self.rawScatter = self.rawData[1::2]
So, that works well to split up the array into the two data streams, however the device is sending over a pair of 0's every 17th read.
What's the most efficient way to construct a pair of arrays using everything except every 17th read? (Note, I could also just apply this to the rawData array instead of the two split arrays)