forked from shineusn/nessi
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
hotfixes and documentation improvments
- Loading branch information
Showing
59 changed files
with
3,137 additions
and
176 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
|
||
Filtering SU data | ||
================= | ||
|
||
The ``pfilter`` method of ``SUdata()`` allows to apply a zero-phase, | ||
sine-squared tapered filter to the data. | ||
|
||
Sine-squared taper | ||
------------------ | ||
|
||
.. code:: ipython3 | ||
# Import numpy and matplotlib | ||
import numpy as np | ||
import matplotlib.pyplot as plt | ||
# Import the SUdata class from nessi.io module | ||
from nessi.io import SUdata | ||
# Declare | ||
dobs = SUdata() | ||
# Read the SU file | ||
dobs.read('data/musc_F50_01.su') | ||
# Create frequency and amplitude arrays for filtering | ||
freq = np.zeros(4, dtype=np.float32) | ||
amps = np.zeros(4, dtype=np.float32) | ||
freq[0] = 10.; freq[1] = 100.; freq[2] = 250.; freq[3] = 300.; | ||
amps[0] = 0.; amps[1] = 1.0; amps[2] = 1.0; amps[3] = 0.0; | ||
# Filtering | ||
dobsf = dobs.pfilter(freq, amps) | ||
.. code:: ipython3 | ||
# Plot original and filtered data | ||
fig = plt.figure(figsize=(12,5)) | ||
plt.subplot(121) | ||
dobs.image(clip=0.05, label2='trace number', label1='time [s]', title='Original SU data', legend=1) | ||
plt.subplot(122) | ||
dobsf.image(clip=0.05, label2='trace number', label1='time [s]', title='Filtered data', legend=1) | ||
plt.show() | ||
.. image:: images/filtering_SU_data_01.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.