你已经派生过 gprMax
镜像自地址
https://gitee.com/sunhf/gprMax.git
已同步 2025-08-06 12:36:51 +08:00
Added function to find zero crossings of signal.
这个提交包含在:
@@ -128,3 +128,18 @@ def human_size(size, a_kilobyte_is_1024_bytes=True):
|
||||
raise ValueError('Number is too large.')
|
||||
|
||||
|
||||
def zero_crossings(data):
|
||||
"""Find location of zero crossings in 1D data array.
|
||||
|
||||
Args:
|
||||
data (float): 1D array
|
||||
|
||||
Returns:
|
||||
Array of indices (int).
|
||||
"""
|
||||
|
||||
pos = data > 0
|
||||
npos = ~pos
|
||||
return ((pos[:-1] & npos[1:]) | (npos[:-1] & pos[1:])).nonzero()[0]
|
||||
|
||||
|
||||
|
在新工单中引用
屏蔽一个用户