Exemplo n.º 1
0
def line(m, lat, lon, azi, start, end, indeg=True):
    if indeg:
        start = start / 360. * 6371. * 2 * np.pi
        end = end / 360. * 6371. * 2 * np.pi
    X = []
    Y = []
    for distance in np.linspace(start, end, 100):
        glat2, glon2 = dist2gps(distance, azi, lat, lon)
        X.append(glon2)
        Y.append(glat2)
    X, Y = m(X, Y)
    return X, Y
Exemplo n.º 2
0
def equi(m, lat, lon, radius, indeg=True):
    if indeg:
        radius = radius / 360. * 6371. * 2 * np.pi
    X = []
    Y = []
    for azimuth in range(0, 360):
        glat2, glon2 = dist2gps(radius, azimuth, lat, lon)
        X.append(glon2)
        Y.append(glat2)
    X.append(X[0])
    Y.append(Y[0])
    #~ m.plot(X,Y,**kwargs) #Should work, but doesn't...
    X, Y = m(X, Y)
    return X, Y
Exemplo n.º 3
0
 def pspier(depth, slat, slon, slowness, azi, model=util.iasp91):
     tp, ts, xp, xs = model.trace(slowness) #@UnusedVariable
     xs = xs[model.layer(depth)]
     return tuple([xs]) + util.dist2gps(xs, azi, slat, slon)