TeamCOMPAS / COMPAS

COMPAS rapid binary population synthesis code
http://compas.science
MIT License
64 stars 66 forks source link

add option to use default config (and remove redundant test config file) #1113

Closed avivajpeyi closed 4 months ago

avivajpeyi commented 4 months ago

Currently compas_run_submit always requires a position arg of the config.yml . There may be cases when a user would like to use the default config, and maybe just specify a grid file.

This PR makes it so the config.yml is just an optional argument. It also adds the ability to specify the --grid filename.

Requires #1122 to be merged first.

github-actions[bot] commented 4 months ago

badge

Build Successful! You can find a link to the downloadable artifact below.

Name Link
Commit efb5a8b0c3ef935825710696a7684e65ca772abb
Logs https://github.com/TeamCOMPAS/COMPAS/actions/runs/9024911156
Download https://github.com/TeamCOMPAS/COMPAS/suites/$SUITE_ID/artifacts/$ARTIFACT_ID
jeffriley commented 4 months ago

But is there any particular reason for the change in the grid file (removing the metallicity specification)?

@ilyamandel if we leave metallicity = 0.001 we don't get any DCOs... the pytests need minimum 2 DCOs

$ cat grid.txt
--initial-mass-1 32.0 --initial-mass-2 31.0 --metallicity 0.001 --eccentricity 0.0 --semi-major-axis 3.5 --kick-magnitude-1 0.0 --kick-magnitude-2 0.0
--initial-mass-1 32.0 --initial-mass-2 31.0 --metallicity 0.001 --eccentricity 0.0 --semi-major-axis 3.5 --kick-magnitude-1 0.0 --kick-magnitude-2 0.0

$ ./compas --grid grid.txt

COMPAS v02.45.00
Compact Object Mergers: Population Astrophysics and Statistics
by Team COMPAS (http://compas.science/index.html)
A binary star simulator

Go to https://compas.readthedocs.io/en/latest/index.html for the online documentation
Check https://compas.readthedocs.io/en/latest/pages/whats-new.html to see what's new in the latest release

Start generating binaries at Fri May 10 08:45:11 2024

0: Stars merged: (Main_Sequence_>_0.7 -> Naked_Helium_Star_MS) + (Main_Sequence_>_0.7 -> Naked_Helium_Star_MS)
1: Stars merged: (Main_Sequence_>_0.7 -> Naked_Helium_Star_MS) + (Main_Sequence_>_0.7 -> Naked_Helium_Star_MS)

Generated 2 of 2 binaries requested

Simulation completed

End generating binaries at Fri May 10 08:45:11 2024

Clock time = 0.053216 CPU seconds
Wall time  = 0000:00:00 (hhhh:mm:ss)

$ cat grid.txt
--initial-mass-1 32.0 --initial-mass-2 31.0 --eccentricity 0.0 --semi-major-axis 3.5 --kick-magnitude-1 0.0 --kick-magnitude-2 0.0
--initial-mass-1 32.0 --initial-mass-2 31.0 --eccentricity 0.0 --semi-major-axis 3.5 --kick-magnitude-1 0.0 --kick-magnitude-2 0.0

$ ./compas --grid grid.txt

COMPAS v02.45.00
Compact Object Mergers: Population Astrophysics and Statistics
by Team COMPAS (http://compas.science/index.html)
A binary star simulator

Go to https://compas.readthedocs.io/en/latest/index.html for the online documentation
Check https://compas.readthedocs.io/en/latest/pages/whats-new.html to see what's new in the latest release

Start generating binaries at Fri May 10 08:45:50 2024

0: DCO formed: (Main_Sequence_>_0.7 -> Black_Hole) + (Main_Sequence_>_0.7 -> Black_Hole)
1: DCO formed: (Main_Sequence_>_0.7 -> Black_Hole) + (Main_Sequence_>_0.7 -> Black_Hole)

Generated 2 of 2 binaries requested

Simulation completed

End generating binaries at Fri May 10 08:45:50 2024

Clock time = 0.043046 CPU seconds
Wall time  = 0000:00:00 (hhhh:mm:ss)
ilyamandel commented 4 months ago

OK. Though the output is a bit misleading: this is a double-core CE between two CHeB stars during which the stars merge, so we should probably be calling it such, rather than listing it as the merger of the cores (naked He stars). :) However, we are now, after all of the code fixes, back to our original canonical example of 35+31 forming merging a BBH (after going through CE), so I'll revert us to that manually in a second, then approve.