##// END OF EJS Templates
The HK packet contains v, e1 and e2 valid data at f3....
The HK packet contains v, e1 and e2 valid data at f3. The ACTN task mode is set to NO_PREEMPT In BURST, f3 flow is enabled to allow the v, e1 and e2 data pick-up for HK

File last commit:

r126:5ae10b1b8078 VHDLib206
r129:85c441b3b744 VHDLib206
Show More
readmatrix.py
34 lines | 1.1 KiB | text/x-python | PythonLexer
with open('asm_f0_test_paul_1.txt', 'r') as f:
listOfLines = []
for line in f.readlines():
listOfLines.append(line)
data = listOfLines[10] # line 9 contains the data
data = data.split() # get the data from the global string
dataInFloat = []
nbData = len(data)
print "nbData = " + str(nbData)
for i in range( nbData ):
dataInFloat.append( float( data[i] ) ) # convert each string into a float
# reorganize the data to have a matrix in the VHDL format
# input format (ICD format)
# matrix_0[0 .. 24] matrix_1[0 .. 24] .. matrix_127[0 .. 127]
# output format (VHDL format)
# component_0[0 .. 127] component_1[0 .. 127] .. component_24[0 .. 127]
dataInFloatReorganized = []
dataInIntReorganized = []
nbComponentsByMatrix = 25
nbFrequencyBins = 128
for indexComponent in range(nbComponentsByMatrix):
for frequencyBin in range(nbFrequencyBins):
dataInFloatReorganized.append(
dataInFloat[ indexComponent + frequencyBin * nbComponentsByMatrix ]
)
dataInIntReorganized.append(
int( dataInFloat[ indexComponent + frequencyBin * nbComponentsByMatrix ] )
)
print dataInIntReorganized