<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 This cell demonstrates that dRdQ_AM has the same value as dRdQ at day 0 and day 365, when the v_lag is = 220.
Step1:  This cell demonstates the rate_UV.dRdQ can recieve multiple Qs and return them as an array.
The following cell shows the same thing, but for dRdQ_AM.
Step2:  This cell is showing the relative progression of rate over various times for fixed parameters.
Step3:  Demonstration of integral function
Step4:  Testing integral function for a known integral with an exact value of 1/6 .
Step5:  Model and experiment to be used in simulations
Step6:  Attempting to run Simulation_AM
<ASSISTANT_TASK:>
Python Code:
print dmdd.dRdQ_AM(Q = [100.], sigma_si = 75.5)
print dmdd.rate_UV.dRdQ(Q = np.asarray([100.]), sigma_si = 75.5)
print dmdd.dRdQ_AM(Q = [100.], sigma_si = 75.5, time = 365)
Explanation: This cell demonstrates that dRdQ_AM has the same value as dRdQ at day 0 and day 365, when the v_lag is = 220.
End of explanation
dmdd.rate_UV.dRdQ(Q = np.array([50., 60., 70., 80., 90., 100.]), sigma_si = 75.5)
# demonstrats that rate_UV.dRdQ can take multiple Q's
dmdd.dRdQ_AM(Q = [10., 30., 50., 100.], sigma_si = 75.5, time = 0)
# demonstrates that dRdQ_AM can take multiple Q's as a list
Explanation: This cell demonstates the rate_UV.dRdQ can recieve multiple Qs and return them as an array.
The following cell shows the same thing, but for dRdQ_AM.
End of explanation
print dmdd.dRdQ_AM(sigma_si = 75.5, time = 50)
print dmdd.dRdQ_AM(sigma_si = 75.5, time = 100)
print dmdd.dRdQ_AM(sigma_si = 75.5, time = 150)
print dmdd.dRdQ_AM(sigma_si = 75.5, time = 200)
print dmdd.dRdQ_AM(sigma_si = 75.5, time = 250)
print dmdd.dRdQ_AM(sigma_si = 75.5, time = 300)
print dmdd.dRdQ_AM(sigma_si = 75.5, time = 350)
Explanation: This cell is showing the relative progression of rate over various times for fixed parameters.
End of explanation
dmdd.integral(1., 100., 0., 365., sigma_si = 75.5)
Explanation: Demonstration of integral function
End of explanation
def funct1(Q,time, sigma_si, sigma_anapole, mass, element, v_amplitude):
    return (Q**2)*(time)
#have to define like this due to the way integral is defined, but still returns correct answer
dmdd.integral(0, 1, 0, 1, function = funct1)
Explanation: Testing integral function for a known integral with an exact value of 1/6 .
End of explanation
# 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)
# intialize an Experiment with XENON target, to be passed to Simulation_AM:
xe = dmdd.Experiment('1xe', 'xenon', 5, 150, 1000, dmdd.eff.efficiency_unit, energy_resolution=True)
Explanation: Model and experiment to be used in simulations
End of explanation
xe = dmdd.Simulation_AM('AM_xenon', xe, SI_model, 
                        {'mass':50.,'sigma_si':75.5}, Qmin = np.asarray([5.]), 
                        Qmax = np.asarray([150.]), 
                        Tmin = 0, Tmax = 365, sigma_si = 75.5, 
                        element = 'xenon', force_sim = True)
xe = dmdd.Simulation_AM('AM_xenon', xe, anapole_model, 
                        {'mass':50.,'sigma_anapole':44.25}, Qmin = np.asarray([5.]), 
                        Qmax = np.asarray([150.]), 
                        Tmin = 0, Tmax = 365, sigma_anapole = 44.25, 
                        element = 'xenon', force_sim = True)
Explanation: Attempting to run Simulation_AM
End of explanation
<END_TASK>