Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion gwinferno/distributions.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ def smooth(dx, x, xmin):
func = jnp.exp(dx / (x - xmin) + dx / (x - xmin - dx))
s1 = jnp.where(jnp.less(x, xmin), 0, 1)
s2 = jnp.where(jnp.less(x, xmin + dx) | jnp.greater_equal(x, xmin), (func + 1) ** (-1), s1)
return s2
s3 = jnp.where(jnp.greater_equal(x, xmin + dx), 1, s2)
return s3


def logistic_function(x, L, k, x0):
Expand Down
2 changes: 1 addition & 1 deletion gwinferno/models/parametric/parametric.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def plpeak_primary_pdf(m1, alpha, mmin, mmax, mpp, sigpp, lam, delta=None):
if delta is None:
return (1 - lam) * powerlaw_pdf(m1, alpha, mmin, mmax) + lam * truncnorm_pdf(m1, mpp, sigpp, mmin, mmax)
else:
return (1 - lam) * powerlaw_pdf(m1, alpha, mmin, mmax) * smooth(delta, m1, mmin) + lam * truncnorm_pdf(m1, mpp, sigpp, mmin, mmax)
return ( (1 - lam) * powerlaw_pdf(m1, alpha, mmin, mmax) + lam * truncnorm_pdf(m1, mpp, sigpp, mmin, mmax) ) * smooth(delta, m1, mmin)


"""
Expand Down
Loading