cosmic-popsynth 3.6.0__tar.gz → 3.6.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/.github/workflows/build_wheels_and_publish.yml +21 -26
- cosmic_popsynth-3.6.2/.github/workflows/cmc-review.yml +76 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/.github/workflows/python-package.yml +5 -8
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/.gitignore +1 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/PKG-INFO +2 -3
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/bin/cosmic-pop +93 -48
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/changelog.md +10 -1
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/docs/create_params_ini.py +1 -1
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/docs/create_settings_html.py +1 -1
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/docs/pages/config/config_insert_bse.html +21 -21
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/docs/pages/config/config_insert_sampling.html +6 -6
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/docs/pages/develop/adding-options.rst +1 -1
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/docs/pages/evolve/evolve_sample.rst +2 -2
- cosmic_popsynth-3.6.2/docs/pages/evolve/interface.rst +341 -0
- cosmic_popsynth-3.6.2/docs/pages/evolve/rerun.rst +145 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/docs/pages/evolve/single.rst +88 -39
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/docs/pages/examples.rst +2 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/docs/pages/fixedpop.rst +9 -1
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/docs/pages/inifile.rst +5 -1
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/docs/pages/output_info.rst +1 -1
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/docs/pages/sample/independent.rst +166 -26
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/docs/pages/sample/multidim.rst +9 -6
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/examples/Params.ini +2 -2
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/meson.build +3 -7
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/pyproject.toml +4 -4
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/requirements.txt +1 -2
- cosmic_popsynth-3.6.2/src/cosmic/_version.py +1 -0
- cosmic_popsynth-3.6.2/src/cosmic/data/__init__.py +0 -0
- {cosmic_popsynth-3.6.0/docs → cosmic_popsynth-3.6.2/src/cosmic/data}/cosmic-settings.json +68 -28
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/src/cosmic/evolve.py +68 -43
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/src/cosmic/meson.build +7 -1
- cosmic_popsynth-3.6.2/src/cosmic/output.py +466 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/src/cosmic/plotting.py +0 -3
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/src/cosmic/sample/initialbinarytable.py +13 -16
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/src/cosmic/sample/initialcmctable.py +5 -4
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/src/cosmic/sample/sampler/cmc.py +6 -6
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/src/cosmic/sample/sampler/independent.py +80 -21
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/src/cosmic/sample/sampler/multidim.py +24 -15
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/src/cosmic/src/assign_remnant.f +6 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/src/cosmic/src/bpp_array.f +48 -41
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/src/cosmic/src/comenv.f +97 -64
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/src/cosmic/src/comprad.f +10 -1
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/src/cosmic/src/const_bse.h +5 -3
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/src/cosmic/src/evolv2.f +107 -56
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/src/cosmic/src/hrdiag.f +43 -2
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/src/cosmic/src/kick.f +51 -17
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/src/cosmic/tests/data/unit_tests_results.hdf5 +0 -0
- cosmic_popsynth-3.6.2/src/cosmic/tests/test_kick.py +92 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/src/cosmic/tests/test_sample.py +36 -15
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/src/cosmic/utils.py +200 -483
- cosmic_popsynth-3.6.0/src/cosmic/_version.py +0 -1
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/.codecov.yml +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/.gitattributes +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/.github/ISSUE_TEMPLATE/general_issue.md +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/.github/ISSUE_TEMPLATE/unexpected-stellar-evolutionary-behavior.md +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/.github/workflows/deploy-github-pages.yml +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/.github/workflows/github_registory.yml +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/.readthedocs.yml +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/.vscode/launch.json +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/.vscode/tasks.json +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/Dockerfile +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/LICENSE +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/MANIFEST.in +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/README.md +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/ci/compile_benchmark.sh +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/ci/run-tests.sh +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/debug/create_binary_in.py +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/docs/Makefile +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/docs/_static/bootstrap-grid.min.css +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/docs/_static/cosmic-docs.css +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/docs/_static/custom.js +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/docs/_static/settings.js +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/docs/_templates/layout.html +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/docs/conf.py +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/docs/data/dat_DeltaBurst_13_14_13_14.h5 +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/docs/data/qcrit_table.csv +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/docs/index.rst +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/docs/pages/about.rst +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/docs/pages/cite.rst +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/docs/pages/config/README.md +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/docs/pages/config/config_insert_convergence.html +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/docs/pages/config/config_insert_filters.html +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/docs/pages/config/config_insert_rand_seed.html +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/docs/pages/develop/debugging-vscode.rst +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/docs/pages/develop/how-it-works.rst +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/docs/pages/develop/new-settings.rst +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/docs/pages/develop/option-schema.csv +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/docs/pages/develop/setting-schema.csv +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/docs/pages/develop/settings-json-file.rst +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/docs/pages/developers.rst +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/docs/pages/evolve/grid.rst +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/docs/pages/evolve/multiple.rst +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/docs/pages/evolve/resolution.rst +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/docs/pages/evolve/restart.rst +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/docs/pages/install.rst +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/docs/pages/reference_material.rst +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/docs/pages/runpop.rst +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/docs/pages/sample/cluster.rst +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/examples/CMC_Params.ini +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/src/cosmic/Match.py +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/src/cosmic/__init__.py +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/src/cosmic/bse_utils/__init__.py +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/src/cosmic/bse_utils/meson.build +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/src/cosmic/bse_utils/zcnsts.py +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/src/cosmic/bse_utils/zdata.py +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/src/cosmic/checkstate.py +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/src/cosmic/filter.py +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/src/cosmic/get_commit_hash.py +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/src/cosmic/sample/__init__.py +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/src/cosmic/sample/cmc/__init__.py +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/src/cosmic/sample/cmc/elson.py +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/src/cosmic/sample/cmc/king.py +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/src/cosmic/sample/cmc/meson.build +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/src/cosmic/sample/meson.build +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/src/cosmic/sample/sampler/__init__.py +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/src/cosmic/sample/sampler/meson.build +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/src/cosmic/sample/sampler/sampler.py +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/src/cosmic/src/Makefile +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/src/cosmic/src/benchmarkevolv2.f +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/src/cosmic/src/bse.f +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/src/cosmic/src/checkstate.f +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/src/cosmic/src/checkstate.h +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/src/cosmic/src/concatkstars.f +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/src/cosmic/src/corerd.f +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/src/cosmic/src/deltat.f +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/src/cosmic/src/dgcore.f +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/src/cosmic/src/evolv1.f +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/src/cosmic/src/gntage.f +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/src/cosmic/src/hrdiag_remnant.f +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/src/cosmic/src/instar.f +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/src/cosmic/src/int64.f +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/src/cosmic/src/int64.h +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/src/cosmic/src/int64.h.in +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/src/cosmic/src/mix.f +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/src/cosmic/src/mlwind.f +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/src/cosmic/src/mrenv.f +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/src/cosmic/src/ran3.f +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/src/cosmic/src/rl.f +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/src/cosmic/src/sse.f +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/src/cosmic/src/star.f +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/src/cosmic/src/taus113-ran3.f +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/src/cosmic/src/taus113tester.f +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/src/cosmic/src/tausworth.f +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/src/cosmic/src/tausworth.h +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/src/cosmic/src/test_bse.f +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/src/cosmic/src/zcnsts.f +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/src/cosmic/src/zdata.h +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/src/cosmic/src/zfuncs.f +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/src/cosmic/tests/data/GW_dat.h5 +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/src/cosmic/tests/data/Kroupa93.npy +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/src/cosmic/tests/data/Params.ini +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/src/cosmic/tests/data/bpp_array_ind_sampling.npy +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/src/cosmic/tests/data/cmc_elson_test.npz +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/src/cosmic/tests/data/cmc_king_test.npz +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/src/cosmic/tests/data/cmc_plummer_test.npz +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/src/cosmic/tests/data/dat_ThinDisk_10_12_10_12.h5 +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/src/cosmic/tests/data/dat_ThinDisk_11_11_3.h5 +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/src/cosmic/tests/data/init_conditions_ind_sampling.npy +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/src/cosmic/tests/data/initial_conditions_for_testing.hdf5 +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/src/cosmic/tests/data/input_cmc.fits +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/src/cosmic/tests/data/input_cmc.hdf5 +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/src/cosmic/tests/data/kick_initial_conditions.h5 +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/src/cosmic/tests/data/unit_test_results.hdf5 +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/src/cosmic/tests/data/utils_test.hdf +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/src/cosmic/tests/meson.build +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/src/cosmic/tests/test_evolve.py +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/src/cosmic/tests/test_match.py +0 -0
- {cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/src/cosmic/tests/test_utils.py +0 -0
{cosmic_popsynth-3.6.0 → cosmic_popsynth-3.6.2}/.github/workflows/build_wheels_and_publish.yml
RENAMED
|
@@ -6,79 +6,74 @@ on:
|
|
|
6
6
|
workflow_dispatch:
|
|
7
7
|
|
|
8
8
|
env:
|
|
9
|
-
CIBW_BUILD: "
|
|
9
|
+
CIBW_BUILD: "cp310-* cp311-* cp312-* cp313-*"
|
|
10
10
|
CIBW_ARCHS_LINUX: "x86_64"
|
|
11
11
|
CIBW_SKIP: "*-win32 *musllinux*"
|
|
12
12
|
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
|
|
13
13
|
CIBW_BEFORE_BUILD: pip install numpy --config-settings=setup-args="-Dallow-noblas=true"
|
|
14
14
|
CIBW_BUILD_VERBOSITY: "1"
|
|
15
|
+
CIBW_BEFORE_ALL_LINUX: yum install -y gcc-gfortran
|
|
16
|
+
CIBW_ENVIRONMENT_LINUX: "FC=gfortran F77=gfortran"
|
|
17
|
+
CIBW_ENVIRONMENT_MACOS: "FC=gfortran F77=gfortran MACOSX_DEPLOYMENT_TARGET=14.0"
|
|
15
18
|
|
|
16
19
|
jobs:
|
|
17
20
|
build-wheels-and-dist:
|
|
18
|
-
name: Build
|
|
21
|
+
name: Build wheels on ${{ matrix.os }}
|
|
19
22
|
runs-on: ${{ matrix.os }}
|
|
20
23
|
strategy:
|
|
21
24
|
matrix:
|
|
22
|
-
os: [ubuntu-latest, macos-
|
|
23
|
-
python-version: [3.9, "3.10"]
|
|
25
|
+
os: [ubuntu-latest, macos-14]
|
|
24
26
|
|
|
25
27
|
steps:
|
|
26
28
|
- uses: actions/checkout@v4
|
|
27
29
|
with:
|
|
28
30
|
fetch-depth: 0
|
|
31
|
+
|
|
32
|
+
# this step only uses a single python version since cibuildwheel
|
|
33
|
+
# builds multiple versions in one go on linux
|
|
29
34
|
- uses: actions/setup-python@v5
|
|
30
35
|
name: Install Python
|
|
31
36
|
with:
|
|
32
|
-
python-version: "3.
|
|
37
|
+
python-version: "3.12"
|
|
33
38
|
|
|
34
|
-
- name:
|
|
39
|
+
- name: Install hdf5 (macOS)
|
|
35
40
|
if: runner.os == 'macOS'
|
|
36
41
|
run: |
|
|
37
|
-
|
|
38
|
-
brew reinstall hdf5
|
|
42
|
+
brew install hdf5
|
|
39
43
|
|
|
40
44
|
- name: Install numpy
|
|
41
45
|
run: |
|
|
42
46
|
python -m pip install --upgrade pip
|
|
43
|
-
python -m pip install numpy h5py versioneer
|
|
47
|
+
python -m pip install numpy h5py versioneer
|
|
44
48
|
|
|
45
49
|
- name: Install dependencies
|
|
46
50
|
run: |
|
|
47
51
|
python -m pip install setuptools wheel build meson-python ninja meson pytest cibuildwheel
|
|
48
52
|
|
|
49
|
-
- name:
|
|
53
|
+
- name: Set up Fortran (macOS)
|
|
50
54
|
if: runner.os == 'macOS'
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
+
uses: fortran-lang/setup-fortran@v1
|
|
56
|
+
with:
|
|
57
|
+
compiler: gcc
|
|
58
|
+
version: '13'
|
|
55
59
|
|
|
56
60
|
- name: Build source and wheels distribution on Linux
|
|
57
|
-
if: runner.os == 'Linux'
|
|
58
61
|
run: |
|
|
59
62
|
python -m build --sdist --outdir dist
|
|
60
63
|
python -m cibuildwheel --output-dir dist
|
|
61
64
|
|
|
62
65
|
- uses: actions/upload-artifact@v4
|
|
63
66
|
with:
|
|
64
|
-
name: dist-${{ matrix.os }}
|
|
67
|
+
name: dist-${{ matrix.os }}
|
|
65
68
|
path: ./dist/*
|
|
66
69
|
|
|
67
70
|
publish:
|
|
68
71
|
needs: [build-wheels-and-dist]
|
|
69
|
-
name: Publish Python 🐍 distributions 📦 to PyPI
|
|
70
|
-
runs-on:
|
|
71
|
-
strategy:
|
|
72
|
-
matrix:
|
|
73
|
-
os: [ubuntu-latest]
|
|
74
|
-
python-version: ["3.10"]
|
|
72
|
+
name: Publish Python 🐍 distributions 📦 to PyPI
|
|
73
|
+
runs-on: ubuntu-latest
|
|
75
74
|
|
|
76
75
|
steps:
|
|
77
76
|
- uses: actions/checkout@v4
|
|
78
|
-
- name: Set up Python ${{ matrix.python-version }}
|
|
79
|
-
uses: actions/setup-python@v5
|
|
80
|
-
with:
|
|
81
|
-
python-version: ${{ matrix.python-version }}
|
|
82
77
|
|
|
83
78
|
- name: Download artifacts
|
|
84
79
|
uses: actions/download-artifact@v4
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
name: Flag CMC review for cosmic changes
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request_target:
|
|
5
|
+
types: [opened, reopened, synchronize]
|
|
6
|
+
paths:
|
|
7
|
+
- 'src/cosmic/utils.py'
|
|
8
|
+
- 'src/cosmic/evolve.py'
|
|
9
|
+
- 'docs/cosmic-settings.json'
|
|
10
|
+
|
|
11
|
+
permissions:
|
|
12
|
+
pull-requests: write
|
|
13
|
+
contents: read
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
flag-cmc-review:
|
|
17
|
+
runs-on: ubuntu-latest
|
|
18
|
+
|
|
19
|
+
steps:
|
|
20
|
+
- name: add "needs-cmc-review" label
|
|
21
|
+
uses: actions/github-script@v7
|
|
22
|
+
with:
|
|
23
|
+
script: |
|
|
24
|
+
const labelName = 'needs-cmc-review';
|
|
25
|
+
|
|
26
|
+
// ensure the label exists, or create it
|
|
27
|
+
try {
|
|
28
|
+
await github.rest.issues.getLabel({
|
|
29
|
+
owner: context.repo.owner,
|
|
30
|
+
repo: context.repo.repo,
|
|
31
|
+
name: labelName,
|
|
32
|
+
});
|
|
33
|
+
} catch (error) {
|
|
34
|
+
if (error.status === 404) {
|
|
35
|
+
await github.rest.issues.createLabel({
|
|
36
|
+
owner: context.repo.owner,
|
|
37
|
+
repo: context.repo.repo,
|
|
38
|
+
name: labelName,
|
|
39
|
+
color: 'fbca04',
|
|
40
|
+
description: 'PR touches cosmic core settings and needs CMC review',
|
|
41
|
+
});
|
|
42
|
+
} else {
|
|
43
|
+
throw error;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// add the label to the PR
|
|
48
|
+
await github.rest.issues.addLabels({
|
|
49
|
+
owner: context.repo.owner,
|
|
50
|
+
repo: context.repo.repo,
|
|
51
|
+
issue_number: context.issue.number,
|
|
52
|
+
labels: [labelName],
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
- name: comment to request CMC review
|
|
56
|
+
uses: actions/github-script@v7
|
|
57
|
+
with:
|
|
58
|
+
script: |
|
|
59
|
+
const body = `
|
|
60
|
+
🚨 **CMC review requested**
|
|
61
|
+
|
|
62
|
+
This pull request modifies one or more of the following files:
|
|
63
|
+
|
|
64
|
+
- \`src/cosmic/utils.py\`
|
|
65
|
+
- \`docs/cosmic-settings.json\`
|
|
66
|
+
- \`src/cosmic/evolve.py\`
|
|
67
|
+
|
|
68
|
+
A CMC developer should review this PR to ensure corresponding changes are propagated upstream as needed.
|
|
69
|
+
`;
|
|
70
|
+
|
|
71
|
+
await github.rest.issues.createComment({
|
|
72
|
+
owner: context.repo.owner,
|
|
73
|
+
repo: context.repo.repo,
|
|
74
|
+
issue_number: context.issue.number,
|
|
75
|
+
body,
|
|
76
|
+
});
|
|
@@ -12,7 +12,7 @@ jobs:
|
|
|
12
12
|
strategy:
|
|
13
13
|
fail-fast: false
|
|
14
14
|
matrix:
|
|
15
|
-
python-version: ['3.
|
|
15
|
+
python-version: ['3.10', '3.11', '3.12', '3.13']
|
|
16
16
|
|
|
17
17
|
steps:
|
|
18
18
|
- uses: actions/checkout@v4
|
|
@@ -32,19 +32,16 @@ jobs:
|
|
|
32
32
|
${{ runner.os }}-
|
|
33
33
|
- name: Install dependencies and package
|
|
34
34
|
run: |
|
|
35
|
+
# upgrade apt-get and install system dependencies
|
|
35
36
|
sudo apt-get update
|
|
36
37
|
sudo apt-get install gfortran swig libhdf5-serial-dev meson python3-dev
|
|
38
|
+
|
|
39
|
+
# upgrade pip and install dependencies
|
|
40
|
+
python -m pip install -U pip setuptools wheel packaging flake8
|
|
37
41
|
pip install numpy ninja pytest
|
|
38
42
|
pip install -r requirements.txt
|
|
39
43
|
python -m pip install .
|
|
40
44
|
|
|
41
|
-
- name: Lint with flake8
|
|
42
|
-
run: |
|
|
43
|
-
# stop the build if there are Python syntax errors or undefined names
|
|
44
|
-
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics --exclude docs
|
|
45
|
-
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
|
|
46
|
-
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics --exclude docs,versioneer.py,cosmic/_version.py,cosmic/tests,cosmic/*/__init__.py
|
|
47
|
-
|
|
48
45
|
- name: Test with pytest
|
|
49
46
|
run: |
|
|
50
47
|
bash ci/compile_benchmark.sh
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: cosmic-popsynth
|
|
3
|
-
Version: 3.6.
|
|
3
|
+
Version: 3.6.2
|
|
4
4
|
Summary: a Python-interfaced binary population synthesis suite
|
|
5
5
|
Author: Scott Coughlin, Michael Zevin, Carl L. Rodriguez, Tom Wagg
|
|
6
6
|
Author-Email: Katelyn Breivik <katie.breivik@gmail.com>
|
|
@@ -11,7 +11,7 @@ Classifier: Intended Audience :: Science/Research
|
|
|
11
11
|
Classifier: License :: OSI Approved :: MIT License
|
|
12
12
|
Classifier: Operating System :: OS Independent
|
|
13
13
|
Classifier: Programming Language :: Python
|
|
14
|
-
Requires-Python: >=3.
|
|
14
|
+
Requires-Python: >=3.10
|
|
15
15
|
Requires-Dist: numpy
|
|
16
16
|
Requires-Dist: scipy
|
|
17
17
|
Requires-Dist: astropy
|
|
@@ -22,7 +22,6 @@ Requires-Dist: tables
|
|
|
22
22
|
Requires-Dist: h5py
|
|
23
23
|
Requires-Dist: schwimmbad
|
|
24
24
|
Requires-Dist: matplotlib
|
|
25
|
-
Requires-Dist: importlib-metadata
|
|
26
25
|
Description-Content-Type: text/markdown
|
|
27
26
|
|
|
28
27
|
# COSMIC
|
|
@@ -11,29 +11,26 @@
|
|
|
11
11
|
##############################################################################
|
|
12
12
|
# IMPORT ALL NECESSARY PYTHON PACKAGES
|
|
13
13
|
##############################################################################
|
|
14
|
-
from collections import OrderedDict
|
|
15
|
-
import warnings
|
|
16
14
|
import argparse
|
|
17
15
|
import schwimmbad
|
|
18
16
|
|
|
19
|
-
import math
|
|
20
|
-
import random
|
|
21
17
|
import time
|
|
22
18
|
from time import sleep
|
|
23
|
-
import string
|
|
24
|
-
import os.path
|
|
25
19
|
import json
|
|
26
20
|
|
|
27
21
|
import numpy as np
|
|
28
|
-
import scipy.special as ss
|
|
29
22
|
import pandas as pd
|
|
23
|
+
from pandas.errors import PerformanceWarning
|
|
30
24
|
import warnings
|
|
25
|
+
import h5py as h5
|
|
31
26
|
|
|
32
27
|
from cosmic.sample.initialbinarytable import InitialBinaryTable
|
|
33
28
|
from cosmic import Match, utils
|
|
34
29
|
from cosmic.evolve import Evolve
|
|
30
|
+
from cosmic._version import __version__
|
|
35
31
|
|
|
36
|
-
from schwimmbad import
|
|
32
|
+
from schwimmbad import MPIPool
|
|
33
|
+
from os import sys
|
|
37
34
|
|
|
38
35
|
def str2bool(v):
|
|
39
36
|
if isinstance(v, bool):
|
|
@@ -110,9 +107,9 @@ def parse_commandline():
|
|
|
110
107
|
parser.add_argument("--binary_state", nargs='+', type=int)
|
|
111
108
|
parser.add_argument("--sampling_method")
|
|
112
109
|
parser.add_argument("--primary_model", help="Chooses the initial primary mass function from: salpeter55, kroupa93, kroupa01", type=str)
|
|
113
|
-
parser.add_argument("--binfrac_model", help="Chooses the binary fraction model from: a float between [0,1], vanHaaften, and
|
|
110
|
+
parser.add_argument("--binfrac_model", help="Chooses the binary fraction model from: a float between [0,1], vanHaaften, and offner23", type=binfrac_type)
|
|
114
111
|
parser.add_argument("--ecc_model", help="Chooses the initial eccentricity distribution model from: thermal, uniform, and sana12", type=str)
|
|
115
|
-
parser.add_argument("--porb_model", help="Chooses the initial orbital period distribution model from: log_uniform and
|
|
112
|
+
parser.add_argument("--porb_model", help="Chooses the initial orbital period distribution model from: log_uniform, sana12, renzo19, raghavan10, moe19, and martinez26", type=str)
|
|
116
113
|
parser.add_argument("--SF_start", help="Sets the time in the past when star formation initiates in Myr", type=float)
|
|
117
114
|
parser.add_argument("--SF_duration", help="Sets the duration of constant star formation in Myr", type=float)
|
|
118
115
|
parser.add_argument("--metallicity", type=float)
|
|
@@ -243,10 +240,12 @@ if __name__ == '__main__':
|
|
|
243
240
|
kstar2_range = args.final_kstar2
|
|
244
241
|
kstar2_range_string = str(int(args.final_kstar2[0]))
|
|
245
242
|
|
|
243
|
+
dat_store_fname = 'dat_kstar1_{0}_kstar2_{1}_SFstart_{2}_SFduration_{3}_metallicity_{4}.h5'.format(kstar1_range_string, kstar2_range_string, sampling['SF_start'], sampling['SF_duration'], sampling['metallicity'])
|
|
246
244
|
# Open the hdf5 file to store the fixed population data
|
|
247
245
|
try:
|
|
248
|
-
|
|
249
|
-
|
|
246
|
+
with pd.HDFStore(dat_store_fname,complib=args.complib,complevel=args.complevel) as dat_store:
|
|
247
|
+
# If the file exists, we will read it and continue from where we left off
|
|
248
|
+
conv_save = pd.read_hdf(dat_store, 'conv')
|
|
250
249
|
log_file = open('log_kstar1_{0}_kstar2_{1}_SFstart_{2}_SFduration_{3}_metallicity_{4}.txt'.format(kstar1_range_string, kstar2_range_string, sampling['SF_start'], sampling['SF_duration'], sampling['metallicity']), 'a')
|
|
251
250
|
log_file.write('There are already: '+str(conv_save.shape[0])+' '+kstar1_range_string+'_'+kstar2_range_string+' binaries evolved\n')
|
|
252
251
|
log_file.write('\n')
|
|
@@ -258,8 +257,8 @@ if __name__ == '__main__':
|
|
|
258
257
|
total_n_stars = np.max(pd.read_hdf(dat_store, 'n_stars'))[0]
|
|
259
258
|
idx = int(np.max(pd.read_hdf(dat_store, 'idx'))[0])
|
|
260
259
|
except:
|
|
260
|
+
#dat_store = pd.HDFStore('dat_kstar1_{0}_kstar2_{1}_SFstart_{2}_SFduration_{3}_metallicity_{4}.h5'.format(kstar1_range_string, kstar2_range_string, sampling['SF_start'], sampling['SF_duration'], sampling['metallicity']),complib=args.complib,complevel=args.complevel)
|
|
261
261
|
conv_save = pd.DataFrame()
|
|
262
|
-
dat_store = pd.HDFStore('dat_kstar1_{0}_kstar2_{1}_SFstart_{2}_SFduration_{3}_metallicity_{4}.h5'.format(kstar1_range_string, kstar2_range_string, sampling['SF_start'], sampling['SF_duration'], sampling['metallicity']),complib=args.complib,complevel=args.complevel)
|
|
263
262
|
total_mass_singles = 0
|
|
264
263
|
total_mass_binaries = 0
|
|
265
264
|
total_mass_stars = 0
|
|
@@ -269,14 +268,11 @@ if __name__ == '__main__':
|
|
|
269
268
|
idx = 0
|
|
270
269
|
log_file = open('log_kstar1_{0}_kstar2_{1}_SFstart_{2}_SFduration_{3}_metallicity_{4}.txt'.format(kstar1_range_string, kstar2_range_string, sampling['SF_start'], sampling['SF_duration'], sampling['metallicity']), 'w')
|
|
271
270
|
|
|
272
|
-
# save configuration settings to output file
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
for k1, v1 in v.items():
|
|
278
|
-
dat_store.put('config/{0}/{1}/'.format(k, k1), pd.Series(v1))
|
|
279
|
-
dat_store.put('config/rand_seed/', pd.Series(seed_int))
|
|
271
|
+
# save configuration settings and COSMIC version to output file
|
|
272
|
+
with h5.File(dat_store_fname, 'a') as f:
|
|
273
|
+
f["config"] = json.dumps({'BSEDict' : BSEDict, 'filters' : filters, 'convergence' : convergence,
|
|
274
|
+
'sampling' : sampling, 'rand_seed': seed_int})
|
|
275
|
+
f.attrs['COSMIC_version'] = __version__
|
|
280
276
|
|
|
281
277
|
# Initialize the step counter and convergence array/list
|
|
282
278
|
Nstep = idx - np.mod(idx, args.Nstep)
|
|
@@ -304,6 +300,9 @@ if __name__ == '__main__':
|
|
|
304
300
|
|
|
305
301
|
# Select the initial binary sample method from user input
|
|
306
302
|
if sampling['sampling_method'] == 'independent':
|
|
303
|
+
if hasattr(args,'qmin') and hasattr(args,'m2_min'):
|
|
304
|
+
raise ValueError("You cannot specify both qmin and m2_min in the inifile if you are using the independent sampler. Please choose one or the other.")
|
|
305
|
+
# If qmin is specified, use it to sample the initial binary table
|
|
307
306
|
if hasattr(args,'qmin'):
|
|
308
307
|
init_samp_list = InitialBinaryTable.sampler(format_ = sampling['sampling_method'],
|
|
309
308
|
final_kstar1 = kstar1_range,
|
|
@@ -319,6 +318,7 @@ if __name__ == '__main__':
|
|
|
319
318
|
size = args.Nstep,
|
|
320
319
|
qmin = args.qmin,
|
|
321
320
|
params = args.inifile)
|
|
321
|
+
# if m2_min is specified, use it to sample the initial binary table
|
|
322
322
|
elif hasattr(args,'m2_min'):
|
|
323
323
|
init_samp_list = InitialBinaryTable.sampler(format_ = sampling['sampling_method'],
|
|
324
324
|
final_kstar1 = kstar1_range,
|
|
@@ -343,14 +343,15 @@ if __name__ == '__main__':
|
|
|
343
343
|
init_samp_list = InitialBinaryTable.sampler(format_ = sampling['sampling_method'],
|
|
344
344
|
final_kstar1 = kstar1_range,
|
|
345
345
|
final_kstar2 = kstar2_range,
|
|
346
|
-
keep_singles = args.keep_singles,
|
|
347
346
|
rand_seed = rand_seed,
|
|
348
347
|
nproc = args.nproc,
|
|
349
348
|
SF_start = sampling['SF_start'],
|
|
350
349
|
SF_duration = sampling['SF_duration'],
|
|
351
350
|
met = sampling['metallicity'],
|
|
352
351
|
size = args.Nstep,
|
|
353
|
-
pool=pool
|
|
352
|
+
pool=pool,
|
|
353
|
+
keep_singles = args.keep_singles
|
|
354
|
+
)
|
|
354
355
|
IBT, mass_singles, mass_binaries, n_singles, n_binaries = init_samp_list
|
|
355
356
|
|
|
356
357
|
# Log the total sampled mass from the initial binary sample
|
|
@@ -387,17 +388,33 @@ if __name__ == '__main__':
|
|
|
387
388
|
dtp=dtp,
|
|
388
389
|
timestep_conditions=filters['timestep_conditions'])
|
|
389
390
|
|
|
391
|
+
# extract single stars
|
|
392
|
+
|
|
393
|
+
if (args.keep_singles==True):
|
|
394
|
+
singles_bin_num = initCond.loc[initCond.kstar_2 == 15].bin_num.unique()
|
|
395
|
+
# get the singles from the bcm and bpp arrays
|
|
396
|
+
bcm_singles = bcm.loc[bcm.bin_num.isin(singles_bin_num)]
|
|
397
|
+
bpp_singles = bpp.loc[bpp.bin_num.isin(singles_bin_num)]
|
|
398
|
+
initCond_singles = initCond.loc[initCond.bin_num.isin(singles_bin_num)]
|
|
399
|
+
kick_info_singles = kick_info.loc[kick_info.bin_num.isin(singles_bin_num)]
|
|
400
|
+
|
|
401
|
+
bpp = bpp.loc[~bpp.bin_num.isin(singles_bin_num)]
|
|
402
|
+
bcm = bcm.loc[~bcm.bin_num.isin(singles_bin_num)]
|
|
403
|
+
initCond = initCond.loc[~initCond.bin_num.isin(singles_bin_num)]
|
|
404
|
+
kick_info = kick_info.loc[~kick_info.bin_num.isin(singles_bin_num)]
|
|
390
405
|
# get any nans and pull them out for now
|
|
391
406
|
nans = np.isnan(bpp.sep)
|
|
392
407
|
if nans.any():
|
|
393
408
|
nan_bin_nums = np.unique(bpp[nans]["bin_num"].values)
|
|
394
409
|
initCond_nan = initCond.loc[initCond.bin_num.isin(nan_bin_nums)]
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
log_file.write(f"
|
|
410
|
+
with pd.HDFStore(dat_store_fname,complib=args.complib,complevel=args.complevel) as dat_store:
|
|
411
|
+
if pd.__version__<="2.0.0":
|
|
412
|
+
dat_store.append("nan_initC", initCond_nan)
|
|
413
|
+
else:
|
|
414
|
+
dat_store["nan_initC"] = initCond_nan
|
|
415
|
+
log_file.write(f"There are {len(nan_bin_nums)} NaNs stored in the datfile with key: 'nan_initC'\n")
|
|
416
|
+
log_file.write(f"You might want to check them out carefully to see if there is something that impacts your results\n")
|
|
417
|
+
#log_file.write(f"These NaNs likely arise because you have pts1 = 0.001, try running with pts1 = 0.01")
|
|
401
418
|
|
|
402
419
|
bcm = bcm.loc[~bcm.bin_num.isin(nan_bin_nums)]
|
|
403
420
|
bpp = bpp.loc[~bpp.bin_num.isin(nan_bin_nums)]
|
|
@@ -410,6 +427,8 @@ if __name__ == '__main__':
|
|
|
410
427
|
# If dtp is not set, filter out first timestep in bcm
|
|
411
428
|
if np.all(dtp == IBT['tphysf'].values):
|
|
412
429
|
bcm = bcm.loc[bcm['tphys'].isin(dtp)]
|
|
430
|
+
if (args.keep_singles==True):
|
|
431
|
+
bcm_singles = bcm_singles.loc[bcm_singles['tphys'].isin(dtp)]
|
|
413
432
|
|
|
414
433
|
# Now get the converging population and bin_nums for conv systems whic
|
|
415
434
|
# satisfy the convergence_limits
|
|
@@ -417,6 +436,9 @@ if __name__ == '__main__':
|
|
|
417
436
|
kstar1_range, kstar2_range,
|
|
418
437
|
convergence['pop_select'],
|
|
419
438
|
convergence['convergence_limits'])
|
|
439
|
+
if (args.keep_singles==True):
|
|
440
|
+
conv_singles_filter = utils.conv_select_singles(bcm_singles, bpp_singles, kstar1_range)
|
|
441
|
+
|
|
420
442
|
if conv_filter.empty:
|
|
421
443
|
warnings.warn("After filtering for desired convegence systems there were no systems matching your request. It is possible you are suggesting incompatible bin_state choices and pop_select, e.g. bin_state=[0,1], pop_select='disruption'")
|
|
422
444
|
log_file.write("After filtering for desired convegence systems there were no systems matching your request. It is possible you are suggesting incompatible bin_state choices and pop_select, e.g. bin_state=[0,1], pop_select='disruption'")
|
|
@@ -426,6 +448,12 @@ if __name__ == '__main__':
|
|
|
426
448
|
initC_filter = initCond.loc[initCond.bin_num.isin(conv_filter.bin_num)]
|
|
427
449
|
kick_info_filter = kick_info.loc[kick_info.bin_num.isin(conv_filter.bin_num)]
|
|
428
450
|
|
|
451
|
+
if (args.keep_singles==True):
|
|
452
|
+
bpp_singles_filter = bpp_singles.loc[bpp_singles.bin_num.isin(conv_singles_filter.bin_num)]
|
|
453
|
+
bcm_singles_filter = bcm_singles.loc[bcm_singles.bin_num.isin(conv_singles_filter.bin_num)]
|
|
454
|
+
initC_singles_filter = initCond_singles.loc[initCond_singles.bin_num.isin(conv_singles_filter.bin_num)]
|
|
455
|
+
kick_info_singles_filter = kick_info_singles.loc[kick_info_singles.bin_num.isin(conv_singles_filter.bin_num)]
|
|
456
|
+
|
|
429
457
|
# Filter the bin_state based on user specified filters
|
|
430
458
|
bcm_filter, bin_state_nums = utils.filter_bin_state(bcm_filter, bpp_filter, filters, kstar1_range, kstar2_range)
|
|
431
459
|
if bcm_filter.empty:
|
|
@@ -444,19 +472,17 @@ if __name__ == '__main__':
|
|
|
444
472
|
conv_filter = conv_filter.loc[conv_filter.bin_num.isin(conv_lims_bin_num)]
|
|
445
473
|
|
|
446
474
|
# Filter the bcm and bpp arrays according to user specified filters
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
conv_filter_match = pd.concat([conv_filter_match,conv_filter.loc[conv_filter.bin_num.isin(conv_lims_bin_num)]], ignore_index=True)
|
|
459
|
-
|
|
475
|
+
bcm_filter_match = bcm_filter.copy()
|
|
476
|
+
bpp_filter_match = bpp_filter.copy()
|
|
477
|
+
initC_filter_match = initC_filter.copy()
|
|
478
|
+
conv_filter_match = conv_filter.copy()
|
|
479
|
+
kick_info_filter_match = kick_info_filter.copy()
|
|
480
|
+
if (args.keep_singles==True):
|
|
481
|
+
conv_singles_filter_match = conv_singles_filter.copy()
|
|
482
|
+
bpp_singles_filter_match = bpp_singles_filter.copy()
|
|
483
|
+
bcm_singles_filter_match = bcm_singles_filter.copy()
|
|
484
|
+
initC_filter_singles_match = initC_singles_filter.copy()
|
|
485
|
+
kick_info_singles_filter_match = kick_info_singles_filter.copy()
|
|
460
486
|
|
|
461
487
|
if len(conv_filter_match) >= np.min([50, args.Niter]):
|
|
462
488
|
conv_save = pd.concat([conv_save, pd.DataFrame(conv_filter_match)], ignore_index=True)
|
|
@@ -478,9 +504,20 @@ if __name__ == '__main__':
|
|
|
478
504
|
# write the data and the logs!
|
|
479
505
|
mass_list = [total_mass_singles, total_mass_binaries, total_mass_stars]
|
|
480
506
|
n_list = [total_n_singles, total_n_binaries, total_n_stars]
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
507
|
+
|
|
508
|
+
# write the data to the dat_store
|
|
509
|
+
with pd.HDFStore(dat_store_fname,complib=args.complib,complevel=args.complevel) as dat_store:
|
|
510
|
+
if (args.keep_singles==True):
|
|
511
|
+
utils.pop_write(dat_store, log_file, mass_list, n_list, bcm_filter_match,
|
|
512
|
+
bpp_filter_match, initC_filter_match, conv_filter_match, kick_info_filter_match,
|
|
513
|
+
bin_state_nums, match_save, idx,
|
|
514
|
+
conv_singles=conv_singles_filter_match, bcm_singles=bcm_singles_filter_match,
|
|
515
|
+
bpp_singles=bpp_singles_filter_match, initC_singles=initC_filter_singles_match,
|
|
516
|
+
kick_info_singles=kick_info_singles_filter_match)
|
|
517
|
+
else:
|
|
518
|
+
utils.pop_write(dat_store, log_file, mass_list, n_list, bcm_filter_match,
|
|
519
|
+
bpp_filter_match, initC_filter_match, conv_filter_match, kick_info_filter_match,
|
|
520
|
+
bin_state_nums, match_save, idx)
|
|
484
521
|
|
|
485
522
|
# reset the bcm_filter DataFrame
|
|
486
523
|
bcm_filter_match = []
|
|
@@ -488,12 +525,20 @@ if __name__ == '__main__':
|
|
|
488
525
|
initC_filter_match = []
|
|
489
526
|
conv_filter_match = []
|
|
490
527
|
kick_info_filter_match = []
|
|
528
|
+
if (args.keep_singles==True):
|
|
529
|
+
conv_singles_filter_match = []
|
|
530
|
+
bpp_singles_filter_match = []
|
|
531
|
+
bcm_singles_filter_match = []
|
|
532
|
+
initC_filter_singles_match = []
|
|
533
|
+
kick_info_singles_filter_match = []
|
|
491
534
|
log_file.write('\n')
|
|
492
535
|
Nstep += args.Nstep
|
|
493
536
|
log_file.flush()
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
537
|
+
|
|
538
|
+
# close the log file and print the final message
|
|
497
539
|
log_file.write('All done friend!')
|
|
498
540
|
log_file.close()
|
|
499
541
|
|
|
542
|
+
pool.close()
|
|
543
|
+
pool.join()
|
|
544
|
+
|
|
@@ -49,4 +49,13 @@ See the discussed changes in our previous releases here: https://github.com/COSM
|
|
|
49
49
|
- Bug fix: Changed `kick.f` to use the Pfahl+02 kick prescription by default instead of Kiel & Hurley 2009, this fixes ejection velocities of secondaries and also changed kick_info to have an extra column
|
|
50
50
|
|
|
51
51
|
## 3.6.0
|
|
52
|
-
- Overhaul documentation and added debugging environment
|
|
52
|
+
- Overhaul documentation and added debugging environment
|
|
53
|
+
- Feature: Added Disberg+2025 kick prescription as a new choice of `kickflag` (`kickflag=5`). Applies log-normal distribution to regular CCSN, ECSN/USSN still use `sigmadiv` Maxwellian and BH fallback scaling is still applied via `bhflag` and `bhsigmafrac` as with `kickflag=1`
|
|
54
|
+
|
|
55
|
+
## 3.6.1
|
|
56
|
+
- Add support for single stars in both independent and multidim sampling
|
|
57
|
+
- update documentation
|
|
58
|
+
|
|
59
|
+
## 3.6.2
|
|
60
|
+
- Add functions to `cosmic.utils` for initC IO that's more efficient (`save_initC`, `load_initC`) by saving
|
|
61
|
+
identical setting columns separately with only one copy - saves ~1kb per binary
|
|
@@ -99,7 +99,7 @@ def construct_ini_from_json(config, include_comments=True):
|
|
|
99
99
|
|
|
100
100
|
def main():
|
|
101
101
|
# read the config file
|
|
102
|
-
with open("cosmic-settings.json") as f:
|
|
102
|
+
with open("../src/cosmic/data/cosmic-settings.json") as f:
|
|
103
103
|
config = json.load(f)
|
|
104
104
|
|
|
105
105
|
# convert it to an INI file, replace HTML tags and save the output
|
|
@@ -46,7 +46,7 @@ settings_template = """<div class="setting">
|
|
|
46
46
|
option_template = """<li><code class="docutils literal notranslate"><span class="pre opt-val"></span></code>: <span class="opt-desc"></span></li>"""
|
|
47
47
|
|
|
48
48
|
# read the settings file
|
|
49
|
-
with open("cosmic-settings.json") as f:
|
|
49
|
+
with open("../src/cosmic/data/cosmic-settings.json") as f:
|
|
50
50
|
settings = json.load(f)
|
|
51
51
|
|
|
52
52
|
# go through each major settings group
|