Esempio n. 1
0
 def targ(D,GT,x,y,cmin,cmax,symm,inc=inc,ecc=ecc,amp=amp,scale=scale,kwds=kwds):
     # Spatial distance
     aniso_geo_rad(D, x[:,:-1], y[:,:-1], inc, ecc,cmin=cmin,cmax=cmax,symm=symm)    
     imul(D,1./scale,cmin=cmin,cmax=cmax,symm=symm)            
     # Temporal variogram
     origin_val = t_gam_fun(GT, x[:,-1], y[:,-1],cmin=cmin,cmax=cmax,symm=symm,**kwds)
     # Covariance
     stein_spatiotemporal(D,GT,origin_val,cmin=cmin,cmax=cmax,symm=symm)                        
     imul(D,amp*amp,cmin=cmin,cmax=cmax,symm=symm)            
Esempio n. 2
0
 def targ(D,GT,x,y,cmin,cmax,symm,inc=inc,ecc=ecc,amp=amp,scale=scale,diff_degree=diff_degree,h=h,geometry=geometry,kwds=kwds):
     # Spatial distance
     if geometry=='aniso_geo_rad':
         aniso_geo_rad(D, x[:,:-1], y[:,:-1], inc, ecc,cmin=cmin,cmax=cmax,symm=symm)    
     else:
         euclidean(D, x[:,:-1], y[:,:-1], cmin=cmin,cmax=cmax,symm=symm)    
     imul(D,1./scale,cmin=cmin,cmax=cmax,symm=symm)            
     # Temporal variogram
     ddx, ddy = diff_degree(x), diff_degree(y)
     origin_val = t_gam_fun(GT, x[:,-1], y[:,-1], ddx, ddy, cmin=cmin,cmax=cmax,symm=False,**kwds)
     if np.any(GT<0):
         raise pm.ZeroProbability, 'GT < 0.'
     # GT = np.add.outer(ddx*.5,ddy*.5)
     # Local properties
     hx, hy = h(x), h(y)
     # Covariance
     nsst(D,GT,origin_val,hx,hy,cmin=cmin,cmax=cmax,symm=symm)                        
     imul(D,amp*amp,cmin=cmin,cmax=cmax,symm=symm)