你已经派生过 gprMax
镜像自地址
https://gitee.com/sunhf/gprMax.git
已同步 2025-08-07 15:10:13 +08:00
Merge branch 'devel' into mpi
Conflicts: requirements.txt
这个提交包含在:
@@ -871,7 +871,7 @@ class Rx(UserObjectMulti):
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
r.ID = self.kwargs["id"]
|
r.ID = self.kwargs["id"]
|
||||||
outputs = [self.kwargs["outputs"]]
|
outputs = list(self.kwargs["outputs"])
|
||||||
except KeyError:
|
except KeyError:
|
||||||
# If no ID or outputs are specified, use default
|
# If no ID or outputs are specified, use default
|
||||||
r.ID = f"{r.__class__.__name__}({str(r.xcoord)},{str(r.ycoord)},{str(r.zcoord)})"
|
r.ID = f"{r.__class__.__name__}({str(r.xcoord)},{str(r.ycoord)},{str(r.zcoord)})"
|
||||||
|
2
setup.py
2
setup.py
@@ -253,7 +253,7 @@ else:
|
|||||||
)
|
)
|
||||||
|
|
||||||
# Parse long_description from README.rst file.
|
# Parse long_description from README.rst file.
|
||||||
with open("README.rst", "r") as fd:
|
with open("README.rst", "r", encoding="utf-8") as fd:
|
||||||
long_description = fd.read()
|
long_description = fd.read()
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
|
@@ -13,10 +13,15 @@ import h5py
|
|||||||
import matplotlib.pyplot as plt
|
import matplotlib.pyplot as plt
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
|
||||||
import gprMax.config as config
|
from scipy.constants import c
|
||||||
|
from scipy.constants import epsilon_0 as e0
|
||||||
|
from scipy.constants import mu_0 as m0
|
||||||
|
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
# Impedance of free space (Ohms)
|
||||||
|
z0 = np.sqrt(m0 / e0)
|
||||||
|
|
||||||
# Parse command line arguments
|
# Parse command line arguments
|
||||||
parser = argparse.ArgumentParser(
|
parser = argparse.ArgumentParser(
|
||||||
@@ -59,9 +64,9 @@ traceno = np.s_[:] # All traces
|
|||||||
# Critical angle and velocity
|
# Critical angle and velocity
|
||||||
if epsr:
|
if epsr:
|
||||||
mr = 1
|
mr = 1
|
||||||
z1 = np.sqrt(mr / epsr) * config.sim_config.em_consts["z0"]
|
z1 = np.sqrt(mr / epsr) * z0
|
||||||
v1 = config.sim_config.em_consts["c"] / np.sqrt(epsr)
|
v1 = c / np.sqrt(epsr)
|
||||||
thetac = np.round(np.arcsin(v1 / config.sim_config.em_consts["c"]) * (180 / np.pi))
|
thetac = np.round(np.arcsin(v1 / c * (180 / np.pi))
|
||||||
wavelength = v1 / f
|
wavelength = v1 / f
|
||||||
|
|
||||||
# Print some useful information
|
# Print some useful information
|
||||||
@@ -189,8 +194,8 @@ for radius in range(0, len(radii)):
|
|||||||
Ethetasum[index] = np.sum(Etheta[:, index] ** 2) / z1
|
Ethetasum[index] = np.sum(Etheta[:, index] ** 2) / z1
|
||||||
Hthetasum[index] = np.sum(Htheta[:, index] ** 2) / z1
|
Hthetasum[index] = np.sum(Htheta[:, index] ** 2) / z1
|
||||||
else:
|
else:
|
||||||
Ethetasum[index] = np.sum(Etheta[:, index] ** 2) / config.sim_config.em_consts["z0"]
|
Ethetasum[index] = np.sum(Etheta[:, index] ** 2) / z0
|
||||||
Hthetasum[index] = np.sum(Htheta[:, index] ** 2) / config.sim_config.em_consts["z0"]
|
Hthetasum[index] = np.sum(Htheta[:, index] ** 2) / z0
|
||||||
|
|
||||||
index += 1
|
index += 1
|
||||||
|
|
||||||
|
@@ -12,11 +12,17 @@ import os
|
|||||||
import matplotlib.pyplot as plt
|
import matplotlib.pyplot as plt
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
|
||||||
import gprMax.config as config
|
from scipy.constants import c
|
||||||
|
from scipy.constants import epsilon_0 as e0
|
||||||
|
from scipy.constants import mu_0 as m0
|
||||||
|
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
|
# Impedance of free space (Ohms)
|
||||||
|
z0 = np.sqrt(m0 / e0)
|
||||||
|
|
||||||
# Parse command line arguments
|
# Parse command line arguments
|
||||||
parser = argparse.ArgumentParser(
|
parser = argparse.ArgumentParser(
|
||||||
description="Plot field patterns from a simulation with receivers positioned in circles around an antenna. This module should be used after the field pattern data has been processed and stored using the initial_save.py module.",
|
description="Plot field patterns from a simulation with receivers positioned in circles around an antenna. This module should be used after the field pattern data has been processed and stored using the initial_save.py module.",
|
||||||
@@ -56,9 +62,9 @@ step = 12
|
|||||||
# Critical angle and velocity
|
# Critical angle and velocity
|
||||||
if epsr:
|
if epsr:
|
||||||
mr = 1
|
mr = 1
|
||||||
z1 = np.sqrt(mr / epsr) * config.sim_config.em_consts["z0"]
|
z1 = np.sqrt(mr / epsr) * z0
|
||||||
v1 = config.sim_config.em_consts["c"] / np.sqrt(epsr)
|
v1 = c / np.sqrt(epsr)
|
||||||
thetac = np.round(np.rad2deg(np.arcsin(v1 / config.sim_config.em_consts["c"])))
|
thetac = np.round(np.rad2deg(np.arcsin(v1 / c)))
|
||||||
wavelength = v1 / f
|
wavelength = v1 / f
|
||||||
|
|
||||||
# Print some useful information
|
# Print some useful information
|
||||||
|
在新工单中引用
屏蔽一个用户