Testing DAC - 20180310a
import matplotlib.pyplot as plt
Deb = 100
Fin = 1000
n = 200/5
DAClValues = []
for k in range(n+1):
val = int(Deb+1.0*k*(Fin-Deb)/n)
DAClValues.append(val)
print DAClValues,len(DAClValues)
[100, 122, 145, 167, 190, 212, 235, 257, 280, 302, 325, 347, 370, 392, 415, 437, 460, 482, 505, 527, 550, 572, 595, 617, 640, 662, 685, 707, 730, 752, 775, 797, 820, 842, 865, 887, 910, 932, 955, 977, 1000] 41
DACeValues = []
t = []
for k in range(n+1):
val = (Fin-Deb)*k**3/n**3+Deb
t.append(5*k)
DACeValues.append(val/1000.0)
print DACeValues,len(DACeValues)
[0.1, 0.1, 0.1, 0.1, 0.1, 0.101, 0.103, 0.104, 0.107, 0.11, 0.114, 0.118, 0.124, 0.13, 0.138, 0.147, 0.157, 0.169, 0.182, 0.196, 0.212, 0.23, 0.249, 0.271, 0.294, 0.319, 0.347, 0.376, 0.408, 0.442, 0.479, 0.518, 0.56, 0.605, 0.652, 0.702, 0.756, 0.812, 0.871, 0.934, 1.0] 41
plt.plot(t,DACeValues,"ro")
plt.
plt.show()
for i in range(len(DAClValues)):
if (DAClValues[i] >= 0) and (DAClValues[i] < 1020):
print 16+i,DAClValues[i]
16 100
17 122
18 145
19 167
20 190
21 212
22 235
23 257
24 280
25 302
26 325
27 347
28 370
29 392
30 415
31 437
32 460
33 482
34 505
35 527
36 550
37 572
38 595
39 617
40 640
41 662
42 685
43 707
44 730
45 752
46 775
47 797
48 820
49 842
50 865
51 887
52 910
53 932
54 955
55 977
56 1000