In [39]:
from pylab import *
import numpy as np
import matplotlib.mlab as mlab
import matplotlib.pyplot as plt
import seaborn as sns
from scipy.special import erf
from math import sqrt, pi,exp

sns.set_style('whitegrid')

In [20]:
x,y,z1 = genfromtxt('maxU.dat').T
x,y,z2 = genfromtxt('minU.dat').T

In [25]:
n1, bins1, patches1 = plt.hist(z1, 25, normed=1, facecolor='green', alpha=0.75)
n2, bins2, patches2 = plt.hist(z2, 25, normed=1, facecolor='red', alpha=0.75)

#l = plt.plot(bins, y, 'r--', linewidth=1)

#plt.axis([40, 160, 0, 0.03])
plt.grid(True)

plt.show()



In [29]:
x,y,z3 = genfromtxt('maxP.dat').T
x,y,z4 = genfromtxt('minP.dat').T

In [33]:
n1, bins1, patches1 = plt.hist(z3, 25, normed=1, facecolor='green', alpha=0.75)
n2, bins2, patches2 = plt.hist(z4, 10, normed=1, facecolor='red', alpha=0.75)

#l = plt.plot(bins, y, 'r--', linewidth=1)

#plt.axis([40, 160, 0, 0.03])
plt.grid(True)

plt.show()



In [57]:
X = np.linspace(0, 900, 100)
X_ = (X/(sqrt(2*(1-2*gamma**2/3.0))))
F = np.vectorize(erf)

In [45]:
teta = 0.1332
gamma = 0.7678

In [63]:
Y = (1/(4*pi*sqrt(3)*teta**2))*sqrt(6/pi)*gamma**2*X*np.exp(-X*X/2) + F(X_)

In [68]:
Y


Out[68]:
array([ 0.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,
        1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,
        1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,
        1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,
        1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,
        1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,
        1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,
        1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.])

In [ ]: