COSMIC-PopSynth / COSMIC

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

added the necessary updates for including a central_bh in CMC #613

Closed carlrodriguez closed 6 months ago

carlrodriguez commented 6 months ago

work from Tomás and me on including central massive black holes (MBHs) in CMC.

This places an MBH at the 0 index of the Singles array. When using the regular CMC sampler the mass is specified in solar masses; when using the cmc-point-mass sampler the mass is specified in number of stars (e.g. for a 10,000 point-mass cluster, central_bh=1000 yields an MBH with 10% of the cluster mass).

There's an additional parameter, scale_with_central_bh, which can be passed to the sampler; if True, this adds the MBH potential energy into the calculation when rescaling the stellar positions (default is False).

finally, added a ``seed'' parameter to cmc_point_mass to create different point-mass realizations of clusters.

codecov[bot] commented 6 months ago

Codecov Report

Attention: 357 lines in your changes are missing coverage. Please review.

Comparison is base (8772c07) 86.91% compared to head (337b954) 87.62%. Report is 25 commits behind head on develop.

Files Patch % Lines
cosmic/src/assign_remnant.f 9.39% 193 Missing :warning:
cosmic/src/zfuncs.f 6.67% 84 Missing :warning:
cosmic/src/mlwind.f 4.76% 20 Missing :warning:
cosmic/src/hrdiag_remnant.f 64.00% 18 Missing :warning:
cosmic/sample/sampler/cmc.py 22.22% 14 Missing :warning:
cosmic/plotting.py 0.00% 13 Missing :warning:
cosmic/src/evolv2.f 37.50% 5 Missing :warning:
cosmic/checkstate.py 25.00% 3 Missing :warning:
cosmic/src/checkstate.f 0.00% 3 Missing :warning:
cosmic/sample/initialcmctable.py 84.62% 2 Missing :warning:
... and 2 more
Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #613 +/- ## =========================================== + Coverage 86.91% 87.62% +0.71% =========================================== Files 40 42 +2 Lines 25542 25744 +202 =========================================== + Hits 22198 22557 +359 + Misses 3344 3187 -157 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

katiebreivik commented 6 months ago

Thanks for adding in the changelog @carlrodriguez !