你已经派生过 gprMax
镜像自地址
https://gitee.com/sunhf/gprMax.git
已同步 2025-08-06 04:26:52 +08:00
Added maxabsvalue function.
这个提交包含在:
@@ -64,6 +64,28 @@ def maxvalue(filename, args):
|
|||||||
|
|
||||||
return maxvalue
|
return maxvalue
|
||||||
|
|
||||||
|
def maxabsvalue(filename, args):
|
||||||
|
"""Maximum absolute value from a response.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
filename (str): Name of output file
|
||||||
|
args (dict): 'outputs' key with a list of names (IDs) of outputs (rxs) from input file
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
maxabsvalue (float): Maximum absolute value from specific outputs
|
||||||
|
"""
|
||||||
|
|
||||||
|
f = h5py.File(filename, 'r')
|
||||||
|
nrx = f.attrs['nrx']
|
||||||
|
|
||||||
|
for rx in range(1, nrx + 1):
|
||||||
|
output = f['/rxs/rx' + str(rx) + '/']
|
||||||
|
if output.attrs['Name'] in args['outputs']:
|
||||||
|
outputname = list(output.keys())[0]
|
||||||
|
maxabsvalue = np.amax(np.abs(output[outputname]))
|
||||||
|
|
||||||
|
return maxabsvalue
|
||||||
|
|
||||||
|
|
||||||
def xcorr(filename, args):
|
def xcorr(filename, args):
|
||||||
"""Maximum value of a cross-correlation between a response and a reference response.
|
"""Maximum value of a cross-correlation between a response and a reference response.
|
||||||
|
在新工单中引用
屏蔽一个用户