去掉了接收深度接口,

更改了间隔dr。
这个提交包含在:
2023-04-07 16:11:16 +08:00
父节点 888a80e69c
当前提交 3ed8fe0dea
共修改 7 个文件,包含 175 行新增和 130 行删除
+14 -5
查看文件
@@ -60,7 +60,7 @@ def main():
# czdata.TL是损失、czdata.bathym是地形数据 # czdata.TL是损失、czdata.bathym是地形数据
# czdata.Rays是声线数据 # czdata.Rays是声线数据
# czdata.CzDetail是会聚区数据,包括会聚区宽度和距离 # czdata.CzDetail是会聚区数据,包括会聚区宽度和距离
res = call_cz(database, freq, lat, lon, azi, sourceDepth, receiveDepth) res = call_cz(database, freq, lat, lon, azi, sourceDepth)
# call_cz(25, 18.0, 114.0, 10, 3500) # call_cz(25, 18.0, 114.0, 10, 3500)
# write data to file # write data to file
@@ -91,7 +91,9 @@ def main():
res[index].depths = np.around(res[index].depths, decimals=0) res[index].depths = np.around(res[index].depths, decimals=0)
res[index].ranges = np.around(res[index].ranges, decimals=0) res[index].ranges = np.around(res[index].ranges, decimals=0)
res[index].TL = np.around(res[index].TL, decimals=2) res[index].TL = np.around(res[index].TL, decimals=2)
tlpoint = list(zip(np.tile(res[index].depths.reshape(len(res[index].depths),1),len(res[index].ranges)).flatten(), np.tile(res[index].ranges,(len(res[index].depths),1)).flatten(), res[index].TL.flatten())) tlpoint = list(
zip(np.tile(res[index].depths.reshape(len(res[index].depths), 1), len(res[index].ranges)).flatten(),
np.tile(res[index].ranges, (len(res[index].depths), 1)).flatten(), res[index].TL.flatten()))
tlData = { tlData = {
"param": paramData, "param": paramData,
"azi": f'{round(res[index].azi)}', "azi": f'{round(res[index].azi)}',
@@ -146,13 +148,16 @@ def main():
outBathymData.append(bathymData) outBathymData.append(bathymData)
outTlData.append(tlData) outTlData.append(tlData)
outRayData.append(rayData) outRayData.append(rayData)
with open(("" if outParam["outPath"]=="" else outParam["outPath"] + "/")+"czOut_bathym.json", 'w') as jsonFile: with open(("" if outParam["outPath"] == "" else outParam["outPath"] + "/") + "czOut_bathym.json",
'w') as jsonFile:
json_data = json.dumps(outBathymData, cls=MyEncoder, indent=2, ensure_ascii=False) json_data = json.dumps(outBathymData, cls=MyEncoder, indent=2, ensure_ascii=False)
jsonFile.write(json_data) jsonFile.write(json_data)
with open(("" if outParam["outPath"]=="" else outParam["outPath"] + "/")+"czOut_tl.json", 'w') as jsonFile: with open(("" if outParam["outPath"] == "" else outParam["outPath"] + "/") + "czOut_tl.json",
'w') as jsonFile:
json_data = json.dumps(outTlData, cls=MyEncoder, indent=2, ensure_ascii=False) json_data = json.dumps(outTlData, cls=MyEncoder, indent=2, ensure_ascii=False)
jsonFile.write(json_data) jsonFile.write(json_data)
with open(("" if outParam["outPath"]=="" else outParam["outPath"] + "/")+"czOut_ray.json", 'w') as jsonFile: with open(("" if outParam["outPath"] == "" else outParam["outPath"] + "/") + "czOut_ray.json",
'w') as jsonFile:
json_data = json.dumps(outRayData, cls=MyEncoder, indent=2, ensure_ascii=False) json_data = json.dumps(outRayData, cls=MyEncoder, indent=2, ensure_ascii=False)
jsonFile.write(json_data) jsonFile.write(json_data)
outData["data"] = outDataData outData["data"] = outDataData
@@ -160,5 +165,9 @@ def main():
with open(("" if outParam["outPath"] == "" else outParam["outPath"] + "/") + "czOut.json", 'w') as jsonFile: with open(("" if outParam["outPath"] == "" else outParam["outPath"] + "/") + "czOut.json", 'w') as jsonFile:
json.dump(outData, jsonFile, indent=4, ensure_ascii=False) json.dump(outData, jsonFile, indent=4, ensure_ascii=False)
# import time
if __name__ == '__main__': if __name__ == '__main__':
# start = time.perf_counter()
main() main()
# end = time.perf_counter()
# print('time = ',(end-start))
+17 -9
查看文件
@@ -7,6 +7,7 @@ from multiprocessing import Pool
from scipy.stats import norm from scipy.stats import norm
import math import math
def write_ssp(sspfile, ssp, bathm, NZmax): def write_ssp(sspfile, ssp, bathm, NZmax):
if sspfile[-3:] != 'ssp': if sspfile[-3:] != 'ssp':
sspfile += '.ssp' sspfile += '.ssp'
@@ -35,8 +36,6 @@ def write_bathy(btyfile, bathm):
f.write(' ' + str(bathm.r[row]) + ' ' + str(bathm.d[row]) + '\r\n') f.write(' ' + str(bathm.r[row]) + ' ' + str(bathm.d[row]) + '\r\n')
return return
def call_Bellhop_p(filename):
system(AtBinPath + "/bellhop " + filename)
def calZmax(ssp): def calZmax(ssp):
d = np.array([], dtype=int) d = np.array([], dtype=int)
@@ -47,15 +46,18 @@ def calZmax(ssp):
Zmax = ssp[ssp_idx].z[-1] Zmax = ssp[ssp_idx].z[-1]
return NZmax, Zmax, ssp_idx return NZmax, Zmax, ssp_idx
def call_Bellhop(freq, sd, rd, bathm, ssp, sed, base): def call_Bellhop_p(filename):
system(AtBinPath + "/bellhop " + filename)
def call_Bellhop(freq, sd, bathm, ssp, sed, base):
# Source and receiving position # Source and receiving position
filename = 'envB' filename = 'envB'
Rmax = bathm.r[-1] # unit: km Rmax = bathm.r[-1] # unit: km
dr = (1500 / freq) / 1000 # wavelength / 10, unit: km dr = 0.1 # wavelength / 10, unit: km
ran = np.linspace(0, Rmax, round(Rmax / dr)) # Receiving range (unit: km) ran = np.linspace(0, Rmax, round(Rmax / dr)) # Receiving range (unit: km)
NZmax, Zmax, ssp_idx = calZmax(ssp) NZmax, Zmax, ssp_idx = calZmax(ssp)
RD = np.linspace(0, Zmax, round(Zmax / 10) + 1) RD = np.linspace(0, Zmax, round(Zmax / 10) + 1)
pos = Pos(Source(sd), Dom(ran, rd)) pos = Pos(Source(sd), Dom(ran, RD))
# Range of phase velocity # Range of phase velocity
cInt.Low = 1400 cInt.Low = 1400
cInt.High = 15000 cInt.High = 15000
@@ -100,11 +102,15 @@ def call_Bellhop(freq, sd, rd, bathm, ssp, sed, base):
bdy = Bndry(top, bottom) bdy = Bndry(top, bottom)
# Beam params # Beam params
run_type = 'C' # incoherently sum beams, see AT docs for more info run_type = 'C' # incoherently sum beams, see AT docs for more info
NAlphaRange = 12 NAlphaRange = 12
Alpha = alphadiv(NAlphaRange,Rmax) # min and max launch angle -20 degrees to 20 degrees Alpha = alphadiv(NAlphaRange,Rmax) # min and max launch angle -20 degrees to 20 degrees
totalBeams = beamsnumber(freq,Rmax,max(bathm.r)) totalBeams = beamsnumber(freq,Rmax,max(bathm.r))
box = Box(Zmax, max(bathm.r)) # bound the region you let the beams go, depth in meters and range in km box = Box(Zmax, max(bathm.r)) # bound the region you let the beams go, depth in meters and range in km
deltas = 0 # length step of ray trace, 0 means automatically choose deltas = 0 # length step of ray trace, 0 means automatically choose
# Write *.env file
ialpha = 0
Filenames = [] Filenames = []
for iAlphaRange in range(len(Alpha)-1): for iAlphaRange in range(len(Alpha)-1):
alpha = np.array([Alpha[iAlphaRange], Alpha[iAlphaRange + 1]]) alpha = np.array([Alpha[iAlphaRange], Alpha[iAlphaRange + 1]])
@@ -215,17 +221,19 @@ def find_cvgcRays(rays_total):
def alphadiv(NalphaRange,Rmax): def alphadiv(NalphaRange,Rmax):
angle = [-90,90] angle = [-90,90]
if Rmax >100 and Rmax<=1000: if Rmax >100 and Rmax<=1000:
sigma = 25 sigma = 20
elif Rmax > 1000: elif Rmax >=1000:
sigma = 15 sigma = 15
else : else :
sigma = 40 sigma = 25
for i in range(1,NalphaRange): for i in range(1,NalphaRange):
angle.append(norm.ppf(i/NalphaRange,loc=0, scale=sigma)) angle.append(norm.ppf(i/NalphaRange,loc=0, scale=sigma))
angle.sort() angle.sort()
return angle return angle
def beamsnumber(freq,Rmax,depth): def beamsnumber(freq,Rmax,depth):
if Rmax >700 : if Rmax >700 :
nbeams = max(int(0.01 * Rmax*1000 * freq /1500),300) nbeams = max(int(0.01 * Rmax*1000 * freq /1500),300)
@@ -237,7 +245,7 @@ def beamsnumber(freq, Rmax, depth):
nbeams = max(int(0.3 * Rmax*1000 * freq / 1500), 300) nbeams = max(int(0.3 * Rmax*1000 * freq / 1500), 300)
d_theta_recommended =math.atan(depth/(10.0 * Rmax*1000)) d_theta_recommended =math.atan(depth/(10.0 * Rmax*1000))
nbeams = max(int(math.pi / d_theta_recommended), nbeams) nbeams = min(int(math.pi/d_theta_recommended),nbeams,3000)
return nbeams return nbeams
+16 -7
查看文件
@@ -52,7 +52,7 @@ def call_Bellhop(freq, sd, bathm, ssp, sed, base,azi):
# Source and receiving position # Source and receiving position
filename = 'cz'+str(azi) filename = 'cz'+str(azi)
Rmax = bathm.r[-1] # unit: km Rmax = bathm.r[-1] # unit: km
dr = (1500 / freq) / 1000 # wavelength / 10, unit: km dr = 0.1 # wavelength / 10, unit: km
ran = np.linspace(0, Rmax, round(Rmax / dr)) # Receiving range (unit: km) ran = np.linspace(0, Rmax, round(Rmax / dr)) # Receiving range (unit: km)
Zmax, ssp_idx = calZmax(ssp, sed) Zmax, ssp_idx = calZmax(ssp, sed)
"""RD 已修改 8.26""" """RD 已修改 8.26"""
@@ -100,7 +100,7 @@ def call_Bellhop(freq, sd, bathm, ssp, sed, base,azi):
bdy = Bndry(top, bottom) bdy = Bndry(top, bottom)
# Beam params # Beam params
run_type = 'I' # incoherently sum beams, see AT docs for more info run_type = 'I' # incoherently sum beams, see AT docs for more info
nbeams = 3000 nbeams = 1000
alpha = np.linspace(-90, 90, 2) # min and max launch angle -20 degrees to 20 degrees alpha = np.linspace(-90, 90, 2) # min and max launch angle -20 degrees to 20 degrees
box = Box(Zmax, 100) # bound the region you let the beams go, depth in meters and range in km box = Box(Zmax, 100) # bound the region you let the beams go, depth in meters and range in km
deltas = 0 # length step of ray trace, 0 means automatically choose deltas = 0 # length step of ray trace, 0 means automatically choose
@@ -122,7 +122,7 @@ def call_Bellhop_Rays(freq, sd, bathm, ssp, sed, base,azi):
# Source and receiving position # Source and receiving position
filename = 'cz_ray'+str(azi) filename = 'cz_ray'+str(azi)
Rmax = bathm.r[-1] # unit: km Rmax = bathm.r[-1] # unit: km
dr = (1500 / freq) / 1000 # wavelength / 10, unit: km dr = 0.1 # wavelength / 10, unit: km
ran = np.linspace(0, Rmax, round(Rmax / dr)) # Receiving range (unit: km) ran = np.linspace(0, Rmax, round(Rmax / dr)) # Receiving range (unit: km)
Zmax, ssp_idx = calZmax(ssp, sed) Zmax, ssp_idx = calZmax(ssp, sed)
"""RD 已修改 8.26""" """RD 已修改 8.26"""
@@ -297,7 +297,7 @@ def call_fangwei(freq, sd, bathm, ssp, sed, base, azi, isPlot=False):
czdetail.reflectCz = [] czdetail.reflectCz = []
return Pos.r.range, Pos.r.depth, TL[0, 0, :, :], bathm, Rays, czdetail return Pos.r.range, Pos.r.depth, TL[0, 0, :, :], bathm, Rays, czdetail
def child(database, freq, lat, lon, sd, rd, i): def child(database, freq, lat, lon, sd, isPlot, i):
descripts = ["正北方向", "东北方向", "正东方向", "东南方向", "正南方向", "西南方向", "正西方向", "西北方向"] descripts = ["正北方向", "东北方向", "正东方向", "东南方向", "正南方向", "西南方向", "正西方向", "西北方向"]
theta = np.arange(0, 359, 45) theta = np.arange(0, 359, 45)
[bathm, ssp, sed, base] = GetEnv(database, 25, Coord(lon, lat), R=100, azi=theta[i]) [bathm, ssp, sed, base] = GetEnv(database, 25, Coord(lon, lat), R=100, azi=theta[i])
@@ -306,7 +306,7 @@ def child(database, freq, lat, lon, sd, rd, i):
ddd=[] ddd=[]
return None return None
else: else:
ranges, depths, TL, bathym, Rays, czdetail = call_fangwei(freq, sd, rd, bathm, ssp, sed, base, azi=theta[i],isPlot=True) ranges, depths, TL, bathym, Rays, czdetail = call_fangwei(freq, sd, bathm, ssp, sed, base, azi=theta[i],isPlot=isPlot)
czdetail.descript = descripts[i] czdetail.descript = descripts[i]
return CzData(theta[i], ranges, depths, TL, bathym, Rays, czdetail) return CzData(theta[i], ranges, depths, TL, bathym, Rays, czdetail)
@@ -325,7 +325,7 @@ def call_cz(database, freq, lat, lon, azi, sourceDepth=10, isPlot=False):
if np.mean(bathm.d) < 2000: if np.mean(bathm.d) < 2000:
return None return None
else: else:
ranges, depths, TL, bathym, Rays, czdetail = call_fangwei(freq, sd, rd, bathm, ssp, sed, base, azi, ranges, depths, TL, bathym, Rays, czdetail = call_fangwei(freq, sd, bathm, ssp, sed, base, azi,
isPlot=isPlot) isPlot=isPlot)
czdetail.descript = "{:.1f}°方向".format(azi) czdetail.descript = "{:.1f}°方向".format(azi)
results.append(CzData(0, ranges, depths, TL, bathym, Rays, czdetail)) results.append(CzData(0, ranges, depths, TL, bathym, Rays, czdetail))
@@ -340,7 +340,7 @@ def call_cz(database, freq, lat, lon, azi, sourceDepth=10, isPlot=False):
pool = Pool(processes=8) pool = Pool(processes=8)
applyResults = [] applyResults = []
for pi in range(8): for pi in range(8):
applyResults.append(pool.apply_async(partial(child, database, freq, lat, lon, sd, rd), (pi,))) applyResults.append(pool.apply_async(partial(child, database, freq, lat, lon, sd, isPlot), (pi,)))
# pi=Process(target=child_0,args=(pi,)) # pi=Process(target=child_0,args=(pi,))
# pi.start() # pi.start()
pool.close() pool.close()
@@ -348,3 +348,12 @@ def call_cz(database, freq, lat, lon, azi, sourceDepth=10, isPlot=False):
for applyResult in applyResults: for applyResult in applyResults:
results.append(applyResult.get()) results.append(applyResult.get())
return results return results
# timeIndex = '20190101'
# # 设置时间段
#
# STPath = '/home/gan/下载/code'
# ETOPO1Path = '/home/gan/下载/code/20220920/ETOPO1'
# database = DataBase(ETOPO1Path, STPath)
# database.set_timePeriod(timeIndex)
# res = call_cz(database, 300, 13, 115, 0, 60, True)
# a = 1
+5 -3
查看文件
@@ -1,8 +1,8 @@
from os import system from os import system
import numpy as np import numpy as np
from pyat.readwrite import write_env, write_fieldflp, read_shd from readwrite import write_env, write_fieldflp, read_shd
from pyat.env import Pos, Source, Dom, cInt, SSPraw, SSP, HS, BotBndry, TopBndry, Bndry from env import Pos, Source, Dom, cInt, SSPraw, SSP, HS, BotBndry, TopBndry, Bndry
from pyat.config import AtBinPath from config import AtBinPath
def calZmax(ssp, sed): def calZmax(ssp, sed):
d = np.array([]) d = np.array([])
@@ -29,6 +29,7 @@ def call_krakenc(freq, sd, bathm, ssp, sed, base):
RD = np.linspace(0, Zmax, round(Zmax) + 1) RD = np.linspace(0, Zmax, round(Zmax) + 1)
pos = Pos(Source(sd), Dom(ran, RD)) pos = Pos(Source(sd), Dom(ran, RD))
# Range of phase velocity # Range of phase velocity
cInt.Low = 1400 cInt.Low = 1400
cInt.High = 15000 cInt.High = 15000
@@ -108,6 +109,7 @@ def call_krakenc(freq, sd, bathm, ssp, sed, base):
return Pos1, TL return Pos1, TL
# if __name__=="__main__": # if __name__=="__main__":
''' ********************************************************************************* ''' ''' ********************************************************************************* '''
''' ***************************** Input Parameters ********************************** ''' ''' ***************************** Input Parameters ********************************** '''
+5 -2
查看文件
@@ -1,7 +1,8 @@
from pyat.ramRW import PosRAM, PROF, SSPRAM, write_env_RAM, readTL_RAM from ramRW import PosRAM, PROF, SSPRAM, write_env_RAM, readTL_RAM
from os import system from os import system
import numpy as np import numpy as np
from pyat.config import AtBinPath from config import AtBinPath
def calZmax(ssp, sed): def calZmax(ssp, sed):
d = np.array([]) d = np.array([])
for it in range(len(ssp)): for it in range(len(ssp)):
@@ -11,6 +12,7 @@ def calZmax(ssp, sed):
d = np.append(d, ssp[it].z[-1] + sed[it].z[-1]) d = np.append(d, ssp[it].z[-1] + sed[it].z[-1])
Zmax = max(d) Zmax = max(d)
return Zmax return Zmax
def call_ram(freq, sd, bathm, ssp, sed): def call_ram(freq, sd, bathm, ssp, sed):
''' ********************************************************************************* ''' ''' ********************************************************************************* '''
''' ************************** Sound Field Calculation ****************************** ''' ''' ************************** Sound Field Calculation ****************************** '''
@@ -50,6 +52,7 @@ def call_ram(freq, sd, bathm, ssp, sed):
# Read tl.grid # Read tl.grid
return readTL_RAM() return readTL_RAM()
# if __name__=="__main__": # if __name__=="__main__":
# ''' ********************************************************************************* ''' # ''' ********************************************************************************* '''
# ''' ***************************** Input Parameters ********************************** ''' # ''' ***************************** Input Parameters ********************************** '''
+13 -11
查看文件
@@ -1,9 +1,9 @@
import numpy as np import numpy as np
from pyat.AcousticPara import GetEnv, Coord from AcousticPara import GetEnv, Coord
from pyat.DataBase import DataBase from DataBase import DataBase
from pyat.bellhop import call_Bellhop from bellhop import call_Bellhop
from pyat.krakenc import call_krakenc from krakenc import call_krakenc
from pyat.ram import call_ram from ram import call_ram
import matplotlib.pyplot as plt import matplotlib.pyplot as plt
def call_tl(database, freq, sourceDepth, sourceLat, sourceLon, def call_tl(database, freq, sourceDepth, sourceLat, sourceLon,
@@ -79,11 +79,13 @@ def call_tl(database, freq, sourceDepth, sourceLat, sourceLon,
# # 创建类
# database = DataBase() # timeIndex = '20190101'
# # 设置时间段 # # 设置时间段
# database.set_timePeriod('06') #
# # 设置时间段 # STPath = '/home/gan/下载/code'
# #database.set_timePeriod(timeIndex) # ETOPO1Path = '/home/gan/下载/code/20220920/ETOPO1'
# database = DataBase(ETOPO1Path, STPath)
# database.set_timePeriod(timeIndex)
# range, depth, tl, bathym = call_tl(database=database,freq=200, sourceDepth=60, sourceLat=19, sourceLon=127, # range, depth, tl, bathym = call_tl(database=database,freq=200, sourceDepth=60, sourceLat=19, sourceLon=127,
# receiveLat=17.5, receiveLon=127.1, modelType='ram', isPlot=True) # receiveLat=17.5, receiveLon=129, modelType='bellhop', isPlot=True)
+15 -3
查看文件
@@ -1,16 +1,21 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
import warnings import warnings
warnings.filterwarnings('ignore') warnings.filterwarnings('ignore')
import argparse, json import argparse, json
from common import NoIndent, MyEncoder from common import NoIndent, MyEncoder
import os, sys import os, sys
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)) + '/pyat') sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)) + '/pyat')
# import time
def _argparse(): def _argparse():
parser = argparse.ArgumentParser(description='tl client') parser = argparse.ArgumentParser(description='tl client')
parser.add_argument('-a', '--argfile', action='store', dest='argfile', required=True, help='name of arguments file') parser.add_argument('-a', '--argfile', action='store', dest='argfile', required=True, help='name of arguments file')
return parser.parse_args() return parser.parse_args()
def main(): def main():
parser = _argparse() parser = _argparse()
argfile = parser.argfile argfile = parser.argfile
@@ -53,7 +58,8 @@ def main():
# 设置时间段 # 设置时间段
database.set_timePeriod(timeIndex) database.set_timePeriod(timeIndex)
[ranges, depths, TL, bathym] = call_tl(database=database, freq=freq, sourceDepth=sourceDepth, sourceLat=sLat, sourceLon=sLon, receiveDepth=receiveDepth, [ranges, depths, TL, bathym] = call_tl(database=database, freq=freq, sourceDepth=sourceDepth, sourceLat=sLat,
sourceLon=sLon,
receiveLat=rLat, receiveLon=rLon, modelType=modelType, isPlot=png) receiveLat=rLat, receiveLon=rLon, modelType=modelType, isPlot=png)
# write data to file # write data to file
@@ -66,7 +72,8 @@ def main():
"descript": "距离、深度", "descript": "距离、深度",
"data": NoIndent(list(zip(bathym.r, bathym.d))) "data": NoIndent(list(zip(bathym.r, bathym.d)))
} }
with open(("" if outParam["outPath"]=="" else outParam["outPath"] + "/")+"tlOut_bathym.json", 'w') as jsonFile: with open(("" if outParam["outPath"] == "" else outParam["outPath"] + "/") + "tlOut_bathym.json",
'w') as jsonFile:
json_data = json.dumps(bathymData, cls=MyEncoder, indent=2, ensure_ascii=False) json_data = json.dumps(bathymData, cls=MyEncoder, indent=2, ensure_ascii=False)
jsonFile.write(json_data) jsonFile.write(json_data)
@@ -75,7 +82,8 @@ def main():
depths = np.around(depths, decimals=0) depths = np.around(depths, decimals=0)
ranges = np.around(ranges, decimals=0) ranges = np.around(ranges, decimals=0)
TL = np.around(TL, decimals=2) TL = np.around(TL, decimals=2)
tlpoint = list(zip(np.tile(depths.reshape(len(depths),1),len(ranges)).flatten(), np.tile(ranges,(len(depths),1)).flatten(), TL.flatten())) tlpoint = list(zip(np.tile(depths.reshape(len(depths), 1), len(ranges)).flatten(),
np.tile(ranges, (len(depths), 1)).flatten(), TL.flatten()))
tlData = { tlData = {
"param": paramData, "param": paramData,
"count": len(ranges) * len(depths), "count": len(ranges) * len(depths),
@@ -86,5 +94,9 @@ def main():
json_data = json.dumps(tlData, cls=MyEncoder, indent=2, ensure_ascii=False) json_data = json.dumps(tlData, cls=MyEncoder, indent=2, ensure_ascii=False)
jsonFile.write(json_data) jsonFile.write(json_data)
if __name__ == '__main__': if __name__ == '__main__':
# start = time.perf_counter()
main() main()
# end = time.perf_counter()
# print('time = ',(end-start))