dddm.recoil_rates package
Submodules
dddm.recoil_rates.detector_spectrum module
Introduce detector effects into the expected detection spectrum
- class dddm.recoil_rates.detector_spectrum.DetectorSpectrum(dark_matter_model: Union[SHM, ShieldedSHM], experiment: Experiment)[source]
Bases:
GenSpectrum- Convolve a recoil spectrum with the detector effects:
background levels
energy resolution
energy threshold
- static above_threshold(rates: ndarray, e_bin_edges: ndarray, e_thr: Union[float, int])[source]
Apply threshold to the rates. We are right edge inclusive bin edges : |bin0|bin1|bin2| e_thr : | bin0 -> 0 bin1 -> fraction of bin1 > e_thr bin2 -> full content
- Parameters:
rates – bins with the number of counts
e_bin_edges – 2d array of the left, right bins
e_thr – energy threshold
- Returns:
rates with energy threshold applied
dddm.recoil_rates.halo module
For a given detector get a WIMPrate for a given detector (not taking into account any detector effects
- class dddm.recoil_rates.halo.SHM(v_0=None, v_esc=None, rho_dm=None)[source]
Bases:
objectclass used to pass a halo model to the rate computation must contain: :param v_esc – escape velocity (multiplied by units) :param rho_dm – density in mass/volume of dark matter at the Earth (multiplied by units) The standard halo model also allows variation of v_0 :param v_0 – v0 of the velocity distribution (multiplied by units) :function velocity_dist – function taking v,t giving normalised velocity distribution in earth rest-frame.
dddm.recoil_rates.halo_shielded module
- class dddm.recoil_rates.halo_shielded.ShieldedSHM(location, file_folder='./verne_files', v_0=None, v_esc=None, rho_dm=None, log_cross_section=None, log_mass=None)[source]
Bases:
objectclass used to pass a halo model to the rate computation based on the earth shielding effect as calculated by Verne must contain:
:param v_esc – escape velocity (multiplied by units) :param rho_dm – density in mass/volume of dark matter at the Earth (multiplied by units)
The standard halo model also allows variation of v_0
:param v_0 – v0 of the velocity distribution (multiplied by units) :function velocity_dist – function taking v,t giving normalised
velocity distribution in earth rest-frame.
- load_f()[source]
- load the velocity distribution. If there is no velocity
distribution shaved, load one.
- Returns:
- property rho_dm_nodim
- property v_0_nodim
- property v_esc_nodim
dddm.recoil_rates.spectrum module
- class dddm.recoil_rates.spectrum.GenSpectrum(dark_matter_model: Union[SHM, ShieldedSHM], experiment: Experiment)[source]
Bases:
object- property darkelf_class
- get_counts(wimp_mass: Union[int, float], cross_section: Union[int, float], poisson=False) array[source]
- Parameters:
wimp_mass – wimp mass (not log)
cross_section – cross-section of the wimp nucleon interaction (not log)
poisson – type bool, add poisson True or False
- Returns:
array of counts/bin
- get_data(wimp_mass: Union[int, float], cross_section: Union[int, float], poisson=False, return_counts=False) Union[DataFrame, ndarray][source]
- Parameters:
wimp_mass – wimp mass (not log)
cross_section – cross-section of the wimp nucleon interaction (not log)
poisson – type bool, add poisson True or False
return_counts – instead of a dataframe, return counts only
- Returns:
pd.DataFrame containing events binned in energy
- required_detector_fields = ['name', 'material', 'type', 'exp_eff']
- spectrum_simple(energy_bins: Union[list, tuple, ndarray], wimp_mass: Union[int, float], cross_section: Union[int, float])[source]
Compute the spectrum for a given mass and cross-section :param wimp_mass: wimp mass (not log) :param cross_section: cross-section of the wimp nucleon interaction
(not log)
- Returns:
returns the rate