pda_output_skew.py 2.14 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
"""
    measurement data for
    Pulse distribution amplifier, https://ohwr.org/project/pda-8ch-fda-8ch
    
"""

import numpy
import matplotlib.pyplot as plt


sn12_b = [14526, 14542, 14313, 14263, 14313, 14321, 14420, 14422]
sn13_b = [14399, 14278, 14153, 14081, 14113, 14185, 14241, 14278]
sn16_b = [13505, 13491, 13302, 13198, 13284, 13322, 13453, 13374]
sn15_b = [13310, 13230, 13101, 13036, 13057, 13070, 13236, 13210]
sn14_b = [13347, 13274, 13108, 13029, 13094, 13119, 13219, 13210]
sn17_b = [17172, 17109, 16922, 16876, 16943, 16928, 17047, 17036 ]
sn22_b = [12833, 12780, 12585, 12558, 12606, 12593, 12730, 12681]
sn23_b = [337, 465, 331, 234, 367, 243, 406, 262]
sn24_b = [16322, 16180, 16051, 16028, 16228, 16017, 16153, 16038]
sn27l_b = [724, 577, 403, 395, 471, 444, 534, 533 ]
sn27_b = [677, 723, 576, 524, 630, 514, 712, 666]
sn28_b = [18505, 18743, 18664, 18557, 18459, 18739, 18545, 18847 ]
sn30_b = [635, 620, 519, 395, 652, 446, 668, 807]
sn33_b = [ 19008, 19091, 18869, 18723, 19125, 18865, 19124, 18859 ]
sn36 = [ 16699, 16570, 16481, 16464, 16705, 16489, 16724, 16638 ]
sn37 = [ 618, 427, 627, 485, 656, 635, 625, 592 ]

before = []
before.append( sn37 )
before.append( sn36 )
before.append( sn33_b )
before.append( sn30_b )
before.append( sn28_b )
before.append( sn27_b )
before.append( sn27l_b )
before.append( sn24_b )
before.append( sn23_b )
before.append( sn22_b )
before.append( sn17_b )
before.append( sn14_b )
before.append( sn15_b )
before.append( sn16_b )
before.append( sn13_b )
before.append( sn12_b )

plt.figure()
d = [ [], [], [], [], [], [], [], []]
for b in before:
    b = numpy.array(b)
    plt.plot( b-numpy.average(b) , 'o')
    for idx, dd in enumerate(b-numpy.average(b)):
        d[idx].append(dd)
print d
mu=[]
s=[]
for dd in d:
    mu.append( numpy.mean(dd) )
    s.append( numpy.std(dd) )
plt.errorbar( range(8), mu, yerr=s)

i=0
for (m,std) in zip(mu, s):
    plt.text(i-0.25, 0-i*20, "%d +/- %d" %(m, std))
    i=i+1
    
print(mu)
print(s)
plt.title('Pulse distribution amplifier, output-to-output skew\n AW2021-05-07, https://ohwr.org/project/pda-8ch-fda-8ch')
plt.xlabel('Output #')
plt.ylabel('Output skew / ps')
plt.grid()
plt.show()