Actions
Data format » History » Revision 2
« Previous |
Revision 2/21
(diff)
| Next »
Anonymous, 03/05/2020 03:23 PM
Data format¶
def readFileADLINKCh0( filename, samplesPerFile, timeSerie_A ):
fd = open(filename,'rb')
dum = np.fromfile(fd, dtype = np.uint16)
timeSerie_A[:] = dum[:]
fd.close()
lastBuffer = (nbFiles-1) * buffersPerFile + firstBuffer
for k in range( nbFiles ):
# read the data
nb = str( int( k * buffersPerFile + firstBuffer) )
filename = data_dir + "/record" + nb + ".bin"
readFileADLINKCh0( filename, samplesPerFile, timeSerie_A )
print("k = {}, block = {} / {}".format(k, nb, lastBuffer))
adc_A[ k, : ] = (timeSerie_A + offset) * scalingFactor
Les données étant lues, on remet en forme le vecteur pour ne garder que le signal correspondant aux rampes montantes:
A_reshaped = adc_A.reshape(nbFiles * rampsPerFile, samplesPerRamp)
Updated by Anonymous almost 5 years ago · 2 revisions