# Path: gprMax/constants.py



import argparse
import os
import sys
import numpy as np
import matplotlib.pyplot as plt
from gprMax.constants import c, z0
########################################
# User configurable parameters

# Pattern type (E or H)
type = 'H'

# Relative permittivity of half-space for homogeneous materials (set to None for inhomogeneous)
epsr = 5

# Observation radii and angles
radii = np.linspace(0.1, 0.3, 20)
theta = np.linspace(3, 357, 60)
theta = np.deg2rad(np.append(theta, theta[0]))  # Append start value to close circle

# Centre frequency of modelled antenna
f = 1.5e9  # GSSI 1.5GHz antenna model

# Largest dimension of antenna transmitting element
D = 0.060  # GSSI 1.5GHz antenna model

# Minimum value for plotting energy and ring steps (dB)
min = -72
step = 12
########################################

# Critical angle and velocity
if epsr:
    mr = 1
    z1 = np.sqrt(mr / epsr) * z0
    v1 = c / np.sqrt(epsr)

# Path: gprMax/constants.py



# Path: user_libs/antenna_patterns/plot_fields.py
import argparse
import os
import sys
import numpy as np
import matplotlib.pyplot as plt
from gprMax.constants import c, z0

########################################
# User configurable parameters

# Pattern type (E or H)
type = 'H'

# Relative permittivity of half-space for homogeneous materials (set to None for inhomogeneous)
epsr = 5

# Observation radii and angles
radii = np.linspace(0.1, 0.3, 20)
theta = np.linspace(3, 357, 60)
theta = np.deg2rad(np.append(theta, theta[0]))  # Append start value to close circle

# Centre frequency of modelled antenna
f = 1.5e9  # GSSI 1.5GHz antenna model

# Largest dimension of antenna transmitting element
D = 0.060  # GSSI 1.5GHz antenna model

# Minimum value for plotting energy and ring steps (dB)
min = -72
step = 12
########################################

# Critical angle and velocity
if epsr:
    mr = 1
    z1 = np.sqrt(mr / epsr) * z0
    v1 = c / np.sqrt(epsr)

    thetac = np.round(np.rad2deg(np.arcsin(v1 / c)))