COSMIC-PopSynth / COSMIC

COSMIC (Compact Object Synthesis and Monte Carlo Investigation Code)
GNU General Public License v3.0
47 stars 59 forks source link

A IC giving Nans #457

Closed scottcoughlin2014 closed 3 years ago

scottcoughlin2014 commented 3 years ago

@katiebreivik could you check out this binary and why it gives NaNs?

The condition that gives a Nan

kstar_1,kstar_2,mass_1,mass_2,porb,ecc,metallicity,tphysf,mass0_1,mass0_2,rad_1,rad_2,lum_1,lum_2,massc_1,massc_2,radc_1,radc_2,menv_1,menv_2,renv_1,renv_2,omega_spin_1,omega_spin_2,B_1,B_2,bacc_1,bacc_2,tacc_1,tacc_2,epoch_1,epoch_2,tms_1,tms_2,bhspin_1,bhspin_2,tphys
7,1,1.1761,5.69906,0.780364,0,0.001,73.3077,1.1761,5.69906,0.239908,3.45774,454.242,1936.42,0,0,0,0,1.1761,1e-10,0.239908,1e-10,10.4184,2925.68,0,0,0,0,0,0,58.2163,4.37994,14.3918,70.7224,0,0,59.669
import pandas
from cosmic.sample.initialbinarytable import InitialBinaryTable

from cosmic.evolve import Evolve

single_binary =  pandas.read_csv("initc.csv")
single_binary["binfrac"] = 0
bpp, bcm, initC, kick_info = Evolve.evolve(initialbinarytable=single_binary, params="Params.ini")
print(bpp)
(cmc-py37) [quser21 test_8e5_no_dynamics]$ python evolve_bad_binary.py 
       tphys    mass_1    mass_2  kstar_1  kstar_2       sep      porb  ecc    RRLO_1  ...  bacc_1  bacc_2  tacc_1  tacc_2    epoch_1      epoch_2  bhspin_1  bhspin_2  bin_num
0  60.187132  1.176056  5.699036      7.0      1.0  6.734962  0.772566  0.0  0.142143  ...     0.0     0.0     0.0     0.0  58.216151     4.379483       0.0       0.0        0
0  64.597518  5.230301  1.584150      8.0      1.0  4.284555  0.393745  0.0  0.301446  ...     0.0     0.0     0.0     0.0  63.486615 -1201.837333       0.0       0.0        0
0  65.078943       NaN -0.012299      8.0      6.0       NaN       NaN  0.0       NaN  ...     0.0     0.0     0.0     0.0  63.486615          NaN       0.0       0.0        0
0  65.078943       NaN -0.012299      8.0      6.0       NaN       NaN  0.0       NaN  ...     0.0     0.0     0.0     0.0  63.486615          NaN       0.0       0.0        0
0  65.209225       NaN -0.012299      8.0      6.0       NaN       NaN  0.0       NaN  ...     0.0     0.0     0.0     0.0  63.486615          NaN       0.0       0.0        0
scottcoughlin2014 commented 3 years ago

456 fixes this!