你已经派生过 gprMax
镜像自地址
https://gitee.com/sunhf/gprMax.git
已同步 2025-08-03 19:26:50 +08:00
Merge branch 'devel' into mpi
这个提交包含在:
@@ -9,11 +9,13 @@ build:
|
||||
os: ubuntu-22.04
|
||||
apt_packages:
|
||||
- mpich
|
||||
- libfftw3-dev
|
||||
tools:
|
||||
python: "mambaforge-22.9"
|
||||
jobs:
|
||||
post_create_environment:
|
||||
- python -m pip install sphinx_rtd_theme
|
||||
- python -m pip install reframe-hpc
|
||||
|
||||
conda:
|
||||
environment: conda_env.yml
|
||||
|
@@ -89,7 +89,7 @@ The following steps provide guidance on how to install gprMax:
|
||||
5. [Optional] Build h5py against Parallel HDF5
|
||||
6. Build and install gprMax
|
||||
|
||||
7. Install a C compiler which supports OpenMP
|
||||
1. Install a C compiler which supports OpenMP
|
||||
---------------------------------------------
|
||||
|
||||
Linux
|
||||
|
@@ -433,19 +433,19 @@ def process_multicmds(multicmds):
|
||||
for cmdinstance in multicmds[cmdname]:
|
||||
tmp = cmdinstance.split()
|
||||
|
||||
if len(tmp) < 5:
|
||||
if len(tmp) < 4:
|
||||
logger.exception(
|
||||
"'"
|
||||
+ cmdname
|
||||
+ ": "
|
||||
+ " ".join(tmp)
|
||||
+ "'"
|
||||
+ " requires at least five parameters"
|
||||
+ " requires at least four parameters"
|
||||
)
|
||||
raise ValueError
|
||||
|
||||
poles = int(tmp[0])
|
||||
material_ids = tmp[(3 * poles) + 1 : len(tmp)]
|
||||
material_ids = tmp[(2 * poles) + 1 : len(tmp)]
|
||||
omega = []
|
||||
gamma = []
|
||||
|
||||
|
@@ -66,7 +66,7 @@ if epsr:
|
||||
mr = 1
|
||||
z1 = np.sqrt(mr / epsr) * z0
|
||||
v1 = c / np.sqrt(epsr)
|
||||
thetac = np.round(np.arcsin(v1 / c * (180 / np.pi))
|
||||
thetac = np.round(np.arcsin(v1 / c * (180 / np.pi)))
|
||||
wavelength = v1 / f
|
||||
|
||||
# Print some useful information
|
||||
|
@@ -14,7 +14,7 @@ Manufacturer/Model Dimensions Resolution(s) Author/Contact
|
||||
======================== ============= ============= ========================================================================================================================================================================================================================= ================
|
||||
GSSI 1.5GHz (Model 5100) 170x108x45mm 1, 2mm Craig Warren (craig.warren@northumbria.ac.uk), Northumbria University, UK 1,2
|
||||
MALA 1.2GHz 184x109x46mm 1, 2mm Craig Warren (craig.warren@northumbria.ac.uk), Northumbria University, UK 1
|
||||
GSSI 400MHz 300x300x170mm 2mm Sam Stadler (sam.stadler@leibniz-liag.de), `Leibniz Institute for Applied Geophysics <https://www.leibniz-liag.de/en/research/methods/electromagnetic-methods/ground-penetrating-radar.html>`_, Germany 3
|
||||
GSSI 400MHz 300x300x170mm 2mm Sam Stadler (sam.stadler@leibniz-liag.de), `Leibniz Institute for Applied Geophysics <https://www.leibniz-liag.de/en/research/methods/electromagnetic-methods/ground-penetrating-radar.html>`_, Germany 3
|
||||
======================== ============= ============= ========================================================================================================================================================================================================================= ================
|
||||
|
||||
**License**: `Creative Commons Attribution-ShareAlike 4.0 International License <http://creativecommons.org/licenses/by-sa/4.0/>`_
|
||||
|
@@ -197,22 +197,22 @@ def mpl_plot(filename, outputs=Rx.defaultoutputs, fft=False, save=False):
|
||||
# If multiple outputs required, create all nine subplots and
|
||||
# populate only the specified ones
|
||||
else:
|
||||
fig, ax = plt.subplots(
|
||||
plt_cols = 3 if len(outputs) == 9 else 2
|
||||
|
||||
fig, axs = plt.subplots(
|
||||
subplot_kw=dict(xlabel="Time [s]"),
|
||||
num=rxpath + " - " + f[rxpath].attrs["Name"],
|
||||
figsize=(20, 10),
|
||||
nrows = 3,
|
||||
ncols = plt_cols,
|
||||
facecolor="w",
|
||||
edgecolor="w",
|
||||
)
|
||||
if len(outputs) == 9:
|
||||
gs = gridspec.GridSpec(3, 3, hspace=0.3, wspace=0.3)
|
||||
else:
|
||||
gs = gridspec.GridSpec(3, 2, hspace=0.3, wspace=0.3)
|
||||
|
||||
for output in outputs:
|
||||
# Check for polarity of output and if requested output
|
||||
# is in file
|
||||
if output[-1] == "m":
|
||||
if output[-1] == "-":
|
||||
polarity = -1
|
||||
outputtext = "-" + output[0:-1]
|
||||
output = output[0:-1]
|
||||
@@ -233,47 +233,32 @@ def mpl_plot(filename, outputs=Rx.defaultoutputs, fft=False, save=False):
|
||||
outputdata = f[rxpath + output][:] * polarity
|
||||
|
||||
if output == "Ex":
|
||||
ax = plt.subplot(gs[0, 0])
|
||||
ax.plot(time, outputdata, "r", lw=2, label=outputtext)
|
||||
ax.set_ylabel(outputtext + ", field strength [V/m]")
|
||||
# ax.set_ylim([-15, 20])
|
||||
axs[0, 0].plot(time, outputdata, "r", lw=2, label=outputtext)
|
||||
axs[0, 0].set_ylabel(outputtext + ", field strength [V/m]")
|
||||
elif output == "Ey":
|
||||
ax = plt.subplot(gs[1, 0])
|
||||
ax.plot(time, outputdata, "r", lw=2, label=outputtext)
|
||||
ax.set_ylabel(outputtext + ", field strength [V/m]")
|
||||
# ax.set_ylim([-15, 20])
|
||||
axs[1, 0].plot(time, outputdata, "r", lw=2, label=outputtext)
|
||||
axs[1, 0].set_ylabel(outputtext + ", field strength [V/m]")
|
||||
elif output == "Ez":
|
||||
ax = plt.subplot(gs[2, 0])
|
||||
ax.plot(time, outputdata, "r", lw=2, label=outputtext)
|
||||
ax.set_ylabel(outputtext + ", field strength [V/m]")
|
||||
# ax.set_ylim([-15, 20])
|
||||
axs[2, 0].plot(time, outputdata, "r", lw=2, label=outputtext)
|
||||
axs[2, 0].set_ylabel(outputtext + ", field strength [V/m]")
|
||||
elif output == "Hx":
|
||||
ax = plt.subplot(gs[0, 1])
|
||||
ax.plot(time, outputdata, "g", lw=2, label=outputtext)
|
||||
ax.set_ylabel(outputtext + ", field strength [A/m]")
|
||||
# ax.set_ylim([-0.03, 0.03])
|
||||
axs[0, 1].plot(time, outputdata, "g", lw=2, label=outputtext)
|
||||
axs[0, 1].set_ylabel(outputtext + ", field strength [A/m]")
|
||||
elif output == "Hy":
|
||||
ax = plt.subplot(gs[1, 1])
|
||||
ax.plot(time, outputdata, "g", lw=2, label=outputtext)
|
||||
ax.set_ylabel(outputtext + ", field strength [A/m]")
|
||||
# ax.set_ylim([-0.03, 0.03])
|
||||
axs[1, 1].plot(time, outputdata, "g", lw=2, label=outputtext)
|
||||
axs[1, 1].set_ylabel(outputtext + ", field strength [A/m]")
|
||||
elif output == "Hz":
|
||||
ax = plt.subplot(gs[2, 1])
|
||||
ax.plot(time, outputdata, "g", lw=2, label=outputtext)
|
||||
ax.set_ylabel(outputtext + ", field strength [A/m]")
|
||||
# ax.set_ylim([-0.03, 0.03])
|
||||
axs[2, 1].plot(time, outputdata, "g", lw=2, label=outputtext)
|
||||
axs[2, 1].set_ylabel(outputtext + ", field strength [A/m]")
|
||||
elif output == "Ix":
|
||||
ax = plt.subplot(gs[0, 2])
|
||||
ax.plot(time, outputdata, "b", lw=2, label=outputtext)
|
||||
ax.set_ylabel(outputtext + ", current [A]")
|
||||
axs[0, 2].plot(time, outputdata, "b", lw=2, label=outputtext)
|
||||
axs[0, 2].set_ylabel(outputtext + ", current [A]")
|
||||
elif output == "Iy":
|
||||
ax = plt.subplot(gs[1, 2])
|
||||
ax.plot(time, outputdata, "b", lw=2, label=outputtext)
|
||||
ax.set_ylabel(outputtext + ", current [A]")
|
||||
axs[1, 2].plot(time, outputdata, "b", lw=2, label=outputtext)
|
||||
axs[1, 2].set_ylabel(outputtext + ", current [A]")
|
||||
elif output == "Iz":
|
||||
ax = plt.subplot(gs[2, 2])
|
||||
ax.plot(time, outputdata, "b", lw=2, label=outputtext)
|
||||
ax.set_ylabel(outputtext + ", current [A]")
|
||||
axs[2, 2].plot(time, outputdata, "b", lw=2, label=outputtext)
|
||||
axs[2, 2].set_ylabel(outputtext + ", current [A]")
|
||||
for ax in fig.axes:
|
||||
ax.set_xlim([0, np.amax(time)])
|
||||
ax.grid(which="both", axis="both", linestyle="-.")
|
||||
|
@@ -159,13 +159,13 @@ def mpl_plot(w, timewindow, dt, iterations, fft=False, save=False):
|
||||
pad_inches=0.1,
|
||||
)
|
||||
# Save a PNG of the figure
|
||||
fig.savefig(
|
||||
savefile.with_suffix(".png"),
|
||||
dpi=150,
|
||||
format="png",
|
||||
bbox_inches="tight",
|
||||
pad_inches=0.1,
|
||||
)
|
||||
# fig.savefig(
|
||||
# savefile.with_suffix(".png"),
|
||||
# dpi=150,
|
||||
# format="png",
|
||||
# bbox_inches="tight",
|
||||
# pad_inches=0.1,
|
||||
# )
|
||||
|
||||
return plt
|
||||
|
||||
|
在新工单中引用
屏蔽一个用户