@@ -267,6 +267,7 @@ def build_interpolator_corr(self):
267
267
# Set label references.
268
268
self .logt_idx = np .where (np .array (self .predictions ) == 'logt' )[0 ][0 ]
269
269
self .logl_idx = np .where (np .array (self .predictions ) == 'logl' )[0 ][0 ]
270
+ self .logg_idx = np .where (np .array (self .predictions ) == 'logg' )[0 ][0 ]
270
271
271
272
def get_predictions (self , labels , apply_corr = True ):
272
273
"""
@@ -308,6 +309,7 @@ def get_predictions(self, labels, apply_corr=True):
308
309
dlogt , dlogr = corrs .T
309
310
preds [:, self .logt_idx ] += dlogt
310
311
preds [:, self .logl_idx ] += 2. * dlogr
312
+ preds [:, self .logg_idx ] -= 2. * dlogr
311
313
312
314
return preds
313
315
@@ -1107,7 +1109,7 @@ def build_interpolator(self):
1107
1109
# Fill in "holes".
1108
1110
for i in range (len (self .feh_u )):
1109
1111
for j in range (len (self .loga_u )):
1110
- # Select values where one or more predictions "failed" .
1112
+ # Select values where predictions exist .
1111
1113
sel = np .all (np .isfinite (self .pred_grid [i , j ]), axis = 1 )
1112
1114
# Linearly interpolate over built-in EEP grid.
1113
1115
pnew = np .array ([np .interp (self .eep_u , self .eep_u [sel ], par ,
@@ -1199,6 +1201,7 @@ def get_predictions(self, feh=0., loga=8.5, eep=None, apply_corr=True):
1199
1201
# Fill out input labels.
1200
1202
if eep is None :
1201
1203
eep = self .eep_u
1204
+ eep = np .array (eep , dtype = 'float' )
1202
1205
feh = np .full_like (eep , feh )
1203
1206
loga = np .full_like (eep , loga )
1204
1207
labels = np .c_ [feh , loga , eep ]
@@ -1213,6 +1216,7 @@ def get_predictions(self, feh=0., loga=8.5, eep=None, apply_corr=True):
1213
1216
dlogt , dlogr = corrs .T
1214
1217
preds [:, self .logt_idx ] += dlogt
1215
1218
preds [:, self .logl_idx ] += 2. * dlogr
1219
+ preds [:, self .logg_idx ] -= 2. * dlogr
1216
1220
1217
1221
return preds
1218
1222
@@ -1318,6 +1322,7 @@ def get_seds(self, feh=0., loga=8.5, eep=None, av=0., rv=3.3, smf=0.,
1318
1322
# Initialize EEPs.
1319
1323
if eep is None :
1320
1324
eep = self .eep_u
1325
+ eep = np .array (eep , dtype = 'float' )
1321
1326
Neep = len (eep )
1322
1327
1323
1328
# Generate predictions.
0 commit comments