In [1]:
#pylab mode
#remove the option inline to open plot windows using the selected gui backend. Induvidual graphs can stille be embedded using display(youfigure)
%pylab inline
#some imports for convenience
from __future__ import division
from lmfit import lmfit
from angular_distr import *
#some typesetting preferences
matplotlib.rcParams.update({'font.size': 14, 'font.family': 'serif'})
In [2]:
intensities = [1.8181650771537534e-12, -1.21367978055561e-10, -2.4496892707856074e-10, -4.6333798025784959e-10, -6.6702598957224955e-10,\
-9.6617893690204617e-10, -1.2287767430760598e-09, -1.5218150811163994e-09, -1.2379226258147593e-09, -9.1848674608014203e-10,\
-5.2666183628298662e-10, -2.8991781264242726e-10, -2.1511541145914503e-10, -2.1435088276325482e-10, -1.7135883298721443e-10,\
-1.2938154635344409e-10, -1.0793197039570779e-10]
intensities = intensities
pos = arange(1,9,0.5)
print intensities, pos
In [3]:
from tof_analysis import SurfacePosMeas
surfpos = arange(30,33,0.2)
power = [0.3, 0.3, 0.285, 0.275, 0.255, 0.24, 0.23, 0.2, .179, .155, .129, .107, .082, .066, .047]
SPM1 = SurfacePosMeas(surfpos, power, IRPos=7)
In [4]:
intensities = [-1.8181650771586907e-12, 1.2136797805557116e-10, 3.1400260112554549e-10, 4.6333798025784809e-10, 6.6702598957224872e-10, 9.6617893690203231e-10,
1.2287767430760787e-09, 1.5218150811163204e-09, 1.2379226258147202e-09, 9.1848674608014328e-10, 5.2666183628299624e-10,
2.8991781264240627e-10, 2.1511541145913797e-10, 2.1435088276325966e-10, 1.7135883298721531e-10, 1.2938154635346852e-10, 1.079319703957058e-10]
pos = arange(1,9.5,0.5)
surfpos = arange(30,33,0.2)
power = [0.3, 0.3, 0.285, 0.275, 0.255, 0.24, 0.23, 0.2, .179, .155, .129, .107, .082, .066, .047]
SPM1 = SurfacePosMeas(surfpos, power, IRPos=7)
Setups = [REMPISetup(SPM1, {'REMPI': 0, 'Center ZRM': 5.1, 'ZRM': zrm, 'Surface Y': 35}) for zrm in pos]
AngDistr = AngularDistribution(Setups, intensities, exclude=[7])
In [5]:
plot(AngDistr.Angles, AngDistr.Integrals, 'bo')
show()
In [6]:
AngDistr.fit(exclude=[7], verbose=False, plot=True)
AngDistr.plot()
In [7]:
AngDistr.fig.savefig('AngDistr.pdf')
In [8]:
rm -f 'AngDistr.pdf'
In [9]:
filenum = range(14,31,1)
#IntegrateScopeTrace('testdata/2305', filenum) # uncomment to start the scope trace integrator gui
In [9]: