COSMIC-PopSynth / COSMIC

COSMIC (Compact Object Synthesis and Monte Carlo Investigation Code)
GNU General Public License v3.0
45 stars 58 forks source link

Orbital sampling #563

Closed elenagonzalez870 closed 1 year ago

elenagonzalez870 commented 1 year ago

Some binaries were being sampled at separations smaller than RL radius, causing them to merge immediately. To fix this, I added lines in the independent.py file that check if the orbital period sampled is less than the minimum orbital period for RL. If so, it replaces the value with the minimum RL separation. The same procedure is used for the sana12 and renzo19 samplers. For consistency, I also truncate the eccentricities to avoid RL overflow. For the sana12 eccentricity sampling, I set the maximum value to be either the sana12 value of 0.9 or the one corrected for RL, whichever is smaller.

codecov[bot] commented 1 year ago

Codecov Report

Merging #563 (448468c) into develop (428a66a) will decrease coverage by 0.85%. The diff coverage is 87.50%.

@@             Coverage Diff             @@
##           develop     #563      +/-   ##
===========================================
- Coverage    88.25%   87.40%   -0.85%     
===========================================
  Files           40       40              
  Lines        25373    25392      +19     
===========================================
- Hits         22392    22193     -199     
- Misses        2981     3199     +218     
Impacted Files Coverage Δ
cosmic/sample/sampler/independent.py 64.84% <87.50%> (+0.87%) :arrow_up:
cosmic/sample/sampler/multidim.py 17.57% <0.00%> (-68.92%) :arrow_down:
cosmic/evolve.py 84.58% <0.00%> (-5.00%) :arrow_down:
cosmic/sample/sampler/cmc.py 82.47% <0.00%> (ø)
cosmic/sample/initialcmctable.py 95.49% <0.00%> (+0.14%) :arrow_up:
cosmic/sample/initialbinarytable.py 94.44% <0.00%> (+0.16%) :arrow_up:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

katiebreivik commented 1 year ago

Thanks @elenagonzalez870 !