Skip to content
Snippets Groups Projects
Commit 35f91adb authored by David Hendriks's avatar David Hendriks
Browse files

fixed some bugs in the distributions

parent 0a2a55f0
No related branches found
No related tags found
No related merge requests found
......@@ -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:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment