default=0., help='Latitude in [deg]') default=0., help='Longitude in [deg]') default=0., help='Easting in [m]') default=0., help='Northing in [m]') default=1.*km, help='Depth in [m]')
Object.__init__(self, *args, **kwargs) self._cached_result = None self.evParametersChanged = Subject() self._sandbox = None
self._cached_result = None self.evParametersChanged.notify()
if not self._sandbox or (self.lat == 0. and self.lon == 0.): return 0., 0. return od.latlon_to_ne_numpy( self._sandbox.frame.llLat, self._sandbox.frame.llLon, self.lat, self.lon)
raise NotImplementedError
help='Width, downdip in [m]', default=10000.,) help='Length in [m]', default=10000.,) default=45., help='Strike, clockwise from North in [deg]; -180-180') default=45., help='Dip, down from horizontal in [deg]; 0-90') default=90., help='Rake, clockwise in [deg]; 0 is right-lateral strike slip') default=1.5, help='Slip in [m]', optional=True)
coords = num.empty((4, 2))
c_strike = num.cos(self.strike * d2r) s_strike = num.sin(self.strike * d2r) c_dip = num.cos(self.dip * d2r)
coords[0, 0] = s_strike * self.length/2 coords[0, 1] = c_strike * self.length/2 coords[1, 0] = -coords[0, 0] coords[1, 1] = -coords[0, 1]
coords[2, 0] = coords[1, 0] - c_strike * c_dip * self.width coords[2, 1] = coords[1, 1] + s_strike * c_dip * self.width coords[3, 0] = coords[0, 0] - c_strike * c_dip * self.width coords[3, 1] = coords[0, 1] + s_strike * c_dip * self.width
north_shift, east_shift = self.getSandboxOffset()
coords[:, 0] += self.easting + east_shift coords[:, 1] += self.northing + north_shift
return coords
def segments(self): yield self
d = dict( lat=source.lat, lon=source.lon, northing=source.north_shift, easting=source.east_shift, depth=source.depth, width=source.width, length=source.length, strike=source.strike, dip=source.dip, rake=source.rake, slip=source.slip)
if hasattr(cls, 'decimation_factor'): d['decimation_factor'] = source.decimation_factor
if hasattr(cls, 'store_dir'): d['store_dir'] = store_dir
return cls(**d)
'''Interface definition of the processor '''
self._log = sandbox_scene._log.getChild(self.__class__.__name__)
raise NotImplementedError()
result = { 'displacement.n': num.array(), 'displacement.e': num.array(), 'displacement.d': num.array(), 'processor_profile': ProcessorProfile() } return result |