Added para datasource to database, modified calling method of database
这个提交包含在:
+4
-10
@@ -6,8 +6,8 @@ from pyat.krakenc import call_krakenc
|
||||
from pyat.ram import call_ram
|
||||
import matplotlib.pyplot as plt
|
||||
|
||||
def call_tl(ETOPO1Path, STPath, freq, sourceDepth, sourceLat, sourceLon, receiveDepth,
|
||||
receiveLat=None, receiveLon=None, range=None, azi=None, timeType='Annual', modelType='kraken', isPlot=False):
|
||||
def call_tl(database, freq, sourceDepth, sourceLat, sourceLon, receiveDepth,
|
||||
receiveLat=None, receiveLon=None, range=None, azi=None, modelType='kraken', isPlot=False):
|
||||
""" Input:
|
||||
freq - float, Frequency
|
||||
sourceDepth - float, Source depth
|
||||
@@ -29,18 +29,12 @@ def call_tl(ETOPO1Path, STPath, freq, sourceDepth, sourceLat, sourceLon, receive
|
||||
TL 传播损失
|
||||
bathym类 地形数据 bathym.r距离 bathym.d深度
|
||||
"""
|
||||
# 定义时间段
|
||||
timeIndex = timeType
|
||||
# 创建类
|
||||
data = DataBase(ETOPO1Path, STPath)
|
||||
# 设置时间段
|
||||
data.set_timePeriod(timeIndex)
|
||||
|
||||
bathym, ssp, sed, base = [], [], [], []
|
||||
if (receiveLat != None) and (receiveLon != None):
|
||||
[bathym, ssp, sed, base] = GetEnv(data, 25, Coord(sourceLon, sourceLat), coordR=Coord(receiveLon, receiveLat))
|
||||
[bathym, ssp, sed, base] = GetEnv(database, 25, Coord(sourceLon, sourceLat), coordR=Coord(receiveLon, receiveLat))
|
||||
elif (range != None) and (azi != None):
|
||||
[bathym, ssp, sed, base] = GetEnv(data, 25, Coord(sourceLon, sourceLat), R=range, azi=azi)
|
||||
[bathym, ssp, sed, base] = GetEnv(database, 25, Coord(sourceLon, sourceLat), R=range, azi=azi)
|
||||
else:
|
||||
print('no receive info!')
|
||||
return [], [], [], bathym
|
||||
|
||||
在新工单中引用
屏蔽一个用户