pySW4.prep.source module¶
Python module to help specify the source parameters.
author: | Shahar Shani-Kadmiel (s.shanikadmiel@tudelft.nl) |
---|---|
copyright: | Shahar Shani-Kadmiel |
license: | This code is distributed under the terms of the GNU Lesser General Public License, Version 3 (https://www.gnu.org/copyleft/lesser.html) |
-
f_max
(vmin, h, ppw=8)[source]¶ Calculate the maximum resolved frequency that meets the requirement that the shortest wavelength (\(\lambda=V_{min}/f_{max}\)) be sampled by a minimum points-per-wavelength (ppw).
Parameters: vmin : float
Minimum seismic velocity in the computational doamin in m/s.
h : float
Grid spacing of the computational doamin in meters.
ppw :
Minimum points-per-wavelenght required for the computation. Set to 8 by default.
Returns: float
The suggested
fmax
in Hz.See also
-
source_frequency
(fmax, stf='Gaussian')[source]¶ Calculate the angular frequency \(\omega\),
freq
attribute on the source line in the SW4 inputfile.Parameters: fmax : float
Maximum frequency in the source-time function frequency content, Hz.
stf : str
Source-time function name. It can have the following values: ‘GaussianInt’, ‘Gaussian’ (default), ‘RickerInt’, ‘Ricker’, ‘Ramp’, ‘Triangle’, ‘Sawtooth’, ‘Smoothwave’, ‘VerySmoothBump’, ‘Brune’, ‘BruneSmoothed’, ‘GaussianWindow’, ‘Liu’, ‘Dirac’, and ‘C6SmoothBump’.
See the SW4 User Guide for further details.
Returns:
2-tuple
f0
,freq
.freq
is the value which goes on the source line in the SW4 inputfile.
-
t0
(freq, t0=0.0, stf='Gaussian')[source]¶ Calculate the
t0
attribute on the source line in the SW4 inputfile.Parameters: freq : float
The angular frequency value used for the
freq
attribute on the source line in the SW4 inputfile.t0 : float
The calculated
t0
is added to the supllied t0 in the function call.stf : str
The source-time function name.