本文整理匯總了Python中openquake.hazardlib.gsim.base.RuptureContext.ztor方法的典型用法代碼示例。如果您正苦於以下問題:Python RuptureContext.ztor方法的具體用法?Python RuptureContext.ztor怎麽用?Python RuptureContext.ztor使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類openquake.hazardlib.gsim.base.RuptureContext
的用法示例。
在下文中一共展示了RuptureContext.ztor方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: AbrahamsonEtAl2014
# 需要導入模塊: from openquake.hazardlib.gsim.base import RuptureContext [as 別名]
# 或者: from openquake.hazardlib.gsim.base.RuptureContext import ztor [as 別名]
fig_dir = '/Users/vsahakian/anza/models/statistics/misc/oq_vs_matlab/'
## This all works..... ##
ASK14 = AbrahamsonEtAl2014()
IMT = imt.PGA()
rctx = RuptureContext()
dctx = DistancesContext()
sctx = SitesContext()
sctx_rock = SitesContext()
rctx.rake = 0.0
rctx.dip = 90.0
rctx.ztor = 7.13
rctx.mag = 3.0
#rctx.mag = np.linspace(0.1,5.)
rctx.width = 10.0
rctx.hypo_depth = 8.0
#dctx.rrup = np.logspace(1,np.log10(200),100)
dctx.rrup = np.logspace(np.log10(10),np.log10(10.0),1)
# Assuming average ztor, get rjb:
dctx.rjb = np.sqrt(dctx.rrup**2 - rctx.ztor**2)
dctx.rhypo = dctx.rrup
dctx.rx = dctx.rjb
dctx.ry0 = dctx.rx