In [145]:
%matplotlib
import numpy as np
import dmdd
In [137]:
dmdd.Nexpected?
In [146]:
def plotfunction(element, Qmin, Qmax, binsize, exposure): #efficiency= fsdfsdfsdfsd binsize is number you want to count by
#auto pass efficiency function
binnumber = (Qmax - Qmin)/binsize
binlist = np.arange(Qmin, Qmax+binsize, binsize) #includes the last point
print binlist
print binnumber
for
"""# example data
mu = 100 # mean of distribution
sigma = 15 # standard deviation of distribution
x = mu + sigma * np.random.randn(10000)
num_bins = binnumber
# the histogram of the data
n, bins, patches = plt.hist(x, num_bins, normed=1, facecolor='green', alpha=0.5)
# add a 'best fit' line
y = mlab.normpdf(bins, mu, sigma)
plt.plot(bins, y, 'r--')
plt.xlabel('Energy of Events')
plt.ylabel('Number of Expected Events')
plt.title(r'Histogram of Dark Matter Energies')
# Tweak spacing to prevent clipping of ylabel
plt.subplots_adjust(left=0.15)
plt.show()"""
#dmdd.Nexpected(element, Qmin, Qmax, exposure,) #efficiency
In [148]:
plotfunction(1, 5, 50, 5, 1)
plt.show()
In [ ]: