wimpydd is hosted by Hepforge, IPPP Durham






Halo Function

WimPyDD provides the routine streamed_halo_function that calculates the \(v_k\), \(\delta\eta_k^{(0,1)}\) quantities needed by the diff_rate and wimp_dd_rate. The simple call:

 >>> vmin,delta_eta0=WD.streamed_halo_function()

samples linearly the \(\delta\eta_k^{(0)}\)'s in units of (km/s)\(^{-1}\) for a Maxwellian velocity distribution with cut at the escape velocity in the Earth's rest frame: \[ f(\vec{v},t)=N\left(\frac{3}{ 2\pi v_{rms}^2}\right )^{3/2} e^{-\frac{3|\vec{v}+\vec{v}_{E,Gal}|^2}{2 v_{rms}^2}}\Theta(v_{esc,Gal}-|\vec{v}+\vec{v}_{E,Gal}(t)|)\] where,
\[ N= \left [ erf(z)-\frac{2}{\sqrt{\pi}}z e^{-z^2}\right ]^{-1}\] with \(v_{esc,Gal}\) the escape velocity in the Galactic rest frame and \(z^2=3 v_{esc,Gal}^2/(2 v_{rms}^2)\). By default hydrothermal equilibrium between the WIMP gas pressure and gravity is assumed, \(v_{rms}\) = \(\sqrt{3/2}|\vec{v}_{rot,Gal}|\) with \(\vec{v}_{rot,Gal}\) the galactic rotational velocity (the value of \(v_{rms}\) can be modified using the argument vrms). Moreover \(\vec{v}_{E,Gal}\) = \(\vec{v}_{rot,Gal}\)+ \(\vec{v}_{Sun,rot}\) + \(\vec{v}_{E,Sun}\), with \(\vec{v}_{Sun,rot}\) the peculiar velocity of the solar system with respect to the Galactic rotational curve and \(\vec{v}_{Sun,rot}\) the velocity of the Earth around the Sun. The routine assumes the default values \(v_{esc,Gal}\) = 550 km/s, \(\vec{v}_{rot,Gal}\) = \((0,220,0)\) km/s, \(\vec{v}_{Sun,rot}\) = \((9,12,7)\) km/s (in the Galactic reference frame where the \(z\) axis is in the direction perpendicular to the galactic plane, the \(x\) axis points toward the galactic center and the velocity of the solar system points in the \(y\) direction). Such values can be changed by using the arguments v_esc_gal, v_rot_gal and v_sun_rot, respectively. For \(\vec{v}_{E,Sun}\) the expression in J. D. Lewin, P.F. Smith is used.

To calculate \(\delta\eta^{(1)}\) the argument yearly_modulation=True must be used, and to get \(\eta^{(0,1)}_k\) instead of \(\delta\eta^{(0,1)}_k\) use delta_eta=False.

The routine can also be used for a user-defined velocity distribution. This requires to pass the argument velocity_distribution_gal. For instance, parameterizing the velocity distribution with non-isotropic velocity dispersions: \[f(\vec{u})=N e^{-\frac{1}{2}\left(\frac{u^2_x}{\sigma^2_x}+\frac{u^2_y}{\sigma^2_y}+\frac{u^2_z}{\sigma^2_z} \right)} \] with:

def func(u,sigma_x,sigma_y,sigma_z):
    return np.exp(-0.5*(u[0]**2/sigma_x**2+
    u[1]**2/sigma_y**2+u[2]**2/sigma_z**2))

the time-averaged \(\delta \eta_k^{(0)}\)'s for \(\sigma_x\)=120 km/s, \(\sigma_y\)=150 km/s and \(\sigma_z\)=170 km/s can be calculated by:

 >>> vmin,delta_eta_0=WD.streamed_halo_function(velocity_distribution_gal=func,
     sigma_x=120, sigma_y=150, sigma_z=170)

The user-define velocity distribution func must be a function of a three--dimensional array u containing the WIMP velocity in the galactic rest frame. The parameters of func are passed with the keyworded variable-length argument list **args (the argument vrms for the Maxwellian distribution is just a particular case of this). All the other parameters of the routine work in the same way as for a Maxwellian.

