你已经派生过 gprMax
镜像自地址
https://gitee.com/sunhf/gprMax.git
已同步 2025-08-07 04:56:51 +08:00
Updated copyright date and moved to reading objects pickled to file.
这个提交包含在:
@@ -1,23 +1,25 @@
|
|||||||
# Copyright (C) 2015, Craig Warren
|
# Copyright (C) 2015-2016, Craig Warren
|
||||||
#
|
#
|
||||||
# This module is licensed under the Creative Commons Attribution-ShareAlike 4.0 International License.
|
# This module is licensed under the Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
# To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/4.0/.
|
# To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/4.0/.
|
||||||
#
|
#
|
||||||
# Please use the attribution at http://dx.doi.org/10.1190/1.3548506
|
# Please use the attribution at http://dx.doi.org/10.1190/1.3548506
|
||||||
|
|
||||||
import argparse
|
import argparse, pickle
|
||||||
import numpy as np
|
|
||||||
|
|
||||||
from gprMax.optimisation_taguchi import plot_optimisation_history
|
from gprMax.optimisation_taguchi import plot_optimisation_history
|
||||||
|
|
||||||
"""Plots the results (stored in a NumPy archive) from a Taguchi optimisation process."""
|
"""Plots the results (pickled to file) from a Taguchi optimisation process."""
|
||||||
|
|
||||||
# Parse command line arguments
|
# Parse command line arguments
|
||||||
parser = argparse.ArgumentParser(description='Plots the results (stored in a NumPy archive) from a Taguchi optimisation process.', usage='cd gprMax; python -m user_libs.optimisation_taguchi_plot numpyfile')
|
parser = argparse.ArgumentParser(description='Plots the results (pickled to file) from a Taguchi optimisation process.', usage='cd gprMax; python -m user_libs.optimisation_taguchi_plot picklefile')
|
||||||
parser.add_argument('numpyfile', help='name of NumPy archive including path')
|
parser.add_argument('picklefile', help='name of file including path')
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
results = np.load(args.numpyfile)
|
f = open(args.picklefile, 'rb')
|
||||||
|
optparamshist = pickle.load(f)
|
||||||
|
fitnessvalueshist = pickle.load(f)
|
||||||
|
optparamsinit = pickle.load(f)
|
||||||
|
|
||||||
# Plot the history of fitness values and each optimised parameter values for the optimisation
|
# Plot the history of fitness values and each optimised parameter values for the optimisation
|
||||||
plot_optimisation_history(results[fitnessvalueshist], results[optparamshist], results[optparamsinit])
|
plot_optimisation_history(fitnessvalueshist, optparamshist, optparamsinit)
|
在新工单中引用
屏蔽一个用户