Beispiel #1
0
x2,y2,z2 = Exp.GetHypocenter(Db2)

#-----------------------------------------------------------------------------------------
# Map Plot

# Reshape polygon (to plot area)
P.x.append(P.x[0])
P.y.append(P.y[0]) 

# Plot map
cfg = {'Bounds': [10., -40., 60., 20.],
       'FigSize': [8., 6.],
       'Background': ['none',[0.9,0.8,0.6],[0.5,0.8,1.]],
       'Grid': [10., 10.]}

M = Map.GeoMap(cfg)

M.BasePlot()
M.DrawBounds()
M.DrawGrid()

M.PointPlot(x1, y1, Set=['o','g',5,1], Label='All')
M.PointPlot(x2, y2, Set=['o','r',5,1], Label='Selection')

M.AreaPlot(P.x, P.y, Set=['y',0.5,'k',1])

M.Legend()
M.Title('Example-cattools_area_sel')
M.Show()

#M.SaveFig(pathname+"/data/cattools_area_sel.jpg")
Beispiel #2
0
#平滑地震目录
#pdb.set_trace()
p = [(90.,20.),(90.,40.),(105.,40.),(105.,20.),(90.,20.)]
db3 = sel.AreaSelect(dbusgs,p)
P = ct.Polygon()
P.Load(p)

x1,y1,z1 = exp.GetHypocenter(db3)
wkt = ct.XYToWkt(P.x, P.y)
xsm, ysm, asm = sm.SmoothMFD(db3, 1., wkt, Delta=0.5)
cfg1 = {'Bounds': [90., 20., 105., 40.],
        'FigSize': [10., 12.],
        'Background': ['none',[0.9,0.8,0.6],[0.5,0.8,1.]],
        'Grid': [5., 5.]}
m1 = mapt.GeoMap(cfg1)
m1.BasePlot()
m1.MeshPlot(xsm, ysm, asm)
#m1.AreaPlot(P.x, P.y, Set=['y',0.5,'k',1])
#m1.PointPlot(xsm, ysm, Set=['o','b',2,1], Label='Grid')
m1.PointPlot(x1, y1, Set=['o','g',5,1], Label='全部')
m1.DrawGrid()
m1.Title('川滇地区地震目录高斯平滑')
m1.Show()

from geoist.catalog import Declusterer as declus
dbm, log1 = declus.WindowSearch(dbusgs, WinFun= declus.GardnerKnopoff, WinScale=1)
dbm.Info()


from geoist.catalog import MagRules as mr