geogrid.py 文件源码

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

项目:seismic-python 作者: malcolmw 项目源码 文件源码
def __init__(self, lat0, lon0, depth0, nlat, nlon, ndepth, dlat, dlon, ddepth):
# NOTE: Origin of spherical coordinate system and geographic coordinate
# system is not the same!
# Geographic coordinate system
        self.lat0, self.lon0, self.depth0 =\
                seispy.coords.as_geographic([lat0, lon0, depth0])
        self.nlat, self.nlon, self.ndepth = nlat, nlon, ndepth
        self.dlat, self.dlon, self.ddepth = dlat, dlon, ddepth
# Spherical/Pseudospherical coordinate systems
        self.nrho = self.ndepth
        self.ntheta = self.nlambda = self.nlat
        self.nphi = self.nlon
        self.drho = self.ddepth
        self.dtheta = self.dlambda = np.radians(self.dlat)
        self.dphi = np.radians(self.dlon)
        self.rho0 = seispy.constants.EARTH_RADIUS\
                - (self.depth0 + (self.ndepth - 1) * self.ddepth)
        self.lambda0 = np.radians(self.lat0)
        self.theta0 = ?/2 - (self.lambda0 + (self.nlambda - 1) * self.dlambda)
        self.phi0 = np.radians(self.lon0)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号