From 86642ac39d0de0816466d16d3ee05060fe6190a2 Mon Sep 17 00:00:00 2001 From: Newlin Weatherford <62032552+nweatherford@users.noreply.github.com> Date: Thu, 18 Jun 2026 15:29:31 -0700 Subject: [PATCH] Update independent.py Fixed a typo in the Eggleton approximation for Roche Lobe overflow. Someone forgot to put parentheses about the (1/3) exponent in the log term of the denominator. So instead of being log(1+q**(2/3)), as it's supposed to be, the term was previously log(1+q**1/3) == log(1+q/3). --- src/cosmic/sample/sampler/independent.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cosmic/sample/sampler/independent.py b/src/cosmic/sample/sampler/independent.py index d0ba45d21..34923c709 100644 --- a/src/cosmic/sample/sampler/independent.py +++ b/src/cosmic/sample/sampler/independent.py @@ -971,12 +971,12 @@ def sample_porb(self, mass1, mass2, rad1, rad2, porb_model, porb_max=None, size= # of the period distribution there q = mass2 / mass1 RL_fac = (0.49 * q ** (2.0 / 3.0)) / ( - 0.6 * q ** (2.0 / 3.0) + np.log(1 + q ** 1.0 / 3.0) + 0.6 * q ** (2.0 / 3.0) + np.log(1 + q ** (1.0 / 3.0)) ) q2 = mass1 / mass2 RL_fac2 = (0.49 * q2 ** (2.0 / 3.0)) / ( - 0.6 * q2 ** (2.0 / 3.0) + np.log(1 + q2 ** 1.0 / 3.0) + 0.6 * q2 ** (2.0 / 3.0) + np.log(1 + q2 ** (1.0 / 3.0)) ) # include the factor for the eccentricity