## Halo FunctionWimPyDD provides the routine >>> 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,
To calculate \(\delta\eta^{(1)}\) the
argument The routine can also be used for a user-defined velocity distribution.
This requires to pass the argument 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 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),\] In the case when ## 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
**\(\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)
**\(\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) |