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

changed input to ktg93

parent 9736fdb2
No related branches found
No related tags found
No related merge requests found
...@@ -298,7 +298,7 @@ def Kroupa2001(m, newopts=None): ...@@ -298,7 +298,7 @@ def Kroupa2001(m, newopts=None):
) )
def ktg93(m, newopts): def ktg93(m, newopts=None):
""" """
Wrapper for mass distribution of KTG93 Wrapper for mass distribution of KTG93
""" """
...@@ -540,7 +540,7 @@ def Izzard2012_period_distribution(P, M1, log10Pmin=1): ...@@ -540,7 +540,7 @@ def Izzard2012_period_distribution(P, M1, log10Pmin=1):
Mwas = M1 Mwas = M1
M1 = max(1.15, min(16.3, 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 # Calculate the normalisations
# need to normalize the distribution for this mass # need to normalize the distribution for this mass
...@@ -557,12 +557,12 @@ def Izzard2012_period_distribution(P, M1, log10Pmin=1): ...@@ -557,12 +557,12 @@ def Izzard2012_period_distribution(P, M1, log10Pmin=1):
C += dlP * Izzard2012_period_distribution(10 ** lP, M1, log10Pmin) C += dlP * Izzard2012_period_distribution(10 ** lP, M1, log10Pmin)
distribution_constants["Izzard2012"][M1][log10Pmin] = 1.0 / C distribution_constants["Izzard2012"][M1][log10Pmin] = 1.0 / C
print( # print(
"Normalization constant for Izzard2012 M={} (log10Pmin={}) is\ # "Normalization constant for Izzard2012 M={} (log10Pmin={}) is\
{}\n".format( # {}\n".format(
M1, log10Pmin, distribution_constants["Izzard2012"][M1][log10Pmin] # M1, log10Pmin, distribution_constants["Izzard2012"][M1][log10Pmin]
) # )
) # )
lP = math.log10(P) lP = math.log10(P)
# log period # log period
...@@ -575,11 +575,11 @@ def Izzard2012_period_distribution(P, M1, log10Pmin=1): ...@@ -575,11 +575,11 @@ def Izzard2012_period_distribution(P, M1, log10Pmin=1):
g = 1.0 / (1.0 + 1e-30 ** (lP - nu)) g = 1.0 / (1.0 + 1e-30 ** (lP - nu))
lPmu = lP - mu lPmu = lP - mu
print( # print(
"M={} ({}) P={} : mu={} sigma={} K={} nu={} norm=%g\n".format( # "M={} ({}) P={} : mu={} sigma={} K={} nu={} norm=%g\n".format(
Mwas, M1, P, mu, sigma, K, nu # 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"; # print "FUNC $distdata{Izzard2012}{$M}{$log10Pmin} * (exp(- (x-$mu)**2/(2.0*$sigma*$sigma) ) + $K/MAX(0.1,$lP)) * $g;\n";
......
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