move channel mapping to seperate file
This commit is contained in:
94
channels.py
Normal file
94
channels.py
Normal file
@@ -0,0 +1,94 @@
|
|||||||
|
map = [
|
||||||
|
(1,9),
|
||||||
|
(1,1),
|
||||||
|
(3,8),
|
||||||
|
(1,4),
|
||||||
|
(3,6),
|
||||||
|
(2,4),
|
||||||
|
(1,7),
|
||||||
|
(3,10),
|
||||||
|
(1,8),
|
||||||
|
(2,10),
|
||||||
|
(2,8),
|
||||||
|
(3,4),
|
||||||
|
(2,7),
|
||||||
|
(1,5),
|
||||||
|
(3,7),
|
||||||
|
(2,1),
|
||||||
|
(2,6),
|
||||||
|
(3,3),
|
||||||
|
(1,6),
|
||||||
|
(2,3),
|
||||||
|
(2,9),
|
||||||
|
(1,3),
|
||||||
|
(3,9),
|
||||||
|
(3,2),
|
||||||
|
(3,5),
|
||||||
|
(2,2),
|
||||||
|
(2,5),
|
||||||
|
(1,2),
|
||||||
|
(1,10),
|
||||||
|
(3,1),
|
||||||
|
|
||||||
|
(4,7),
|
||||||
|
(5,8),
|
||||||
|
(4,6),
|
||||||
|
(6,2),
|
||||||
|
(5,5),
|
||||||
|
(6,3),
|
||||||
|
(4,1),
|
||||||
|
(5,7),
|
||||||
|
(4,4),
|
||||||
|
(5,6),
|
||||||
|
(4,5),
|
||||||
|
(6,4),
|
||||||
|
(4,2),
|
||||||
|
(6,5),
|
||||||
|
(4,3),
|
||||||
|
(5,9),
|
||||||
|
(5,4),
|
||||||
|
(6,1),
|
||||||
|
(5,3),
|
||||||
|
(6,6),
|
||||||
|
(4,8),
|
||||||
|
(6,7),
|
||||||
|
(4,9),
|
||||||
|
(6,8),
|
||||||
|
(5,2),
|
||||||
|
(6,9),
|
||||||
|
(5,1),
|
||||||
|
(6,10),
|
||||||
|
(4,10),
|
||||||
|
(5,10),
|
||||||
|
|
||||||
|
(7,2),
|
||||||
|
(7,10),
|
||||||
|
(9,3),
|
||||||
|
(7,7),
|
||||||
|
(9,5),
|
||||||
|
(8,7),
|
||||||
|
(7,4),
|
||||||
|
(9,1),
|
||||||
|
(7,3),
|
||||||
|
(8,1),
|
||||||
|
(8,3),
|
||||||
|
(9,7),
|
||||||
|
(8,4),
|
||||||
|
(7,6),
|
||||||
|
(9,4),
|
||||||
|
(8,10),
|
||||||
|
(8,5),
|
||||||
|
(9,8),
|
||||||
|
(7,5),
|
||||||
|
(8,8),
|
||||||
|
(8,2),
|
||||||
|
(7,8),
|
||||||
|
(9,2),
|
||||||
|
(9,9),
|
||||||
|
(9,6),
|
||||||
|
(8,9),
|
||||||
|
(8,6),
|
||||||
|
(7,9),
|
||||||
|
(7,1),
|
||||||
|
(9,10)
|
||||||
|
]
|
||||||
99
kisli.py
99
kisli.py
@@ -28,6 +28,8 @@ import time
|
|||||||
import numpy as np
|
import numpy as np
|
||||||
from matplotlib import pyplot
|
from matplotlib import pyplot
|
||||||
|
|
||||||
|
import channels
|
||||||
|
|
||||||
echoCmd = 0
|
echoCmd = 0
|
||||||
|
|
||||||
def instrConnect(mySocket, myAddress, myPort, timeOut, doReset, doIdQuery):
|
def instrConnect(mySocket, myAddress, myPort, timeOut, doReset, doIdQuery):
|
||||||
@@ -95,105 +97,10 @@ def diff_4W_mess(s, ch1, ch2):
|
|||||||
return float(instrQuery(s, "print(dmm.measure())", 64))
|
return float(instrQuery(s, "print(dmm.measure())", 64))
|
||||||
|
|
||||||
def get_mapped(arr):
|
def get_mapped(arr):
|
||||||
map = [
|
|
||||||
(1,9),
|
|
||||||
(1,1),
|
|
||||||
(3,8),
|
|
||||||
(1,4),
|
|
||||||
(3,6),
|
|
||||||
(2,4),
|
|
||||||
(1,7),
|
|
||||||
(3,10),
|
|
||||||
(1,8),
|
|
||||||
(2,10),
|
|
||||||
(2,8),
|
|
||||||
(3,4),
|
|
||||||
(2,7),
|
|
||||||
(1,5),
|
|
||||||
(3,7),
|
|
||||||
(2,1),
|
|
||||||
(2,6),
|
|
||||||
(3,3),
|
|
||||||
(1,6),
|
|
||||||
(2,3),
|
|
||||||
(2,9),
|
|
||||||
(1,3),
|
|
||||||
(3,9),
|
|
||||||
(3,2),
|
|
||||||
(3,5),
|
|
||||||
(2,2),
|
|
||||||
(2,5),
|
|
||||||
(1,2),
|
|
||||||
(1,10),
|
|
||||||
(3,1),
|
|
||||||
|
|
||||||
(4,7),
|
|
||||||
(5,8),
|
|
||||||
(4,6),
|
|
||||||
(6,2),
|
|
||||||
(5,5),
|
|
||||||
(6,3),
|
|
||||||
(4,1),
|
|
||||||
(5,7),
|
|
||||||
(4,4),
|
|
||||||
(5,6),
|
|
||||||
(4,5),
|
|
||||||
(6,4),
|
|
||||||
(4,2),
|
|
||||||
(6,5),
|
|
||||||
(4,3),
|
|
||||||
(5,9),
|
|
||||||
(5,4),
|
|
||||||
(6,1),
|
|
||||||
(5,3),
|
|
||||||
(6,6),
|
|
||||||
(4,8),
|
|
||||||
(6,7),
|
|
||||||
(4,9),
|
|
||||||
(6,8),
|
|
||||||
(5,2),
|
|
||||||
(6,9),
|
|
||||||
(5,1),
|
|
||||||
(6,10),
|
|
||||||
(4,10),
|
|
||||||
(5,10),
|
|
||||||
|
|
||||||
(7,2),
|
|
||||||
(7,10),
|
|
||||||
(9,3),
|
|
||||||
(7,7),
|
|
||||||
(9,5),
|
|
||||||
(8,7),
|
|
||||||
(7,4),
|
|
||||||
(9,1),
|
|
||||||
(7,3),
|
|
||||||
(8,1),
|
|
||||||
(8,3),
|
|
||||||
(9,7),
|
|
||||||
(8,4),
|
|
||||||
(7,6),
|
|
||||||
(9,4),
|
|
||||||
(8,10),
|
|
||||||
(8,5),
|
|
||||||
(9,8),
|
|
||||||
(7,5),
|
|
||||||
(8,8),
|
|
||||||
(8,2),
|
|
||||||
(7,8),
|
|
||||||
(9,2),
|
|
||||||
(9,9),
|
|
||||||
(9,6),
|
|
||||||
(8,9),
|
|
||||||
(8,6),
|
|
||||||
(7,9),
|
|
||||||
(7,1),
|
|
||||||
(9,10)
|
|
||||||
]
|
|
||||||
|
|
||||||
out = np.zeros(shape=(9, 10))
|
out = np.zeros(shape=(9, 10))
|
||||||
|
|
||||||
for i in range(0,90):
|
for i in range(0,90):
|
||||||
x, y = map[i]
|
x, y = channels.map[i]
|
||||||
out[x-1][y-1] = arr[i]
|
out[x-1][y-1] = arr[i]
|
||||||
|
|
||||||
return out
|
return out
|
||||||
|
|||||||
Reference in New Issue
Block a user