-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* offner22 primary mass dependent binary fraction (#644) * added offner22 primary mass dependent binary fraction * pinning numpy version because of new numpy version released on june 16 (https://stackoverflow.com/questions/78634235/numpy-dtype-size-changed-may-indicate-binary-incompatibility-expected-96-from) * pinned numpy version so 3.7 works --------- Co-authored-by: katiebreivik <kbreivik@flatironinstitute.org> * Update utils.py (#648) * Update utils.py fix trapezoid import * Update utils.py missed one trapz * version bump and dropping below python3.9 (#653) * version bump and dropping below python3.9 * forward to numpy 1.26.0 * trying a different version * fix trapz import * Update build_wheels_and_publish.yml explicitly install gcc * Update build_wheels_and_publish.yml trying to fix gfortran * Update build_wheels_and_publish.yml specifying path with symlink, checking path * Update build_wheels_and_publish.yml (#654) * Update build_wheels_and_publish.yml * Update _version.py * Update meson.build * Update pyproject.toml (#655) * Version bump for pip (#656) * Update meson.build * Update _version.py * Add power law sampling options for ``porb`` and ``q`` (#651) * add `q_power_law` parameter to change the power law of the mass ratio distribution * allow custom power laws for orbital periods * add mass ratio sampling test * add test for custom porb power laws * add to changelog * New ``gamma`` option for circumbinary discs (#652) * add new gamma prescription, add some int() statements * add details to docs page * update ini files * * Modifying the init file to include the commit hash. (#659) *Created get_commit_hash file that finds the commit hash. *Modified the meson.build file to run get_commit_hash when cosmic is installed. * Created maximum wall time option (#620) * Added compression options for pandas * Created maximum wall time argument * Add debugging setup, avoid NaNs from timestep issue (#647) * setup debugging environment * ignore a bunch of files * add a testing fortran script * move debugging to its own folder * add a python script for creating the input * add a simple makefile for testing * important change: use `loop` instead of `1000` for timestep condition * add a note about settings * clean up vscode setup * I can't count 🙃 * added new test suite location * fixing numpy pinned version * forcing numpy version I guess --------- Co-authored-by: katiebreivik <kbreivik@flatironinstitute.org> Co-authored-by: Katie Breivik <kbreivik@andrew.cmu.edu> * allow a gamma of -3 in error_check (#661) * fixing wheel build for pypi, hopefully * tiny version bump (#665) * Update _version.py * Update pyproject.toml add @TomWagg as dev * Update meson.build bump version * Update build_wheels_and_publish.yml * Update build_wheels_and_publish.yml removing gfortran symlink * Update build_wheels_and_publish.yml * Update build_wheels_and_publish.yml (#666) * Update build_wheels_and_publish.yml * this should be a working build. * add meson to requirements * Fixing linux only wheel (#667) * Update build_wheels_and_publish.yml * adding in python versions * Update build_wheels_and_publish.yml * Update meson.build * Update meson.build * Update pyproject.toml * Pip fix (#669) * add DS_Store to ignore * finalllllly got the platform specific wheels built with a pure: false * tiny bump in version for tag * Update build_wheels_and_publish.yml need to repair linux build with cibuildwheel for PyPI * Update meson.build forgot to bump version here * build wheels and publish fix (#670) * pins cibuildwheel==2.17.0 so that we can build across macOS versions. * allow push to pypi * add x_86 and arch compatibility for wheels (#671) * Update build_wheels_and_publish.yml * Update build_wheels_and_publish.yml * Update meson.build version * Update _version.py version * Update pyproject.toml version * Bump actions/download-artifact from 3 to 4.1.7 in /.github/workflows (#672) Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 3 to 4.1.7. - [Release notes](https://github.com/actions/download-artifact/releases) - [Commits](actions/download-artifact@v3...v4.1.7) --- updated-dependencies: - dependency-name: actions/download-artifact dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: MarkGM02 <90350113+MarkGM02@users.noreply.github.com> Co-authored-by: Tom Wagg <tomjwagg@gmail.com> Co-authored-by: elenagonzalez870 <52000594+elenagonzalez870@users.noreply.github.com> Co-authored-by: Vera Eris Del Favero <77068792+xevra@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
- Loading branch information
1 parent
fdd418b
commit 2159a11
Showing
28 changed files
with
725 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "(gdb) Launch", | ||
"type": "cppdbg", | ||
"request": "launch", | ||
"program": "${workspaceRoot}/debug/test", | ||
"args": [], | ||
"stopAtEntry": false, | ||
"cwd": "${workspaceRoot}/debug", | ||
"environment": [], | ||
"externalConsole": false, | ||
"MIMode": "gdb", | ||
"preLaunchTask": "make", | ||
"setupCommands": [ | ||
{ | ||
"description": "Enable pretty-printing for gdb", | ||
"text": "-enable-pretty-printing", | ||
"ignoreFailures": true | ||
}, | ||
{ | ||
"description": "Set Disassembly Flavor to Intel", | ||
"text": "-gdb-set disassembly-flavor intel", | ||
"ignoreFailures": true | ||
} | ||
] | ||
}, | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"label": "make", | ||
"type": "shell", | ||
"command": "make test", | ||
"options": { | ||
"cwd": "${workspaceFolder}/cosmic/src" | ||
}, | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
import pandas as pd | ||
|
||
BSE_settings = {'xi': 1.0, 'bhflag': 1, 'neta': 0.5, 'windflag': 3, 'wdflag': 1, 'alpha1': 1.0, | ||
'pts1': 0.001, 'pts3': 0.02, 'pts2': 0.01, 'epsnov': 0.001, 'hewind': 0.5, | ||
'ck': 1000, 'bwind': 0.0, 'lambdaf': 0.0, 'mxns': 3.0, 'beta': -1.0, 'tflag': 1, | ||
'acc2': 1.5, 'grflag': 1, 'remnantflag': 4, 'ceflag': 0, 'eddfac': 1.0, | ||
'ifflag': 0, 'bconst': 3000, 'sigma': 265.0, 'gamma': -2.0, 'pisn': 45.0, | ||
'natal_kick_array': [[-100.0, -100.0, -100.0, -100.0, 0.0], | ||
[-100.0, -100.0, -100.0, -100.0, 0.0]], 'bhsigmafrac': 1.0, | ||
'polar_kick_angle': 90, 'qcrit_array': [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, | ||
0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], | ||
'cekickflag': 2, 'cehestarflag': 0, 'cemergeflag': 0, 'ecsn': 2.25, | ||
'ecsn_mlow': 1.6, 'aic': 1, 'ussn': 0, 'sigmadiv': -20.0, 'qcflag': 5, | ||
'eddlimflag': 0, 'fprimc_array': [2.0/21.0, 2.0/21.0, 2.0/21.0, 2.0/21.0, | ||
2.0/21.0, 2.0/21.0, 2.0/21.0, 2.0/21.0, | ||
2.0/21.0, 2.0/21.0, 2.0/21.0, 2.0/21.0, | ||
2.0/21.0, 2.0/21.0, 2.0/21.0, 2.0/21.0], | ||
'bhspinflag': 0, 'bhspinmag': 0.0, 'rejuv_fac': 1.0, 'rejuvflag': 0, 'htpmb': 1, | ||
'ST_cr': 1, 'ST_tide': 1, 'bdecayfac': 1, 'rembar_massloss': 0.5, 'kickflag': 0, | ||
'zsun': 0.014, 'bhms_coll_flag': 0, 'don_lim': -1, 'acc_lim': -1, 'binfrac': 0.5, | ||
'rtmsflag': 0, 'wd_mass_lim': 1, 'idum': 100} | ||
|
||
|
||
def create_binary_in(mass0, tphysf, tb, kstar, Z, ecc, BSE_settings): | ||
"""Create a binary.in file based on the given parameters | ||
This follows the format in cosmic/src/test_bse.f and changes there would need to be reflected here. | ||
""" | ||
with open('binary.in', 'w') as f: | ||
f.write(f'{mass0[0]} {mass0[1]} {tphysf} {tb} {kstar[0]} {kstar[1]} {Z} {ecc}\n') | ||
|
||
lines = [ | ||
['neta', 'bwind', 'hewind', 'alpha1', 'lambdaf', 'windflag', 'rtmsflag'], | ||
['ceflag', 'tflag', 'ifflag', 'wdflag', 'bhflag', 'remnantflag', 'mxns', 'idum'], | ||
['pts1', 'pts2', 'pts3'], | ||
['sigma', 'beta', 'xi', 'acc2', 'epsnov', 'eddfac', 'gamma'] | ||
] | ||
|
||
for line in lines: | ||
f.write(' '.join([str(BSE_settings[key]) for key in line]) + '\n') | ||
|
||
|
||
def convert_initC_row_to_binary_in(initC_file, bin_num): | ||
"""Convert a row from an initC file to a binary.in file | ||
Parameters | ||
---------- | ||
initC_file : `str` | ||
Path to the initC file | ||
bin_num : `int` | ||
The binary number to convert | ||
""" | ||
# get binary from initC | ||
initC = pd.read_hdf(initC_file, key="initC") | ||
r = initC.loc[bin_num] | ||
|
||
# update BSE settings with those in the binary | ||
BSE_settings['idum'] = r['randomseed'].astype(int) | ||
for key in BSE_settings: | ||
if key in r: | ||
BSE_settings[key] = r[key] | ||
|
||
# create binary.in file | ||
create_binary_in([r['mass_1'], r['mass_2']], r['tphysf'], r['porb'], | ||
[r['kstar_1'].astype(int), r['kstar_2'].astype(int)], | ||
r['metallicity'], r['ecc'], BSE_settings) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.