From d637528d8793fab9a4d8eec64545fd0a401631b9 Mon Sep 17 00:00:00 2001 From: hposborn Date: Wed, 21 Aug 2024 16:58:20 +0200 Subject: [PATCH] fixing plotting bug with gps again' --- MonoTools/fit.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MonoTools/fit.py b/MonoTools/fit.py index c1e15d5..d893eda 100755 --- a/MonoTools/fit.py +++ b/MonoTools/fit.py @@ -2831,10 +2831,10 @@ def init_gp_to_plot(self, n_samp=7, max_gp_len=12000, interp=True, newgp=False, #assert self.bin_oot stacktime=np.hstack((self.lc.time[0]-1,self.model_time,self.lc.time[-1]+1)) preds=[] - ext_lightcurves=az.extract(self.trace.posterior,var_names=['gp_pred']) + gp_posteriors=az.extract(self.trace.posterior,var_names=['gp_pred']) for i in np.random.choice(len(self.trace.posterior['phot_mean']),int(np.clip(10*n_samp,1,len(self.trace.posterior['phot_mean']))),replace=False): - smooth_func=interpolate.interp1d(stacktime, np.hstack((0,ext_lightcurves['gp_pred'][:,i],0)), kind='slinear') + smooth_func=interpolate.interp1d(stacktime, np.hstack((0,gp_posteriors[:,i],0)), kind='slinear') preds+=[smooth_func(self.lc.time)+self.trace.posterior['phot_mean'].values[i]] prcnts=np.nanpercentile(np.column_stack(preds),[15.8655254, 50., 84.1344746],axis=1) self.gp_to_plot['gp_pred']=prcnts[1]