velocity_conversion.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:seis_tools 作者: romaguir 项目源码 文件源码
def bilin_interp(grid2d, ith, ir, dth, dr, nth, nr):
   '''
   This function finds an interpolated value in the 2d plume grid, and returns
   the value. It's much faster than scipy.interpolate.interp2d

   Takes as arguments the 2d grid of plume perturbations, the index in theta,
   the index in radius, step size in theta and radius, and number of points
   in theta and radius.
   '''
   value = grid2d[ith,ir]*(1-dth)*(1-dr) + grid2d[ith+1,ir]*dth*(1-dr)
   value += grid2d[ith,ir+1]*(1-dth)*dr + grid2d[ith+1,ir+1]*dth*dr
   return value
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号