你已经派生过 gprMax
镜像自地址
https://gitee.com/sunhf/gprMax.git
已同步 2025-08-07 04:56:51 +08:00
Added the ability to pass a dictionary of variables into the antenna functions.
这个提交包含在:
@@ -8,12 +8,13 @@
|
|||||||
from gprMax.exceptions import CmdInputError
|
from gprMax.exceptions import CmdInputError
|
||||||
|
|
||||||
|
|
||||||
def antenna_like_GSSI_1500(x, y, z, resolution=0.001):
|
def antenna_like_GSSI_1500(x, y, z, resolution=0.001, **kwargs):
|
||||||
"""Inserts a description of an antenna similar to the GSSI 1.5GHz antenna. Can be used with 1mm (default) or 2mm spatial resolution. The external dimensions of the antenna are 170mm x 108mm x 45mm. One output point is defined between the arms of the receiever bowtie. The bowties are aligned with the y axis so the output is the y component of the electric field.
|
"""Inserts a description of an antenna similar to the GSSI 1.5GHz antenna. Can be used with 1mm (default) or 2mm spatial resolution. The external dimensions of the antenna are 170mm x 108mm x 45mm. One output point is defined between the arms of the receiever bowtie. The bowties are aligned with the y axis so the output is the y component of the electric field.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
x, y, z (float): Coordinates of a location in the model to insert the antenna. Coordinates are relative to the geometric centre of the antenna in the x-y plane and the bottom of the antenna skid in the z direction.
|
x, y, z (float): Coordinates of a location in the model to insert the antenna. Coordinates are relative to the geometric centre of the antenna in the x-y plane and the bottom of the antenna skid in the z direction.
|
||||||
resolution (float): Spatial resolution for the antenna model.
|
resolution (float): Spatial resolution for the antenna model.
|
||||||
|
kwargs (dict): Optional variables, e.g. can be fed from an optimisation process.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
# Antenna geometry properties
|
# Antenna geometry properties
|
||||||
@@ -136,16 +137,17 @@ def antenna_like_GSSI_1500(x, y, z, resolution=0.001):
|
|||||||
# Output point - transmitter bowtie
|
# Output point - transmitter bowtie
|
||||||
#print('#rx: {} {} {}'.format(tx[0], tx[1], tx[2]))
|
#print('#rx: {} {} {}'.format(tx[0], tx[1], tx[2]))
|
||||||
# Output point - receiver bowtie
|
# Output point - receiver bowtie
|
||||||
print('#rx: {} {} {}'.format(tx[0] - 0.059, tx[1], tx[2]))
|
print('#rx: {} {} {} rxGSSI1500 Ey'.format(tx[0] - 0.059, tx[1], tx[2]))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def antenna_like_MALA_1200(x, y, z, resolution=0.001):
|
def antenna_like_MALA_1200(x, y, z, resolution=0.001, **kwargs):
|
||||||
"""Inserts a description of an antenna similar to the MALA 1.2GHz antenna. Can be used with 1mm (default) or 2mm spatial resolution. The external dimensions of the antenna are 184mm x 109mm x 46mm. One output point is defined between the arms of the receiever bowtie. The bowties are aligned with the y axis so the output is the y component of the electric field.
|
"""Inserts a description of an antenna similar to the MALA 1.2GHz antenna. Can be used with 1mm (default) or 2mm spatial resolution. The external dimensions of the antenna are 184mm x 109mm x 46mm. One output point is defined between the arms of the receiever bowtie. The bowties are aligned with the y axis so the output is the y component of the electric field.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
x, y, z (float): Coordinates of a location in the model to insert the antenna. Coordinates are relative to the geometric centre of the antenna in the x-y plane and the bottom of the antenna skid in the z direction.
|
x, y, z (float): Coordinates of a location in the model to insert the antenna. Coordinates are relative to the geometric centre of the antenna in the x-y plane and the bottom of the antenna skid in the z direction.
|
||||||
resolution (float): Spatial resolution for the antenna model.
|
resolution (float): Spatial resolution for the antenna model.
|
||||||
|
kwargs (dict): Optional variables, e.g. can be fed from an optimisation process.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
# Antenna geometry properties
|
# Antenna geometry properties
|
||||||
@@ -340,5 +342,5 @@ def antenna_like_MALA_1200(x, y, z, resolution=0.001):
|
|||||||
# Output point - transmitter bowtie
|
# Output point - transmitter bowtie
|
||||||
#print('#rx: {} {} {}'.format(tx[0], tx[1], tx[2]))
|
#print('#rx: {} {} {}'.format(tx[0], tx[1], tx[2]))
|
||||||
# Output point - receiver bowtie
|
# Output point - receiver bowtie
|
||||||
print('#rx: {} {} {}'.format(tx[0] + 0.076, tx[1], tx[2]))
|
print('#rx: {} {} {} rxMALA1200 Ey'.format(tx[0] + 0.076, tx[1], tx[2]))
|
||||||
|
|
||||||
|
在新工单中引用
屏蔽一个用户