你已经派生过 gprMax
镜像自地址
https://gitee.com/sunhf/gprMax.git
已同步 2025-08-07 23:14:03 +08:00
Added normalised versions of waveforms to list.
这个提交包含在:
@@ -24,7 +24,7 @@ from .utilities import rvalue
|
|||||||
class Waveform:
|
class Waveform:
|
||||||
"""Definitions of waveform shapes that can be used with sources."""
|
"""Definitions of waveform shapes that can be used with sources."""
|
||||||
|
|
||||||
waveformtypes = ['gaussian', 'gaussiandot', 'gaussiandotdot', 'ricker', 'sine', 'contsine', 'impulse', 'user']
|
waveformtypes = ['gaussian', 'gaussiandot', 'gaussiandotnorm', 'gaussiandotdot', 'gaussiandotdotnorm', 'ricker', 'sine', 'contsine', 'impulse', 'user']
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.ID = None
|
self.ID = None
|
||||||
@@ -43,7 +43,8 @@ class Waveform:
|
|||||||
Returns:
|
Returns:
|
||||||
waveform (float): Calculated value for waveform.
|
waveform (float): Calculated value for waveform.
|
||||||
"""
|
"""
|
||||||
if self.type == 'gaussiandotdot' or self.type == 'gaussiandotdotnorm' or self.type == "ricker":
|
|
||||||
|
if self.type == 'gaussiandotdot' or self.type == 'gaussiandotdotnorm' or self.type == 'ricker':
|
||||||
chi = np.sqrt(2) / self.freq
|
chi = np.sqrt(2) / self.freq
|
||||||
zeta = 2 * np.pi * np.pi * self.freq * self.freq /2
|
zeta = 2 * np.pi * np.pi * self.freq * self.freq /2
|
||||||
delay = time - chi
|
delay = time - chi
|
||||||
@@ -69,9 +70,6 @@ class Waveform:
|
|||||||
normalise = 1 / (2 * zeta)
|
normalise = 1 / (2 * zeta)
|
||||||
waveform = 2 * zeta * (2 * zeta * delay * delay - 1) * np.exp(-zeta * delay * delay) * normalise
|
waveform = 2 * zeta * (2 * zeta * delay * delay - 1) * np.exp(-zeta * delay * delay) * normalise
|
||||||
|
|
||||||
elif self.type == 'gaussiandotdotdot':
|
|
||||||
waveform = zeta * zeta * (3 * delay - 2 * zeta * delay * delay * delay) * np.exp(-zeta * delay * delay)
|
|
||||||
|
|
||||||
elif self.type == 'ricker':
|
elif self.type == 'ricker':
|
||||||
normalise = 1 / (2 * zeta)
|
normalise = 1 / (2 * zeta)
|
||||||
waveform = - (2 * zeta * (2 * zeta * delay * delay - 1) * np.exp(-zeta * delay * delay)) * normalise
|
waveform = - (2 * zeta * (2 * zeta * delay * delay - 1) * np.exp(-zeta * delay * delay)) * normalise
|
||||||
|
在新工单中引用
屏蔽一个用户