diff options
author | tlatorre <tlatorre@uchicago.edu> | 2020-12-09 14:13:39 -0600 |
---|---|---|
committer | tlatorre <tlatorre@uchicago.edu> | 2020-12-09 14:13:39 -0600 |
commit | f43a75955e8a624b1927b3075776574303158634 (patch) | |
tree | 960d6ab5444deba83bbceecc600e59d7ec1add16 /utils | |
parent | af66c8b73a4a805caa3563e7319affa5ca38d56f (diff) | |
download | sddm-f43a75955e8a624b1927b3075776574303158634.tar.gz sddm-f43a75955e8a624b1927b3075776574303158634.tar.bz2 sddm-f43a75955e8a624b1927b3075776574303158634.zip |
ensure discovery threshold is at least 0
Diffstat (limited to 'utils')
-rwxr-xr-x | utils/dm-search | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/utils/dm-search b/utils/dm-search index ed05a91..aaac58c 100755 --- a/utils/dm-search +++ b/utils/dm-search @@ -509,7 +509,7 @@ def get_limits(dm_masses,data,muon,data_mc,atmo_scale_factor,muon_scale_factor,b # increase our discovery threshold to account for the look # elsewhere effect. threshold = DISCOVERY_P_VALUE/(len(bins)-1) - discovery = poisson.ppf(1-threshold,n) - n + discovery = max(poisson.ppf(1-threshold,n) - n,0) # Here, we scale the discovery threshold by the fraction of the # dark matter hist in the histogram range. The idea is that if only # a small fraction of the dark matter histogram falls into the |