你已经派生过 gprMax
镜像自地址
https://gitee.com/sunhf/gprMax.git
已同步 2025-08-07 04:56:51 +08:00
updated the pre-commit-config.yaml file by adding the isort hook.
这个提交包含在:
@@ -12,3 +12,8 @@ repos:
|
||||
hooks:
|
||||
- id: black
|
||||
args: ["--line-length", "120"] # Adjust the max line length value as needed.
|
||||
- repo: https://github.com/pycqa/isort
|
||||
rev: 5.12.0
|
||||
hooks:
|
||||
- id: isort
|
||||
args: ["--line-length", "120", "--profile", "black"]
|
||||
|
@@ -10,6 +10,7 @@ source is used with a waveform shaped as the first derivative of a gaussian.
|
||||
"""
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
import gprMax
|
||||
from gprMax.materials import calculate_water_properties
|
||||
|
||||
|
@@ -18,10 +18,11 @@
|
||||
|
||||
import logging
|
||||
|
||||
import gprMax.config as config
|
||||
import numpy as np
|
||||
from scipy.spatial.transform import Rotation as R
|
||||
|
||||
import gprMax.config as config
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
|
@@ -18,9 +18,10 @@
|
||||
|
||||
import logging
|
||||
|
||||
import gprMax.config as config
|
||||
import numpy as np
|
||||
|
||||
import gprMax.config as config
|
||||
|
||||
from ..cython.geometry_primitives import build_voxels_from_array, build_voxels_from_array_mask
|
||||
from .cmds_geometry import UserObjectGeometry
|
||||
|
||||
|
@@ -19,9 +19,10 @@
|
||||
import logging
|
||||
from pathlib import Path
|
||||
|
||||
import gprMax.config as config
|
||||
import h5py
|
||||
|
||||
import gprMax.config as config
|
||||
|
||||
from ..cython.geometry_primitives import build_voxels_from_array
|
||||
from ..hash_cmds_file import get_user_objects
|
||||
from ..utilities.utilities import round_value
|
||||
|
@@ -20,10 +20,11 @@ import inspect
|
||||
import logging
|
||||
from pathlib import Path
|
||||
|
||||
import gprMax.config as config
|
||||
import numpy as np
|
||||
from scipy import interpolate
|
||||
|
||||
import gprMax.config as config
|
||||
|
||||
from .pml import PML
|
||||
from .utilities.host_info import set_omp_threads
|
||||
from .waveforms import Waveform
|
||||
|
@@ -17,8 +17,8 @@
|
||||
# along with gprMax. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import numpy as np
|
||||
cimport numpy as np
|
||||
|
||||
cimport numpy as np
|
||||
|
||||
ctypedef fused float_or_double:
|
||||
float
|
||||
|
@@ -18,7 +18,6 @@
|
||||
|
||||
from string import Template
|
||||
|
||||
|
||||
store_snapshot = {
|
||||
"args_cuda": Template(
|
||||
"""
|
||||
|
@@ -18,7 +18,6 @@
|
||||
|
||||
from string import Template
|
||||
|
||||
|
||||
store_outputs = {
|
||||
"args_cuda": Template(
|
||||
"""
|
||||
|
@@ -17,20 +17,25 @@
|
||||
# along with gprMax. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import numpy as np
|
||||
|
||||
cimport numpy as np
|
||||
|
||||
np.seterr(divide='raise')
|
||||
from cython.parallel import prange
|
||||
|
||||
from gprMax.cython.yee_cell_setget_rigid cimport set_rigid_Ex
|
||||
from gprMax.cython.yee_cell_setget_rigid cimport set_rigid_Ey
|
||||
from gprMax.cython.yee_cell_setget_rigid cimport set_rigid_Ez
|
||||
from gprMax.cython.yee_cell_setget_rigid cimport set_rigid_Hx
|
||||
from gprMax.cython.yee_cell_setget_rigid cimport set_rigid_Hy
|
||||
from gprMax.cython.yee_cell_setget_rigid cimport set_rigid_Hz
|
||||
from gprMax.cython.yee_cell_setget_rigid cimport set_rigid_E
|
||||
from gprMax.cython.yee_cell_setget_rigid cimport unset_rigid_E
|
||||
from gprMax.cython.yee_cell_setget_rigid cimport set_rigid_H
|
||||
from gprMax.cython.yee_cell_setget_rigid cimport unset_rigid_H
|
||||
from gprMax.cython.yee_cell_setget_rigid cimport (
|
||||
set_rigid_E,
|
||||
set_rigid_Ex,
|
||||
set_rigid_Ey,
|
||||
set_rigid_Ez,
|
||||
set_rigid_H,
|
||||
set_rigid_Hx,
|
||||
set_rigid_Hy,
|
||||
set_rigid_Hz,
|
||||
unset_rigid_E,
|
||||
unset_rigid_H,
|
||||
)
|
||||
|
||||
from gprMax.utilities.utilities import round_value
|
||||
|
||||
|
||||
|
@@ -17,14 +17,18 @@
|
||||
# along with gprMax. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import numpy as np
|
||||
|
||||
cimport numpy as np
|
||||
|
||||
from gprMax.cython.yee_cell_setget_rigid cimport get_rigid_Ex
|
||||
from gprMax.cython.yee_cell_setget_rigid cimport get_rigid_Ey
|
||||
from gprMax.cython.yee_cell_setget_rigid cimport get_rigid_Ez
|
||||
from gprMax.cython.yee_cell_setget_rigid cimport get_rigid_Hx
|
||||
from gprMax.cython.yee_cell_setget_rigid cimport get_rigid_Hy
|
||||
from gprMax.cython.yee_cell_setget_rigid cimport get_rigid_Hz
|
||||
from gprMax.cython.yee_cell_setget_rigid cimport (
|
||||
get_rigid_Ex,
|
||||
get_rigid_Ey,
|
||||
get_rigid_Ez,
|
||||
get_rigid_Hx,
|
||||
get_rigid_Hy,
|
||||
get_rigid_Hz,
|
||||
)
|
||||
|
||||
from gprMax.materials import Material
|
||||
|
||||
|
||||
|
@@ -16,13 +16,12 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with gprMax. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import numpy as np
|
||||
import logging
|
||||
|
||||
import numpy as np
|
||||
|
||||
import gprMax.config as config
|
||||
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
|
@@ -16,9 +16,10 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with gprMax. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import gprMax.config as config
|
||||
import numpy as np
|
||||
|
||||
import gprMax.config as config
|
||||
|
||||
|
||||
class Rx:
|
||||
"""Receiver output points."""
|
||||
|
@@ -17,8 +17,8 @@
|
||||
# along with gprMax. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import logging
|
||||
from pathlib import Path
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
import h5py
|
||||
import numpy as np
|
||||
|
@@ -18,9 +18,10 @@
|
||||
|
||||
from copy import deepcopy
|
||||
|
||||
import gprMax.config as config
|
||||
import numpy as np
|
||||
|
||||
import gprMax.config as config
|
||||
|
||||
from .fields_outputs import Ix, Iy, Iz
|
||||
from .utilities.utilities import round_value
|
||||
|
||||
|
@@ -17,6 +17,7 @@
|
||||
# along with gprMax. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import logging
|
||||
|
||||
import numpy as np
|
||||
from scipy import interpolate
|
||||
|
||||
|
@@ -18,9 +18,10 @@
|
||||
|
||||
import logging
|
||||
|
||||
import gprMax.config as config
|
||||
import numpy as np
|
||||
|
||||
import gprMax.config as config
|
||||
|
||||
from .subgrids.grid import SubGridBaseGrid
|
||||
from .utilities.utilities import round_value
|
||||
|
||||
|
@@ -17,6 +17,7 @@
|
||||
# along with gprMax. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import logging
|
||||
|
||||
import numpy as np
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
1
setup.py
1
setup.py
@@ -29,7 +29,6 @@ from Cython.Build import cythonize
|
||||
from jinja2 import Environment, FileSystemLoader
|
||||
from setuptools import Extension, find_packages, setup
|
||||
|
||||
|
||||
# Check Python version
|
||||
MIN_PYTHON_VERSION = (3, 7)
|
||||
if sys.version_info[:2] < MIN_PYTHON_VERSION:
|
||||
|
@@ -4,10 +4,10 @@
|
||||
"""
|
||||
|
||||
|
||||
from pathlib import Path
|
||||
import gprMax
|
||||
|
||||
import itertools
|
||||
from pathlib import Path
|
||||
|
||||
import gprMax
|
||||
|
||||
# File path for output
|
||||
fn = Path(__file__)
|
||||
|
@@ -1,8 +1,9 @@
|
||||
from pathlib import Path
|
||||
|
||||
import gprMax
|
||||
import numpy as np
|
||||
|
||||
import gprMax
|
||||
|
||||
# File path for output
|
||||
fn = Path(__file__)
|
||||
parts = fn.parts
|
||||
|
@@ -1,8 +1,9 @@
|
||||
from pathlib import Path
|
||||
|
||||
import gprMax
|
||||
import numpy as np
|
||||
|
||||
import gprMax
|
||||
|
||||
# File path for output
|
||||
fn = Path(__file__)
|
||||
parts = fn.parts
|
||||
|
@@ -20,11 +20,11 @@ import logging
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
import gprMax
|
||||
import h5py
|
||||
import matplotlib.pyplot as plt
|
||||
import numpy as np
|
||||
|
||||
import gprMax
|
||||
from testing.analytical_solutions import hertzian_dipole_fs
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
@@ -9,11 +9,12 @@ import argparse
|
||||
import logging
|
||||
import os
|
||||
|
||||
import gprMax.config as config
|
||||
import h5py
|
||||
import matplotlib.pyplot as plt
|
||||
import numpy as np
|
||||
|
||||
import gprMax.config as config
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
|
@@ -9,10 +9,11 @@ import argparse
|
||||
import logging
|
||||
import os
|
||||
|
||||
import gprMax.config as config
|
||||
import matplotlib.pyplot as plt
|
||||
import numpy as np
|
||||
|
||||
import gprMax.config as config
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
|
@@ -14,7 +14,6 @@ import matplotlib.gridspec as gridspec
|
||||
import numpy as np
|
||||
import scipy.interpolate
|
||||
from matplotlib import pylab as plt
|
||||
|
||||
from optimization import DA_DLS, DE_DLS, PSO_DLS
|
||||
|
||||
|
||||
|
@@ -2,7 +2,8 @@
|
||||
# "Incorporating dispersive electrical properties in FDTD GPR models
|
||||
# using a general Cole-Cole dispersion function,"
|
||||
# 2012 14th International Conference on Ground Penetrating Radar (GPR), 2012, pp. 232-236
|
||||
import os, sys
|
||||
import os
|
||||
import sys
|
||||
|
||||
sys.path.append(os.path.join(os.path.dirname(__file__), ".."))
|
||||
from Debye_Fit import HavriliakNegami
|
||||
|
@@ -24,6 +24,7 @@ import h5py
|
||||
import matplotlib.gridspec as gridspec
|
||||
import matplotlib.pyplot as plt
|
||||
import numpy as np
|
||||
|
||||
from gprMax.receivers import Rx
|
||||
from gprMax.utilities.utilities import fft_power
|
||||
|
||||
|
@@ -22,6 +22,7 @@ from pathlib import Path
|
||||
|
||||
import matplotlib.pyplot as plt
|
||||
import numpy as np
|
||||
|
||||
from gprMax.utilities.utilities import fft_power, round_value
|
||||
from gprMax.waveforms import Waveform
|
||||
|
||||
|
@@ -3,9 +3,10 @@ import multiprocessing as mp
|
||||
import sys
|
||||
|
||||
import numpy as np
|
||||
from gprMax.utilities.utilities import get_terminal_width
|
||||
from tqdm import tqdm
|
||||
|
||||
from gprMax.utilities.utilities import get_terminal_width
|
||||
|
||||
from . import perimeter
|
||||
|
||||
|
||||
|
在新工单中引用
屏蔽一个用户