Both for a Maxwellian and for a user-defined velocity distribution the full expressions: \[ \eta^{(0)}(v)= \frac{1}{T_0}\int_0^{T_0} \eta(v,t),\]
\[\eta^{(1)}(v)= \frac{2}{T_0}\int_0^{T_0} \cos\left[\omega(t-t_0)\right] \eta(v,t),\,\,\,\,\omega=\frac{2\pi}{T_0}, \] (discretized as sums over the days of the year) can be used by setting full_year_sample=True. This can be particularly time consuming when the numerical integration of a user-defined velocity distribution is required for each day of the year. By default full_year_sample=False; in this case \(\eta^{(0)}\) is approximated by setting \(\vec{v}_{E,Sun}\rightarrow\)0, in \(\eta(v)\), while \(\eta^{(1)}\) is approximated by using a linear expansion in the parameter \(|\vec{v}_{E,Sun}|/|\vec{v}_{E,Gal}|\) for the Maxwellian (see for instance appendix A of F. Donato, N. Fornengo, S. Scopel, Astropart. Phys. 9 (1998) 247–260. ), and by calculating \([\eta_0(t=t_0)-\eta_0(t=t_0+T/2)]/2\) for a user-defined velocity distribution. Also \(t_0\) can be changed by using the argument modulation_phase in days. Finally, day_of_the_year allows to calculate the halo function on a specific day of the year.

In the case when velocity_distribution_gal is used and the routine calculates numerical integrals the output is saved in the folder WimPyDD/Halo_functions for later use to speed-up successive evaluations of the same halo function, unless recalculate=True.

Summary of streamed_halo_function routine

 >>> WD.streamed_halo_function(velocity_distribution_gal=None, 
     v_rot_gal=np.array([0.,220.,0.]),
     v_sun_rot=np.array([9.,12.,7.]), 
     v_esc_gal=550,n_vmin_bin=50,yearly_modulation=False,
     vmin=None, delta_eta=True,full_year_sampling=False, 
     day_of_the_year=None, outputfile=None,recalculate=False,
     modulation_phase=152.5,**args)
  • velocity_distribution_gal: WIMP velocity distribution in the Galactic rest frame. If velocity_distribution_gal=None the halo functions are calculated using analytical expressions for a standard Maxwellian velocity distribution truncated at v_esc_gal
  • v_rot_gal: galactic rotational velocity at the Sun's position in km/s
  • v_sun_rot: peculiar velocity of the Sun with respect to the rotation curve in km/s
  • v_esc_gal: escape velocity in km/s
  • n_vmin_bin: number of sampled velocity values
  • yearly_modulation: If True calculates yearly modulation amplitudes.
  • vmin: array with velocity values to be sampled (by default set to n_vmin_bin values from 0 to the escape velocity).
  • delta_eta: If True calculates \(\delta\eta\)'s otherwise provides the halo functions \(\eta\)'s
  • full_year_sampling: If True calculates time averages and cosince transforms of the halo functions sampling it for each day of the year.
  • day_of_the_year: allows to calculate the halo function at a particular day of the year in days. By default it is set to modulation_phase-T/4
  • outputfile: If velocity_distribution_gal=!None sets the outputfile name where the halo functions are saved. The output file is saved in the folder WimPyDD/Halo_functions. If outputfile=None the name of the outputfile is set automatically created using the velocity_distribution_gal.__name__ attribute (i.e. the name of the user defined velocity distribution).
  • modulation_phase: set by default to 152.5 days (2nd of June)
  • **args: keyworded variable-length argument list with the arguments of the user defined velocity distribution

Examples

Maxwellian velocity distribution function

  • \(\eta^0\) halo function:
  •   >>> vmin,eta0=WD.streamed_halo_function(delta_eta=False)
  • \(\delta\eta^0\) halo function:
  •   >>> vmin,delta_eta0=WD.streamed_halo_function()
  • \(\eta^1\) halo function:
  •   >>> vmin,eta1=WD.streamed_halo_function(delta_eta=False,yearly_modulation=True)
  • \(\delta\eta^1\) halo function:
  •   >>> vmin,delta_eta1=WD.streamed_halo_function(yearly_modulation=True)

User defined velocity distribution function

  • \(\eta^0\) halo function:
  •   >>> vmin,eta0=WD.streamed_halo_function(delta_eta=False)
  • \(\eta^1\) halo function:
  •   >>> vmin,eta1=WD.streamed_halo_function(delta_eta=False,yearly_modulation=True)