From cd104946ba96fb62be466eae7a109ff107d4dd28 Mon Sep 17 00:00:00 2001 From: David Hendriks <davidhendriks93@gmail.com> Date: Mon, 14 Dec 2020 23:57:46 +0000 Subject: [PATCH] changed input to ktg93 --- binarycpython/utils/distribution_functions.py | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/binarycpython/utils/distribution_functions.py b/binarycpython/utils/distribution_functions.py index ad14543f3..f9b0fab6c 100644 --- a/binarycpython/utils/distribution_functions.py +++ b/binarycpython/utils/distribution_functions.py @@ -298,7 +298,7 @@ def Kroupa2001(m, newopts=None): ) -def ktg93(m, newopts): +def ktg93(m, newopts=None): """ Wrapper for mass distribution of KTG93 """ @@ -540,7 +540,7 @@ def Izzard2012_period_distribution(P, M1, log10Pmin=1): Mwas = M1 M1 = max(1.15, min(16.3, M1)) - print("Izzard2012 called for M={} (trunc'd to {}), P={}\n".format(Mwas, M1, P)) + # print("Izzard2012 called for M={} (trunc'd to {}), P={}\n".format(Mwas, M1, P)) # Calculate the normalisations # need to normalize the distribution for this mass @@ -557,12 +557,12 @@ def Izzard2012_period_distribution(P, M1, log10Pmin=1): C += dlP * Izzard2012_period_distribution(10 ** lP, M1, log10Pmin) distribution_constants["Izzard2012"][M1][log10Pmin] = 1.0 / C - print( - "Normalization constant for Izzard2012 M={} (log10Pmin={}) is\ - {}\n".format( - M1, log10Pmin, distribution_constants["Izzard2012"][M1][log10Pmin] - ) - ) + # print( + # "Normalization constant for Izzard2012 M={} (log10Pmin={}) is\ + # {}\n".format( + # M1, log10Pmin, distribution_constants["Izzard2012"][M1][log10Pmin] + # ) + # ) lP = math.log10(P) # log period @@ -575,11 +575,11 @@ def Izzard2012_period_distribution(P, M1, log10Pmin=1): g = 1.0 / (1.0 + 1e-30 ** (lP - nu)) lPmu = lP - mu - print( - "M={} ({}) P={} : mu={} sigma={} K={} nu={} norm=%g\n".format( - Mwas, M1, P, mu, sigma, K, nu - ) - ) + # print( + # "M={} ({}) P={} : mu={} sigma={} K={} nu={} norm=%g\n".format( + # Mwas, M1, P, mu, sigma, K, nu + # ) + # ) # print "FUNC $distdata{Izzard2012}{$M}{$log10Pmin} * (exp(- (x-$mu)**2/(2.0*$sigma*$sigma) ) + $K/MAX(0.1,$lP)) * $g;\n"; -- GitLab