Introduced new class DCfc for calculating the source spectrum and to derive the DC-value and the corner frquency of the source spectrum. Just at the beginning!
This commit is contained in:
parent
258b8b1ff4
commit
3ba57cfc56
@ -72,6 +72,10 @@ class Magnitude(object):
|
|||||||
def calcwapp(self):
|
def calcwapp(self):
|
||||||
self.wapp = None
|
self.wapp = None
|
||||||
|
|
||||||
|
|
||||||
|
def calcsourcespec(self):
|
||||||
|
self.sourcespek = None
|
||||||
|
|
||||||
class WApp(Magnitude):
|
class WApp(Magnitude):
|
||||||
'''
|
'''
|
||||||
Method to derive peak-to-peak amplitude as seen on a Wood-Anderson-
|
Method to derive peak-to-peak amplitude as seen on a Wood-Anderson-
|
||||||
@ -79,8 +83,8 @@ class WApp(Magnitude):
|
|||||||
'''
|
'''
|
||||||
|
|
||||||
def calcwapp(self):
|
def calcwapp(self):
|
||||||
print "Getting Wood-Anderson peak-to-peak amplitude ..."
|
print ("Getting Wood-Anderson peak-to-peak amplitude ...")
|
||||||
print "Simulating Wood-Anderson seismograph ..."
|
print ("Simulating Wood-Anderson seismograph ...")
|
||||||
|
|
||||||
self.wapp = None
|
self.wapp = None
|
||||||
stream = self.getwfstream()
|
stream = self.getwfstream()
|
||||||
@ -105,7 +109,7 @@ class WApp(Magnitude):
|
|||||||
# get maximum peak within pick window
|
# get maximum peak within pick window
|
||||||
iwin = getsignalwin(th, self.getTo(), self.getpwin())
|
iwin = getsignalwin(th, self.getTo(), self.getpwin())
|
||||||
self.wapp = np.max(sqH[iwin])
|
self.wapp = np.max(sqH[iwin])
|
||||||
print "Determined Wood-Anderson peak-to-peak amplitude: %f mm" % self.wapp
|
print ("Determined Wood-Anderson peak-to-peak amplitude: %f mm") % self.wapp
|
||||||
if self.getiplot() > 1:
|
if self.getiplot() > 1:
|
||||||
stream.plot()
|
stream.plot()
|
||||||
f = plt.figure(2)
|
f = plt.figure(2)
|
||||||
@ -121,4 +125,13 @@ class WApp(Magnitude):
|
|||||||
plt.close(f)
|
plt.close(f)
|
||||||
|
|
||||||
|
|
||||||
|
class DCfc(Magnitude):
|
||||||
|
'''
|
||||||
|
Method to calculate the source spectrum and to derive from that the plateau
|
||||||
|
(the so-called DC-value) and the corner frequency assuming Aki's omega-square
|
||||||
|
source model. Has to be derived from corrected traces!
|
||||||
|
'''
|
||||||
|
|
||||||
|
def calcsourcespec(self):
|
||||||
|
print ("Calculating source spectrum ....")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user