pysmo.tools.signal
#
envelope(seismogram, Tn, alpha)
#
Calculates the envelope of a gaussian filtered seismogram.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
seismogram |
Seismogram
|
Name of the seismogram object passed to this function. |
required |
Tn |
float
|
Center period of Gaussian filter [in seconds] |
required |
alpha |
float
|
Set alpha (which determines filterwidth) |
required |
Returns:
Type | Description |
---|---|
MiniSeismogram
|
Seismogram containing the envelope |
Examples:
>>> from pysmo import SAC
>>> from pysmo.tools.signal import envelope
>>> seis = SAC.from_file('sacfile.sac').seismogram
>>> Tn = 50 # Center Gaussian filter at 50s period
>>> alpha = 50 # Set alpha (which determines filterwidth) to 50
>>> envelope_seis = envelope(seis, Tn, alpha)
Source code in pysmo/tools/signal.py
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
|
gauss(seismogram, Tn, alpha)
#
Returns a gaussian filtered seismogram.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
seismogram |
Seismogram
|
Name of the SAC object passed to this function. |
required |
Tn |
float
|
Center period of Gaussian filter [in seconds] |
required |
alpha |
float
|
Set alpha (which determines filterwidth) |
required |
Returns:
Type | Description |
---|---|
Seismogram
|
Gaussian filtered seismogram. |
Examples:
>>> from pysmo import SAC
>>> from pysmo.tools.signal import gauss
>>> seis = SAC.from_file('sacfile.sac').seismogram
>>> Tn = 50 # Center Gaussian filter at 50s period
>>> alpha = 50 # Set alpha (which determines filterwidth) to 50
>>> gauss_seis = gauss(seis, Tn, alpha)
Source code in pysmo/tools/signal.py
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
|