COSMIC-PopSynth / COSMIC

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

Critical fix reguarding virial radii #521

Closed carlrodriguez closed 3 years ago

carlrodriguez commented 3 years ago

Changes how we specify the virial radius as a parameter; before we were NOT doing this consistently, and the orbital periods for binaries were wrong (the porb_max was always set assuming rvir=1, reguardless of what was set later).

Now, the virial radius and tidal radius are optional parameters to InitialCMCTable.sampler. They can be reset when writing the hdf5 files, but that's optional

carlrodriguez commented 3 years ago

Turns out there was a bug in the old unit tests: the King profile test never actually generated a King profile, it just generated an Elson profile with the default parameters (which is what the unit test was).

codecov[bot] commented 3 years ago

Codecov Report

Merging #521 (68d099b) into develop (f535eba) will increase coverage by 0.30%. The diff coverage is 87.50%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #521      +/-   ##
===========================================
+ Coverage    86.74%   87.04%   +0.30%     
===========================================
  Files           40       40              
  Lines        25356    25366      +10     
===========================================
+ Hits         21993    22079      +86     
+ Misses        3363     3287      -76     
Impacted Files Coverage Δ
cosmic/sample/sampler/cmc.py 84.04% <66.67%> (+3.40%) :arrow_up:
cosmic/sample/initialcmctable.py 95.49% <100.00%> (+0.25%) :arrow_up:
cosmic/sample/initialbinarytable.py 94.44% <0.00%> (+0.16%) :arrow_up:
cosmic/sample/cmc/king.py 93.75% <0.00%> (+76.04%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update f535eba...68d099b. Read the comment docs.