更改了声线计算方式,合理分配了角度和声线进行并行运算。

这个提交包含在:
2023-04-07 14:00:00 +08:00
父节点 93275af055
当前提交 888a80e69c
共修改 4 个文件,包含 120 行新增和 58 行删除
+14 -4
查看文件
@@ -1,9 +1,17 @@
from ramRW import PosRAM, PROF, SSPRAM, write_env_RAM, readTL_RAM
from pyat.ramRW import PosRAM, PROF, SSPRAM, write_env_RAM, readTL_RAM
from os import system
import numpy as np
from config import AtBinPath
def call_ram(freq, sd, rd, bathm, ssp, sed):
from pyat.config import AtBinPath
def calZmax(ssp, sed):
d = np.array([])
for it in range(len(ssp)):
if sed == None:
d = np.append(d, ssp[it].z[-1])
else:
d = np.append(d, ssp[it].z[-1] + sed[it].z[-1])
Zmax = max(d)
return Zmax
def call_ram(freq, sd, bathm, ssp, sed):
''' ********************************************************************************* '''
''' ************************** Sound Field Calculation ****************************** '''
''' ********************************************************************************* '''
@@ -15,6 +23,8 @@ def call_ram(freq, sd, rd, bathm, ssp, sed):
zmplt = round(max(bathm.d)*1.1) # Maximum depth of plot (uint: m)
dz = 1500 / freq / 15 # Step in depth direction: wavelength / 15
dr = 10 * dz # Step in range direction
Zmax = calZmax(ssp, sed)
rd = Zmax
pos = PosRAM(sd, rd, rmax, zmax, dr, dz, zmplt)
# Sound speed profile for RAM