uncommitted work

master
Eggert Jung 3 years ago
parent 0c6d3629e1
commit 5510e4086b

@ -189,10 +189,27 @@ if args.fromfile:
i+=1
print()
mapped_vectormap = get_vector_mapped(vectormap)
mapped_vectormap /= max(mapped_vectormap.min(), mapped_vectormap.max(), key=abs)
print(mapped_vectormap)
viewer = liveview.VectorView(mapped_vectormap)
if args.view == "N":
neigh = np.zeros(shape=(9, 10, 2))
i = 0
for row in full_matrix:
point_specific_matrix=get_mapped(row)
if(channels.map[i][0]+1 <= 10):
neigh[channels.map[i][0]][channels.map[i][1]][0] = point_specific_matrix[channels.map[i][0]+1][channels.map[i][1]]
if(channels.map[i][1]+1 <= 9):
neigh[channels.map[i][0]][channels.map[i][1]][1] = point_specific_matrix[channels.map[i][0]][channels.map[i][1]+1]
i+=1
neighview = np.zeros(shape=(18,20))
for x in range(9):
for y in range(10):
neighview[(x*2)+1][y*2] = neigh[x][y][0]
neighview[x*2][(y*2)+1] = neigh[x][y][1]
viewer = liveview.ResistanceView(maximum=4000)
viewer.updateView(neighview)
else:
s = socket.socket() # Establish a TCP/IP socket object
@ -225,6 +242,7 @@ if args.view == "M":
viewer = liveview.ResistanceView(maximum=full_matrix.max())
viewer.updateView(get_mapped(np.mean(full_matrix, axis = 0)))
if args.tofile:
np.savetxt(args.tofile, full_matrix, delimiter="\t")

Loading…
Cancel
Save