Esempio n. 1
0
 def getRepresentedSource(sandbox):
     length = 5000.0
     return OkadaSource(length=length,
                        width=15.0 * length**0.66,
                        strike=45.0,
                        rake=0,
                        slip=2)
Esempio n. 2
0
 def getRepresentedSource(sandbox):
     length = 5000.
     src = OkadaSource(
         easting=num.mean(sandbox.frame.E),
         northing=num.mean(sandbox.frame.N),
         depth=4000,
         length=length,
         width=15. * length**.66,
         strike=45.,
         rake=0,
         slip=2,
     )
     return src
Esempio n. 3
0
    def testOkadaSource(self):
        nsources = 2

        def r(lo, hi):
            return num.random.randint(lo, high=hi, size=1).astype(num.float)

        for s in xrange(nsources):
            length = r(5000, 15000)
            self.ms.addSource(
                OkadaSource(
                    easting=r(0., self.ms.frame.E.max()),  # ok
                    northing=r(0., self.ms.frame.N.max()),  # ok
                    depth=r(0, 8000),  # ok
                    strike=r(0, 360),  # ok
                    dip=r(0, 170),
                    slip=r(1, 5),  # ok
                    rake=r(0, 180),
                    length=length,
                    width=15. * length**.66,
                ))

        self.plotDisplacement(self.ms)
Esempio n. 4
0
from kite.sources import OkadaSource

km = 1e3

sandbox = SandboxScene()

nframes = 20
depths = num.linspace(4 * km, 4 * km, nframes)
strikes = num.linspace(0, 180, nframes)

okada = OkadaSource(
    northing=40 * km,
    easting=40 * km,
    depth=4 * km,
    length=8 * km,
    width=4 * km,
    strike=63.0,
    rake=0,
    dip=0.0,
    slip=3.0,
    opening=0,
)

sandbox.addSource(okada)

sandbox.processSources()

fig, axis = plt.subplots(nrows=2, ncols=2)

# Plot the resulting surface displacements

Esempio n. 5
0
import matplotlib.pyplot as plt
import numpy as num


km = 1e3

sandbox = SandboxScene()
# Set the LOS incident angles, remember :class:`kite.Scene`
sandbox.phi.fill(num.rad2deg(100.))
sandbox.theta.fill(num.rad2deg(23.))

okada = OkadaSource(
    northing=40*km,
    easting=40*km,
    depth=4*km,
    length=8*km,
    width=4*km,
    strike=63.,
    dip=33.,
    slip=3.,
    opening=1)

pyrocko_rectangular = PyrockoRectangularSource(
    northing=40*km,
    easting=40*km,
    depth=4*km,
    length=8*km,
    width=4*km,
    strike=63.,
    dip=33.,
    slip=3.,
    store_dir='gfstore_halfspace')