From f681cab56e299c0276f40d1e743731a1fe79cee1 Mon Sep 17 00:00:00 2001 From: craig-warren Date: Wed, 8 Mar 2023 18:45:25 -0700 Subject: [PATCH] Copyright and package name updates --- testing/analytical_solutions.py | 2 +- testing/models_pmls/plot_pml_comparison.py | 2 +- testing/test_experimental.py | 2 +- testing/test_models.py | 2 +- toolboxes/AustinManWoman/README.rst | 6 +++--- toolboxes/DebyeFit/README.rst | 14 +++++++------- toolboxes/GPRAntennaModels/README.rst | 2 +- toolboxes/LandmineModels/README.rst | 2 +- toolboxes/Materials/README.rst | 2 +- toolboxes/Plotting/plot_Ascan.py | 2 +- toolboxes/Plotting/plot_Bscan.py | 2 +- toolboxes/Plotting/plot_antenna_params.py | 2 +- toolboxes/Plotting/plot_source_wave.py | 2 +- toolboxes/STLtoVoxel/README.rst | 2 +- toolboxes/Utilities/MATLAB/README.rst | 1 - toolboxes/Utilities/Paraview/gprMax.py | 2 +- toolboxes/Utilities/README.rst | 21 ++++++++++++++++++++- toolboxes/Utilities/convert_png2h5.py | 2 +- toolboxes/Utilities/get_host_spec.py | 2 +- toolboxes/Utilities/outputfiles_merge.py | 2 +- 20 files changed, 46 insertions(+), 28 deletions(-) delete mode 100644 toolboxes/Utilities/MATLAB/README.rst diff --git a/testing/analytical_solutions.py b/testing/analytical_solutions.py index b40fd9ee..90becf41 100644 --- a/testing/analytical_solutions.py +++ b/testing/analytical_solutions.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2022: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. diff --git a/testing/models_pmls/plot_pml_comparison.py b/testing/models_pmls/plot_pml_comparison.py index 7ee79039..2acf1ecf 100644 --- a/testing/models_pmls/plot_pml_comparison.py +++ b/testing/models_pmls/plot_pml_comparison.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2022: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. diff --git a/testing/test_experimental.py b/testing/test_experimental.py index b3f2fcd4..1b96f9f2 100644 --- a/testing/test_experimental.py +++ b/testing/test_experimental.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2022: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. diff --git a/testing/test_models.py b/testing/test_models.py index ac99b600..40e5a420 100644 --- a/testing/test_models.py +++ b/testing/test_models.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2022: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. diff --git a/toolboxes/AustinManWoman/README.rst b/toolboxes/AustinManWoman/README.rst index c68c92dc..46ab9240 100644 --- a/toolboxes/AustinManWoman/README.rst +++ b/toolboxes/AustinManWoman/README.rst @@ -22,7 +22,7 @@ Information FDTD geometry mesh showing the head of the AustinMan model (2x2x2mm :math:`^3`). -The following whole body models are available. +The following whole body models are available: =========== ========================== ================== Model Resolution (mm :math:`^3`) Dimensions (cells) @@ -54,12 +54,12 @@ Package contents * The main body tissues are described using a 3-pole Debye model, but not all materials have a dispersive description. * The dispersive material properties can only be used with the 1x1x1mm or 2x2x2mm AustinMan/Woman models. This is because the time step of the model must always be less than any of the relaxation times of the poles of the Debye models used for the dispersive material properties. -* `head_only_h5.py` is a script to assist with creating a model of only the head from a full body AustinMan/Woman model. +* ``head_only_h5.py`` is a script to assist with creating a model of only the head from a full body AustinMan/Woman model. How to use the package ====================== -The AustinMan and AustinWoman models themselves are not included in the user libraries sub-package. +The AustinMan and AustinWoman models themselves are not included in this sub-package. * `Download a HDF5 file (.h5) of AustinMan or AustinWoman `_ at the resolution you wish to use diff --git a/toolboxes/DebyeFit/README.rst b/toolboxes/DebyeFit/README.rst index bf464e64..83fe5645 100644 --- a/toolboxes/DebyeFit/README.rst +++ b/toolboxes/DebyeFit/README.rst @@ -125,7 +125,7 @@ The ``Jonscher`` class has the following structure: * ``f_min`` is first bound of the frequency range used to approximate the given function (Hz), * ``f_max`` is second bound of the frequency range used to approximate the given function (Hz), * ``e_inf`` is a real part of relative permittivity at infinite frequency, -* ``a_p``` is a Jonscher parameter. Real positive float number, +* ``a_p`` is a Jonscher parameter. Real positive float number, * ``omega_p`` is a Jonscher parameter. Real positive float number, * ``n_p`` Jonscher parameter, 0 < n_p < 1. @@ -183,7 +183,7 @@ Class Optimizer --------------- This class supports global optimization algorithms (particle swarm, dual annealing, evolutionary algorithms) for finding an optimal set of relaxation times that minimise the error between the actual and the approximated electric permittivity, and calculates optimised weights for the given relaxation times. -Code written here is mainly based on external libraries, like ```scipy``` and ```pyswarm```. +Code written here is mainly based on external libraries, like ``scipy`` and ``pyswarm``. More about the ``Optimizer`` class structure can be found in the :doc:`Optimisation doc `. @@ -216,12 +216,12 @@ How to use the package Examples -------- -In the examples directory you will find Jupyter notebooks, scripts, and data that demonstrate different cases of how to use the main script ```DebyeFit.py```: +In the examples directory you will find Jupyter notebooks, scripts, and data that demonstrate different cases of how to use the main script ``DebyeFit.py``: -* ```example_DebyeFitting.ipynb```: simple cases of using all available implemented relaxation functions, -* ```example_BiologicalTissues.ipynb```: simple cases of using Cole-Cole function for biological tissues, -* ```example_ColeCole.py```: simple cases of using Cole-Cole function in case of 3, 5 and automatically chosen number of Debye poles, -* ```Test.txt```: raw data for testing ```Rawdata``` class, file contains 3 columns: the first column contains the frequencies (Hz) associated with the value of the permittivity; the second column contains the real part of the relative permittivity; and the third column contains the imaginary part of the relative permittivity. +* ``example_DebyeFitting.ipynb``: simple cases of using all available implemented relaxation functions, +* ``example_BiologicalTissues.ipynb``: simple cases of using Cole-Cole function for biological tissues, +* ``example_ColeCole.py``: simple cases of using Cole-Cole function in case of 3, 5 and automatically chosen number of Debye poles, +* ``Test.txt``: raw data for testing ``Rawdata`` class, file contains 3 columns: the first column contains the frequencies (Hz) associated with the value of the permittivity; the second column contains the real part of the relative permittivity; and the third column contains the imaginary part of the relative permittivity. The following code shows a basic example of how to use the Havriliak-Negami function: diff --git a/toolboxes/GPRAntennaModels/README.rst b/toolboxes/GPRAntennaModels/README.rst index 04c68c9c..ffcee151 100644 --- a/toolboxes/GPRAntennaModels/README.rst +++ b/toolboxes/GPRAntennaModels/README.rst @@ -50,7 +50,7 @@ To include an antenna model similar to a GSSI 1.5 GHz antenna at a location 0.12 .. code-block:: none #python: - from user_libs.GPRAntennaModels.GSSI import antenna_like_GSSI_1500 + from toolboxes.GPRAntennaModels.GSSI import antenna_like_GSSI_1500 antenna_like_GSSI_1500(0.125, 0.094, 0.100, resolution=0.002) #end_python: diff --git a/toolboxes/LandmineModels/README.rst b/toolboxes/LandmineModels/README.rst index 87560b18..765b22b3 100644 --- a/toolboxes/LandmineModels/README.rst +++ b/toolboxes/LandmineModels/README.rst @@ -71,7 +71,7 @@ The input file for inserting the PMN landmine, with the lower left corner 10mm f #domain: 0.136 0.176 0.070 #dx_dy_dz: 0.001 0.001 0.001 #time_window: 5e-9 - #geometry_objects_read: 0.010 0.010 0.010 ../user_libs/LandmineModels/PMN_1x1x1.h5 ../user_libs/LandmineModels/PMN_materials.txt + #geometry_objects_read: 0.010 0.010 0.010 ../toolboxes/LandmineModels/PMN_1x1x1.h5 ../toolboxes/LandmineModels/PMN_materials.txt #geometry_view: 0 0 0 0.136 0.176 0.070 0.001 0.001 0.001 landmine_PMN_fs n For further information on the ``#geometry_objects_read`` see the section on object contruction commands in the :ref:`Input commands section `. diff --git a/toolboxes/Materials/README.rst b/toolboxes/Materials/README.rst index 3c2feafd..d74b3d1c 100644 --- a/toolboxes/Materials/README.rst +++ b/toolboxes/Materials/README.rst @@ -21,7 +21,7 @@ The simplest way to access any of the material libraries is to use the ``#includ .. code-block:: none - #include_file: user_libs/Materials/eccosorb.txt + #include_file: toolboxes/Materials/eccosorb.txt #box: 0 0 0 0.5 0.5 0.5 eccosorb_ls22 Eccosorb diff --git a/toolboxes/Plotting/plot_Ascan.py b/toolboxes/Plotting/plot_Ascan.py index 295b4b3a..4087c83b 100644 --- a/toolboxes/Plotting/plot_Ascan.py +++ b/toolboxes/Plotting/plot_Ascan.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2022: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. diff --git a/toolboxes/Plotting/plot_Bscan.py b/toolboxes/Plotting/plot_Bscan.py index 11a5d7d8..2f4ddc1d 100644 --- a/toolboxes/Plotting/plot_Bscan.py +++ b/toolboxes/Plotting/plot_Bscan.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2022: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. diff --git a/toolboxes/Plotting/plot_antenna_params.py b/toolboxes/Plotting/plot_antenna_params.py index 5fd7ece0..387a7e2c 100644 --- a/toolboxes/Plotting/plot_antenna_params.py +++ b/toolboxes/Plotting/plot_antenna_params.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2022: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. diff --git a/toolboxes/Plotting/plot_source_wave.py b/toolboxes/Plotting/plot_source_wave.py index 0ba3e392..6d6be461 100644 --- a/toolboxes/Plotting/plot_source_wave.py +++ b/toolboxes/Plotting/plot_source_wave.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2022: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. diff --git a/toolboxes/STLtoVoxel/README.rst b/toolboxes/STLtoVoxel/README.rst index 317cf827..b9569bd3 100644 --- a/toolboxes/STLtoVoxel/README.rst +++ b/toolboxes/STLtoVoxel/README.rst @@ -43,7 +43,7 @@ To create a voxelised mesh (HDF5 geometry file) from the ubiquitous `Stanford bu .. code-block:: none - python -m user_libs.STLtoVoxel.stltovoxel user_libs/STLtoVoxel/examples/stl/Stanford_Bunny.stl -matindex 2 -dxdydz 0.001 0.001 0.001 + python -m toolboxes.STLtoVoxel.stltovoxel toolboxes/STLtoVoxel/examples/stl/Stanford_Bunny.stl -matindex 2 -dxdydz 0.001 0.001 0.001 Since the number of voxels are 108 x 88 108 and the spatial discretisation chosen is 1mm, the physical dimensions of the Stanford bunny when imported into gprMax will be 0.108 x 0.088 x 0.108mm. diff --git a/toolboxes/Utilities/MATLAB/README.rst b/toolboxes/Utilities/MATLAB/README.rst deleted file mode 100644 index 08b2dd78..00000000 --- a/toolboxes/Utilities/MATLAB/README.rst +++ /dev/null @@ -1 +0,0 @@ -These MATLAB scripts are designed as a base to help you get started with plotting data (A-scans and B-scans) from simulations. They do not feature extensive error checking. \ No newline at end of file diff --git a/toolboxes/Utilities/Paraview/gprMax.py b/toolboxes/Utilities/Paraview/gprMax.py index dfd4f8a4..96fe27d8 100644 --- a/toolboxes/Utilities/Paraview/gprMax.py +++ b/toolboxes/Utilities/Paraview/gprMax.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2022: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. diff --git a/toolboxes/Utilities/README.rst b/toolboxes/Utilities/README.rst index 08b2dd78..b1ecd74d 100644 --- a/toolboxes/Utilities/README.rst +++ b/toolboxes/Utilities/README.rst @@ -1 +1,20 @@ -These MATLAB scripts are designed as a base to help you get started with plotting data (A-scans and B-scans) from simulations. They do not feature extensive error checking. \ No newline at end of file +Toolboxes is a sub-package where useful Python modules contributed by users are stored. + +********* +Utilities +********* + +Information +=========== + +This package contains various scripts and helper functions. + +Package contents +================ + +* ``HPC`` is a folder with scripts to assist with running gprMax on high-performance computing (HPC) systems. +* ``MATLAB`` is a folder containing scripts are designed as a base to help getting started with plotting data (A-scans and B-scans) from simulations. They do not feature extensive error checking. +* ``Paraview.py`` is a folder containing a Python macro to be installed into Paraview. The macro enables materials to be easily visualised when geometry files are loaded into Paraview. +* ``convert_png2h5.py`` is a script to convert a PNG image to a HDF5 file that can be used to import geometry (#geometry_objects_read) into a 2D model. +* ``get_host_spec.py`` is a script that prints information about the host machine capabilities for OpenMP/CUDA/OpenCL. +* ``outputfiles_merge.py`` is a script that merges traces (A-scans) from multiple output files into one new file, then optionally removes the series of output files. \ No newline at end of file diff --git a/toolboxes/Utilities/convert_png2h5.py b/toolboxes/Utilities/convert_png2h5.py index 879afb18..516b9ae4 100644 --- a/toolboxes/Utilities/convert_png2h5.py +++ b/toolboxes/Utilities/convert_png2h5.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2022: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. diff --git a/toolboxes/Utilities/get_host_spec.py b/toolboxes/Utilities/get_host_spec.py index 06af0145..07612593 100644 --- a/toolboxes/Utilities/get_host_spec.py +++ b/toolboxes/Utilities/get_host_spec.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2022: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. diff --git a/toolboxes/Utilities/outputfiles_merge.py b/toolboxes/Utilities/outputfiles_merge.py index 25034b2a..01346ee0 100644 --- a/toolboxes/Utilities/outputfiles_merge.py +++ b/toolboxes/Utilities/outputfiles_merge.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2022: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax.