In [1]:
import dmdd
import numpy as np


WARNING:root:pymultinest not imported!
WARNING:root:DMDD_MAIN_PATH environment variable not defined, defaulting to:   ~/.dmdd

In [2]:
# shortcut for scattering models corresponding to rates coded in rate_UV:
anapole_model = dmdd.UV_Model('Anapole', ['mass','sigma_anapole'])
SI_model = dmdd.UV_Model('SI', ['mass','sigma_si'])

print 'model: {}, parameters: {}.'.format(anapole_model.name, anapole_model.param_names)
print 'model: {}, parameters: {}.'.format(SI_model.name, SI_model.param_names)


model: Anapole, parameters: ['mass', 'sigma_anapole'].
model: SI, parameters: ['mass', 'sigma_si'].

In [3]:
# intialize an Experiment with XENON target, to be passed to Simulation_AM:
xe = dmdd.Experiment('1xe', 'xenon', 5, 80, 1000, dmdd.eff.efficiency_unit, energy_resolution=True)

In [4]:
xe_ana_test = dmdd.Simulation_AM('Anapole', xe, anapole_model, 
                        {'mass':50.,'sigma_anapole':44.25}, Qmin = np.asarray([5.]), 
                        Qmax = np.asarray([80.]), 
                        Tmin = 0, Tmax = 365, sigma_anapole = 44.25, 
                        element = 'xenon', force_sim = True)


Simulation data and/or pickle file does not exist. Forcing simulation.


[ 3.57633769] 243.972474054
[ 0.13730284] 142.529071895
[ 1.61817126] 31.4785785118
[ 7.67991422] 249.264481887
[ 20.64832812] 43.8431695553
[ 18.89741965] 217.013723052
[ 17.14495471] 212.550436019
[ 0.20921509] 11.6669784235
[ 24.63932775] 139.299731251
[ 8.55676827] 90.1886965323
[ 2.4625456] 159.434277161
[ 0.34352606] 109.352095394
[ 55.30863931] 176.427195571
[ 15.34430534] 200.289295332
[ 132.05060909] 34.3918272232
1
[ 95.85031021] 117.689498641
[ 0.10231843] 59.1413294835
[ 16.97310936] 29.9203523676
[ 0.08108782] 69.9506552194
[ 132.6685115] 73.5706154195
2
[ 0.09735839] 202.066422105
[ 0.2746477] 96.4716190672
[ 0.1573197] 212.408923733
[ 131.91884131] 249.192520993
---------------------------------------------------------------------------
KeyboardInterrupt                         Traceback (most recent call last)
<ipython-input-4-70ff853dfa5a> in <module>()
      3                         Qmax = np.asarray([80.]),
      4                         Tmin = 0, Tmax = 365, sigma_anapole = 44.25,
----> 5                         element = 'xenon', force_sim = True)

/Users/katelynneese/dmddACT/dmdd/dmdd.py in __init__(self, name, experiment, model, parvals, Qmin, Qmax, element, sigma_si, sigma_anapole, mass, v_amplitude, Tmin, Tmax, path, force_sim, asimov, nbins_asimov, plot_nbins, plot_theory, silent)
   1068                 raise ValueError('Asimov simulations not yet implemented!')
   1069             else:
-> 1070                 Q = self.simulate_data()
   1071                 np.savetxt(self.datafile,Q)
   1072                 fout = open(self.picklefile,'wb')

/Users/katelynneese/dmddACT/dmdd/dmdd.py in simulate_data(self)
   1134                 pdf_value = PDF(Q_rand, T_rand, element = self.element, mass = self.mass,
   1135                                         sigma_si= self.sigma_si, sigma_anapole = self.sigma_anapole,
-> 1136                                         Qmin = np.asarray([self.Qmin]), Qmax = np.asarray([self.Qmax]), Tmin = self.Tmin, Tmax = self.Tmax)
   1137                 print pdf_value, U
   1138                 #envelope is 1 so don't need to divide by anything

/Users/katelynneese/dmddACT/dmdd/dmdd.py in PDF(Q, time, element, mass, sigma_si, sigma_anapole, Qmin, Qmax, Tmin, Tmax)
    117                     Tmin = Tmin, Tmax = Tmax,
    118                     element = element, sigma_si = sigma_si,
--> 119                     sigma_anapole = sigma_anapole, mass = mass)
    120 
    121     return drdq/norm[0] #for now removed efficiency and made it 1

/Users/katelynneese/dmddACT/dmdd/dmdd.py in integral(Qmin, Qmax, Tmin, Tmax, Qpoints, Tpoints, function, sigma_si, sigma_anapole, mass, element, v_amplitude)
    102         for j,T in enumerate(T_box):
    103             a_sum = np.sum(function(Q = np.asarray(Q), time = T, sigma_si = sigma_si, sigma_anapole = sigma_anapole,
--> 104                                     mass = mass, element = element, v_amplitude = v_amplitude))
    105             total_sum.append(a_sum)
    106 

/Users/katelynneese/dmddACT/dmdd/dmdd.py in dRdQ_AM(mass, sigma_si, sigma_anapole, Q, time, element, vlag_mean, v_amplitude)
     81     #print type(v_lag) #vlag must be a number not an array
     82 
---> 83     rate_QT = rate_UV.dRdQ(Q = energy, v_lag = v_lag, mass = mass, sigma_si = sigma_si, sigma_anapole = sigma_anapole, element = element)
     84 
     85     "Return a 1D array with the rate based on the time and energy given"

KeyboardInterrupt: 

In [ ]:


In [ ]: