diff --git a/binarycpython/utils/distribution_functions.py b/binarycpython/utils/distribution_functions.py index b9476e04567144dcce331cf4c1976ea450d667b2..be040aa73fed43a9bc895701657917d679307485 100644 --- a/binarycpython/utils/distribution_functions.py +++ b/binarycpython/utils/distribution_functions.py @@ -118,7 +118,7 @@ def const( print("out of bounds") prob = 0 return prob - prob = 1.0 / (min_bound - max_bound) + prob = 1.0 / (max_bound - min_bound) return prob @@ -501,12 +501,12 @@ def ktg93(m: Union[int, float], newopts: dict = None) -> Union[int, float]: return three_part_powerlaw( m, value_dict["m0"], - value_dict["m0"], + value_dict["m1"], value_dict["m2"], - value_dict["m0"], - value_dict["m0"], - value_dict["m0"], - value_dict["m0"], + value_dict["mmax"], + value_dict["p1"], + value_dict["p2"], + value_dict["p3"], ) @@ -577,7 +577,7 @@ def imf_chabrier2003(m: Union[int, float]) -> Union[int, float]: chabrier_a1 = 0.158 chabrier_a2 = 4.43e-2 chabrier_x = -1.3 - if m < 0: + if m <= 0: print("below bounds") raise ValueError if 0 < m < 1.0: