Skip to content

Comments

Implement Mandel & Muller 2020 + Maltsev+25 prescription#741

Merged
TomWagg merged 49 commits intoCOSMIC-PopSynth:developfrom
TomWagg:mullermandel
Feb 4, 2026
Merged

Implement Mandel & Muller 2020 + Maltsev+25 prescription#741
TomWagg merged 49 commits intoCOSMIC-PopSynth:developfrom
TomWagg:mullermandel

Conversation

@TomWagg
Copy link
Collaborator

@TomWagg TomWagg commented Jan 14, 2026

This pull request introduces version 3.7.0 of the COSMIC codebase, adding new remnant mass and natal kick prescriptions, updating configuration options, and making several improvements to usability and documentation. The most significant changes are the addition of the Mandel & Muller 2020 and Maltsev+25/Willcox+25 remnant mass and kick prescriptions, with corresponding new parameters, as well as updates to default behaviors and documentation.

Major new features and scientific options:

  • Added support for the Mandel & Muller 2020 remnant mass and natal kick prescriptions (remnantflag=5, kickflag=6), with new tunable parameters mm_mu_ns and mm_mu_bh for neutron star and black hole kick scaling, respectively. Also added the Maltsev+25/Willcox+25 remnant prescription (remnantflag=6), with new parameters maltsev_mode and maltsev_fallback to control extrapolation and fallback behavior. [1] [2] [3] [4] [5] [6] [7] [8]

  • The Fortran subroutine assign_remnant was refactored to support the new remnant prescriptions, and now passes additional core mass and metallicity parameters as needed. Calls to new subroutines for Mandel & Muller and Maltsev+25/Willcox+25 are included. [1] [2]

    • I moved the repeated spin code to a function
    • Unindented everything because it had 6 extra spaces for some reason. Also cleaned up all comments

Configuration and documentation updates:

  • The configuration files and documentation were updated to expose the new parameters (mm_mu_ns, mm_mu_bh, maltsev_mode, maltsev_fallback) to users, including detailed descriptions and default values in both docs/cosmic-settings.json and the web config documentation. [1] [2]

Versioning and metadata:

  • The codebase version was bumped to 3.7.0, and versioning is now dynamically read from src/cosmic/_version.py in the build system and project metadata. [1] [2] [3]

@codecov
Copy link

codecov bot commented Jan 14, 2026

Codecov Report

❌ Patch coverage is 8.15217% with 338 lines in your changes missing coverage. Please review.
✅ Project coverage is 77.96%. Comparing base (8772c07) to head (cc1858d).
⚠️ Report is 124 commits behind head on develop.

Files with missing lines Patch % Lines
src/cosmic/src/assign_remnant.f 5.97% 293 Missing and 6 partials ⚠️
src/cosmic/src/ran3.f 0.00% 18 Missing ⚠️
src/cosmic/src/kick.f 10.00% 9 Missing ⚠️
src/cosmic/src/evolv2.f 53.85% 4 Missing and 2 partials ⚠️
src/cosmic/evolve.py 0.00% 5 Missing ⚠️
src/cosmic/_version.py 0.00% 1 Missing ⚠️

❌ Your patch status has failed because the patch coverage (8.15%) is below the target coverage (90.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #741      +/-   ##
===========================================
- Coverage    86.91%   77.96%   -8.94%     
===========================================
  Files           40       50      +10     
  Lines        25542    27372    +1830     
  Branches         0      860     +860     
===========================================
- Hits         22198    21340     -858     
- Misses        3344     5759    +2415     
- Partials         0      273     +273     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions
Copy link
Contributor

🚨 CMC review requested

This pull request modifies one or more of the following files:

  • src/cosmic/utils.py
  • docs/cosmic-settings.json
  • src/cosmic/evolve.py

A CMC developer should review this PR to ensure corresponding changes are propagated upstream as needed.

@COSMIC-PopSynth COSMIC-PopSynth deleted a comment from github-actions bot Jan 16, 2026
@github-actions
Copy link
Contributor

🚨 CMC review requested

This pull request modifies one or more of the following files:

  • src/cosmic/utils.py
  • docs/cosmic-settings.json
  • src/cosmic/evolve.py

A CMC developer should review this PR to ensure corresponding changes are propagated upstream as needed.

@TomWagg
Copy link
Collaborator Author

TomWagg commented Jan 16, 2026

@katiebreivik as you suggested, this now adds "maltsev_pf_prob" as an option, which is by default 10% but you can vary between 0 and 100% for what fraction of remnants in the "partial fallback" regime actually form partial feedback BHs and not NSs :)

@COSMIC-PopSynth COSMIC-PopSynth deleted a comment from github-actions bot Jan 28, 2026
@COSMIC-PopSynth COSMIC-PopSynth deleted a comment from github-actions bot Jan 28, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Feb 3, 2026

🚨 CMC review requested

This pull request modifies one or more of the following files:

  • src/cosmic/utils.py
  • docs/cosmic-settings.json
  • src/cosmic/evolve.py

A CMC developer should review this PR to ensure corresponding changes are propagated upstream as needed.

@COSMIC-PopSynth COSMIC-PopSynth deleted a comment from github-actions bot Feb 3, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Feb 3, 2026

🚨 CMC review requested

This pull request modifies one or more of the following files:

  • src/cosmic/utils.py
  • docs/cosmic-settings.json
  • src/cosmic/evolve.py

A CMC developer should review this PR to ensure corresponding changes are propagated upstream as needed.

Copy link
Collaborator

@katiebreivik katiebreivik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Thanks a million @TomWagg ! Feel free to merge/release if you have time today!

@TomWagg TomWagg merged commit af0dab3 into COSMIC-PopSynth:develop Feb 4, 2026
5 of 7 checks passed
@TomWagg TomWagg deleted the mullermandel branch February 4, 2026 15:40
MarkGM02 pushed a commit to MarkGM02/COSMIC that referenced this pull request Feb 4, 2026
…ynth#741)

* start remnant mass, add normal dist

* first draft of MM remnant mass

* add core mass a parameter for kicks

* move random normal to ran3

* fortran line lengths are the bane of my existence

* allow for kickflags of 6

* draw natal kicks based on MM

* messing around with truncated normals

* need to allow for new remnant flag

* simplified truncated normal

* unindent every line by 6 columns

* clean up spin assignments

* seems like we should do this for every remnant flag?

* move muller mandel to its own subroutine

* pass mc_tot to assign_remnant, use with MM20

* final comments explaining truncation

* ensure kick uses CO core masses

* add new settings, clean up params file

* forgot to add them here

* remove debug prints

* oops they were backwards

* draw from gaussian properly

* first draft of maltsev

* fix new settings

* pass kw to check for self stripping

* watch for rogue CEs too

* more comments

* centralise version to just _version.py so they don't get out ot sync

* add new settings to all of the tests

* update version/changelog

* add new options to settings

* get rid of extra commas

* fix brackets, move sections

* add maltsev_pf_prob option, change default mode to 0

* add new setting to test data

* match new convention for cosmic-settings

* change CMC review workflow to only run when PR opened

* make cmc review smarter about how it triggers from

* check the settings specifically

* typo: mt_type should be 1 here

* reorder sn vars to avoid padding, add bpp_ind to shared

* use bpp_ind instead of jp, now it's shared :)

* columns can move! :o also handle mergers

* update settings html to latest

* don't need 1000 now, just bpp_ind

* clarify settings for maltsev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement needs-cmc-review PR touches cosmic core settings and needs CMC review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants