trimbit diagonal pattern to test.

This commit is contained in:
lhdamiani
2021-07-06 15:41:31 +02:00
parent 8c2cabebd2
commit 7dd0656f7d
2 changed files with 26 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
import matplotlib.pyplot as plt
import numpy as np
plt.ion()
# These are more or less standard dacs, if you see strange effects
# you might need to tune them
dacs = np.array([ 0, 2480, 2900, 1400, 4000, 2556, 898, 848, 0, 855, 1100,
1100, 982, 895, 2000, 1550, 570, 0], dtype=np.int32)
tb = np.zeros((256,1024), dtype = np.int32)
# Create the desired pattern
for row in range(0,256,64):
for col in range(0,1024,64):
print(f'{row}, {col}')
tb[row:row+32, col:col+32] = 63
fig, ax = plt.subplots()
im = ax.imshow(tb)
with open('trimbits.sn000', 'wb') as f:
dacs.tofile(f)
tb.tofile(f)
Binary file not shown.