diff --git a/wimprates/bremsstrahlung.py b/wimprates/bremsstrahlung.py index 18f5769..a9de57c 100644 --- a/wimprates/bremsstrahlung.py +++ b/wimprates/bremsstrahlung.py @@ -103,7 +103,7 @@ def integrand(erec): @wr.vectorize_first def rate_bremsstrahlung(w, mw, sigma_nucleon, interaction='SI', m_med=float('inf'), t=None, - halo_model = wr.standard_halo_model(),**kwargs): + halo_model = None,**kwargs): """Differential rate per unit detector mass and recoil energy of Bremsstrahlung elastic WIMP-nucleus scattering. @@ -122,6 +122,7 @@ def rate_bremsstrahlung(w, mw, sigma_nucleon, interaction='SI', Further kwargs are passed to scipy.integrate.quad numeric integrator (e.g. error tolerance). """ + halo_model = wr.standard_halo_model() if halo_model is None else halo_model vmin = vmin_w(w, mw) if vmin >= wr.v_max(t, halo_model.v_esc): diff --git a/wimprates/elastic_nr.py b/wimprates/elastic_nr.py index 9f8a1e5..7a736ac 100644 --- a/wimprates/elastic_nr.py +++ b/wimprates/elastic_nr.py @@ -179,7 +179,7 @@ def vmin_elastic(erec, mw): @wr.vectorize_first def rate_elastic(erec, mw, sigma_nucleon, interaction='SI', m_med=float('inf'), t=None, - halo_model = wr.standard_halo_model(), **kwargs): + halo_model = None, **kwargs): """Differential rate per unit detector mass and recoil energy of elastic WIMP scattering @@ -200,6 +200,7 @@ def rate_elastic(erec, mw, sigma_nucleon, interaction='SI', Analytic expressions are known for this rate, but they are not used here. """ + halo_model = wr.standard_halo_model() if halo_model is None else halo_model v_min = vmin_elastic(erec, mw) if v_min >= wr.v_max(t, halo_model.v_esc): diff --git a/wimprates/electron.py b/wimprates/electron.py index 8aef834..3aefc53 100644 --- a/wimprates/electron.py +++ b/wimprates/electron.py @@ -146,7 +146,7 @@ def diff_xsec(q): # Note dblquad expects the function to be f(y, x), not f(x, y)... def diff_xsec(v, q): result = q * dme_ionization_ff(shell, erec, q) - result *= 1 / v * halo_model.valocity_dist(v, t) + result *= 1 / v * halo_model.velocity_dist(v, t) return result r = dblquad( diff --git a/wimprates/migdal.py b/wimprates/migdal.py index ff0fa52..5645131 100644 --- a/wimprates/migdal.py +++ b/wimprates/migdal.py @@ -41,7 +41,7 @@ def vmin_migdal(w, erec, mw): @wr.vectorize_first def rate_migdal(w, mw, sigma_nucleon, interaction='SI', m_med=float('inf'), include_approx_nr=False, - t=None, halo_model = wr.standard_halo_model(), **kwargs): + t=None, halo_model = None, **kwargs): """Differential rate per unit detector mass and deposited ER energy of Migdal effect WIMP-nucleus scattering @@ -65,6 +65,7 @@ def rate_migdal(w, mw, sigma_nucleon, interaction='SI', m_med=float('inf'), Further kwargs are passed to scipy.integrate.quad numeric integrator (e.g. error tolerance). """ + halo_model = wr.standard_halo_model() if halo_model is None else halo_model include_approx_nr = 1 if include_approx_nr else 0 result = 0