Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow user customisation of columns in bpp and bcm tables #673

Merged
merged 16 commits into from
Oct 3, 2024

Conversation

TomWagg
Copy link
Collaborator

@TomWagg TomWagg commented Sep 8, 2024

I've added two arguments to Evolve.evolve(), bpp_columns and bcm_columns. Users can specify a list of columns to include in either table, by default it will use the current setup so no breaking changes with this 😅 I've made the changes directly in the Fortran as well so this will perhaps cut down on RAM usage during the run.

The only change I made that alters the default behaviour is to report kstar_x and evol_type as integers instead of floats, which I think makes sense?

(Selfishly motivated by TomWagg/cogsworth#86 🙃)

Implementation details

The way it works is:

  • Define a list of all possible columns (in python and in fortran files)
  • Convert user input into a number of columns in each table and indices of the variables you want to add
  • In writetab (new function that combines writebpp and writebcm in a simpler way), access the specific variables in the order the inds specify

This means I had to define some new variables in const_bse.h and also change the calling of writebpp and writebcm everywhere.

Demo

Default behaviour
image

Specifying certain columns
image

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.

amazing! We can merge this in for now but we should be sure to add in some docs for providing the kwargs for the columns to the evolve call.

@TomWagg TomWagg merged commit 1b38bc6 into COSMIC-PopSynth:develop Oct 3, 2024
2 checks passed
@TomWagg TomWagg deleted the columns branch October 3, 2024 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants