@@ -144,14 +144,15 @@ def test_binwidth_selector(self):
144
144
self .assertTrue (bw .round (3 ) == BW_KNUTH )
145
145
146
146
def test_error_check (self ):
147
- BSEDict = {'xi' : 0.5 , 'bhflag' : 1 , 'neta' : 0.5 , 'windflag' : 3 , 'rtmsflag' : 0 , 'wdflag' : 0 , 'alpha1' : 1.0 , 'pts1' : 0.05 , 'pts3' : 0.02 , 'pts2' : 0.01 , 'epsnov' : 0.001 , 'hewind' : 1.0 , 'ck' : 1000 , 'bwind' : 0.0 , 'lambdaf' : 0.5 , 'mxns' : 3.0 , 'beta' : - 1.0 , 'tflag' : 1 , 'acc2' : 1.5 , 'nsflag' : 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.5 , 'ecsn_mlow' : 1.4 , 'aic' : 1 , 'ussn' : 0 , 'sigmadiv' :- 20.0 , 'qcflag' : 3 , '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 ], 'rembar_massloss' : 0.5 , 'zsun' : 0.02 , 'kickflag' : 0 , 'grflag' : 1 , 'acc_lim' : - 1 , 'don_lim' : - 1 }
147
+ BSEDict = {'xi' : 0.5 , 'bhflag' : 1 , 'neta' : 0.5 , 'windflag' : 3 , 'rtmsflag' : 0 , 'wdflag' : 0 , 'alpha1' : [1.0 , 1.0 ], 'pts1' : 0.05 , 'pts3' : 0.02 , 'pts2' : 0.01 , 'epsnov' : 0.001 , 'hewind' : 1.0 , 'ck' : 1000 , 'bwind' : 0.0 , 'lambdaf' : 0.5 , 'mxns' : 3.0 , 'beta' : - 1.0 , 'tflag' : 1 , 'acc2' : 1.5 , 'nsflag' : 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.5 , 'ecsn_mlow' : 1.4 , 'aic' : 1 , 'ussn' : 0 , 'sigmadiv' :- 20.0 , 'qcflag' : 3 , '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 ], 'rembar_massloss' : 0.5 , 'zsun' : 0.02 , 'kickflag' : 0 , 'grflag' : 1 , 'acc_lim' : [- 1 , - 1 ], 'don_lim' : - 1 }
148
+ SSEDict = {'stellar_engine' : 'sse' }
148
149
filters = {'binary_state' : [0 ], 'timestep_conditions' : 'dtp=None' }
149
150
convergence = {'convergence_params' : ['mass_1' , 'mass_2' , 'sep' , 'ecc' ], 'pop_select' : 'formation' ,\
150
151
'match' : - 5.0 , 'convergence_limits' : {"sep" : [0 ,1000 ]}, 'match' : - 3.0 ,\
151
152
'apply_convergence_limits' : True }
152
153
sampling = {'sampling_method' : 'multidim' , 'SF_start' : '13700.0' , 'SF_duration' : 0.0 , 'metallicity' : 0.02 , 'keep_singles' : False }
153
- utils .error_check (BSEDict ,filters ,convergence ,sampling )
154
- utils .error_check (BSEDict )
154
+ utils .error_check (BSEDict ,SSEDict , filters ,convergence ,sampling )
155
+ utils .error_check (BSEDict , SSEDict )
155
156
assert 1 == 1
156
157
157
158
def test_warning_check (self ):
@@ -160,7 +161,7 @@ def test_warning_check(self):
160
161
161
162
def test_no_RL_check_for_singles (self ):
162
163
"""Make sure you don't get a divide by zero error when checking for Roche Lobe Overflow"""
163
- BSEDict = {'xi' : 1.0 , 'bhflag' : 1 , 'neta' : 0.5 , 'windflag' : 3 , 'wdflag' : 1 , 'alpha1' : 1.0 ,
164
+ BSEDict = {'xi' : 1.0 , 'bhflag' : 1 , 'neta' : 0.5 , 'windflag' : 3 , 'wdflag' : 1 , 'alpha1' : [ 1.0 , 1.0 ] ,
164
165
'pts1' : 0.001 , 'pts3' : 0.02 , 'pts2' : 0.01 , 'epsnov' : 0.001 , 'hewind' : 0.5 ,
165
166
'ck' : 1000 , 'bwind' : 0.0 , 'lambdaf' : 0.0 , 'mxns' : 3.0 , 'beta' : - 1.0 , 'tflag' : 1 ,
166
167
'acc2' : 1.5 , 'grflag' : 1 , 'remnantflag' : 4 , 'ceflag' : 0 , 'eddfac' : 1.0 ,
@@ -177,8 +178,10 @@ def test_no_RL_check_for_singles(self):
177
178
2.0 / 21.0 , 2.0 / 21.0 , 2.0 / 21.0 , 2.0 / 21.0 ],
178
179
'bhspinflag' : 0 , 'bhspinmag' : 0.0 , 'rejuv_fac' : 1.0 , 'rejuvflag' : 0 , 'htpmb' : 1 ,
179
180
'ST_cr' : 1 , 'ST_tide' : 1 , 'bdecayfac' : 1 , 'rembar_massloss' : 0.5 , 'kickflag' : 0 ,
180
- 'zsun' : 0.014 , 'bhms_coll_flag' : 0 , 'don_lim' : - 1 , 'acc_lim' : - 1 ,
181
+ 'zsun' : 0.014 , 'bhms_coll_flag' : 0 , 'don_lim' : - 1 , 'acc_lim' : [ - 1 , - 1 ] ,
181
182
'rtmsflag' : 0 , 'wd_mass_lim' : 1 }
183
+
184
+ SSEDict = {'stellar_engine' : 'sse' }
182
185
183
186
initial_binaries = InitialBinaryTable .sampler ('independent' , np .linspace (0 , 15 , 16 ), np .linspace (0 , 15 , 16 ),
184
187
binfrac_model = 0.5 , SF_start = 10.0 ,
@@ -188,7 +191,7 @@ def test_no_RL_check_for_singles(self):
188
191
189
192
with warnings .catch_warnings ():
190
193
warnings .simplefilter ("error" )
191
- Evolve .evolve (initialbinarytable = initial_binaries , BSEDict = BSEDict )
194
+ Evolve .evolve (initialbinarytable = initial_binaries , BSEDict = BSEDict , SSEDict = SSEDict )
192
195
193
196
def test_convert_kstar_evol_type (self ):
194
197
# convert to string
0 commit comments