示例#1
0
    def __init__(self, **kwargs):
        if 'm6' in kwargs:
            for (k, v) in zip('mnn mee mdd mne mnd med'.split(),
                              kwargs.pop('m6')):
                kwargs[k] = float(v)

        Source.__init__(self, **kwargs)
示例#2
0
 def pyrocko_event(self, **kwargs):
     mt = self.pyrocko_moment_tensor()
     return Source.pyrocko_event(
         self,
         moment_tensor=self.pyrocko_moment_tensor(),
         magnitude=float(mt.moment_magnitude()),
         **kwargs)
示例#3
0
    def __init__(self, **kwargs):
        n = 1000
        self._beta_mapping = num.linspace(0, pi, n)
        self._u_mapping = \
            (3. / 4. * self._beta_mapping) - \
            (1. / 2. * num.sin(2. * self._beta_mapping)) + \
            (1. / 16. * num.sin(4. * self._beta_mapping))

        self.lambda_factor_matrix = num.array(
            [[sqrt3, -1., sqrt2], [0., 2., sqrt2], [-sqrt3, -1., sqrt2]],
            dtype='float64')

        self.R = get_rotation_matrix()
        self.roty_pi4 = self.R['y'](-pi4)
        self.rotx_pi = self.R['x'](pi)

        self._lune_lambda_matrix = num.zeros((3, 3), dtype='float64')

        Source.__init__(self, **kwargs)
示例#4
0
 def base_key(self):
     return Source.base_key(self) + self.m6_astuple