diff --git a/docs/source/examples_advanced.rst b/docs/source/examples_advanced.rst index e53d9195..da61b11f 100644 --- a/docs/source/examples_advanced.rst +++ b/docs/source/examples_advanced.rst @@ -38,6 +38,10 @@ which defines one of the surfaces of the ``#fractal_box``, a fractal dimension, More information, including adding surface water and vegetation, can be found in the :ref:`section on using the fractal box command `. +Using subgrid(s) +================ + + diff --git a/toolboxes/AntennaPatterns/README.rst b/toolboxes/AntennaPatterns/README.rst index 8ef94cf2..2411966c 100644 --- a/toolboxes/AntennaPatterns/README.rst +++ b/toolboxes/AntennaPatterns/README.rst @@ -29,19 +29,18 @@ Package contents * ``initial_save.py`` is a module that calculates and stores (in a Numpy file) the field patterns from the output file of a simulation. * ``plot_fields.py`` is a module that plots the field patterns. It should be used after the field pattern data has been processed and stored using the ``initial_save.py`` module. -The package has been designed to work with input files found in the ``examples`` directory: +The package has been designed to work with the input file found in the ``examples`` directory: -* ``antenna_like_GSSI_1500_patterns_E.in`` is an input file that includes an antenna model similar to a GSSI 1.5 GHz antenna and receivers to calculate a field pattern in the principal E-plane of the antenna -* ``antenna_like_GSSI_1500_patterns_H.in`` is an input file that includes an antenna model similar to a GSSI 1.5 GHz antenna and receivers to calculate a field pattern in the principal H-plane of the antenna +* ``antenna_like_GSSI_1500_patterns.py`` is an input file that includes an antenna model similar to a GSSI 1.5 GHz antenna and receivers to calculate field patterns in the principal E- and H-planes of the antenna How to use the package ====================== -* Firstly you should familiarise yourself with the example model input file. Edit the input file as desired and run one of the simulations for either E-plane or H-plane patterns. +* Firstly you should familiarise yourself with the example model input file. Edit the input file as desired and run a simulation for either E-plane or H-plane patterns. * Whilst the simulation is running edit the 'user configurable parameters' sections of the ``initial_save.py`` and ``plot_fields.py`` modules to match the setup of the simulation. -* Once the simulation has completed, run the ``initial_save.py`` module on the output file, e.g. for the E-plane ``python -m toolboxes.AntennaPatterns.initial_save examples/antenna_like_GSSI_1500_patterns_E_Er5.h5``. This will produce a Numpy file containing the field pattern data. -* Plot the field pattern data by running the ``plot_fields.py`` module on the Numpy file, e.g. for the E-plane ``python -m toolboxes.AntennaPatterns.plot_fields examples/antenna_like_GSSI_1500_patterns_E_Er5.npy`` +* Once the simulation has completed, run the ``initial_save.py`` module on the output file, e.g. ``python -m toolboxes.AntennaPatterns.initial_save examples/antenna_like_GSSI_1500_patterns.h5``. This will produce a Numpy file containing the field pattern data. +* Plot the field pattern data by running the ``plot_fields.py`` module on the Numpy file, e.g. for the E-plane ``python -m toolboxes.AntennaPatterns.plot_fields examples/antenna_like_GSSI_1500_patterns.npy`` .. tip:: diff --git a/toolboxes/DebyeFit/README.rst b/toolboxes/DebyeFit/README.rst index 83fe5645..864c4cf7 100644 --- a/toolboxes/DebyeFit/README.rst +++ b/toolboxes/DebyeFit/README.rst @@ -218,10 +218,10 @@ 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``: -* ``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`` presents simple cases of using all available implemented relaxation functions. +* ``example_BiologicalTissues.ipynb`` presents simple cases of using Cole-Cole function for biological tissues. +* ``example_ColeCole.py`` presents simple cases of using Cole-Cole function in case of 3, 5 and automatically chosen number of Debye poles. +* ``Test.txt`` contains 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 ffcee151..bf6f5291 100644 --- a/toolboxes/GPRAntennaModels/README.rst +++ b/toolboxes/GPRAntennaModels/README.rst @@ -36,7 +36,7 @@ Descriptions of how the models were created can be found in the aforementioned a How to use the package ====================== -The antenna models can be accessed from within a block of Python code in an input file. The models are inserted at location x,y,z. The 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. The models must be used with cubic spatial resolutions of either 0.5mm (GSSI 400MHz antenna only), 1mm (default), or 2mm by setting the keyword argument, e.g. ``resolution=0.002``. The antenna models can be rotated 90 degrees counter-clockwise (CCW) in the x-y plane by setting the keyword argument ``rotate90=True``. +The antenna models can be accessed from within a block of Python code in an input file. The models are inserted at location x,y,z. The 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. The models must be used with cubic spatial resolutions of either 0.5mm (GSSI 400MHz antenna only), 1mm (default), or 2mm by setting the keyword argument, e.g. ``resolution=0.002``. .. note:: @@ -49,10 +49,20 @@ To include an antenna model similar to a GSSI 1.5 GHz antenna at a location 0.12 .. code-block:: none - #python: + import gprMax from toolboxes.GPRAntennaModels.GSSI import antenna_like_GSSI_1500 - antenna_like_GSSI_1500(0.125, 0.094, 0.100, resolution=0.002) - #end_python: + + scene = gprMax.Scene() + + # Import antenna model and add to model + dl = 0.002 + ant_pos = (0.125, 0.094, 0.100) + gssi_objects = antenna_like_GSSI_1500(ant_pos[0], ant_pos[1], ant_pos[2], + resolution=dl) + for obj in gssi_objects: + # Rotate antenna model if desired + # obj.rotate('z', 90, origin=(ant_pos[0], ant_pos[1], ant_pos[2])) + scene.add(obj) .. figure:: ../../images_shared/antenna_like_GSSI_1500.png :width: 600 px diff --git a/toolboxes/Plotting/README.rst b/toolboxes/Plotting/README.rst index 484e911c..71d09716 100644 --- a/toolboxes/Plotting/README.rst +++ b/toolboxes/Plotting/README.rst @@ -19,7 +19,7 @@ This module uses matplotlib to plot the time history for the electric and magnet .. code-block:: none - python -m toolboxes.plotting.plot_Ascan outputfile + python -m toolboxes.Plotting.plot_Ascan outputfile where ``outputfile`` is the name of output file including the path. @@ -32,13 +32,13 @@ For example to plot the ``Ez`` output component with it's FFT: .. code-block:: none - python -m toolboxes.plotting.plot_Ascan my_outputfile.h5 --outputs Ez -fft + python -m toolboxes.Plotting.plot_Ascan my_outputfile.h5 --outputs Ez -fft plot_Bscan.py ------------- -gprMax produces a separate output file for each trace (A-scan) in the B-scan. These must be combined into a single file using the ``outputfiles_merge.py`` module (described in the :ref:`other utilities section `). This module uses matplotlib to plot an image of the B-scan. Usage (from the top-level gprMax directory) is: +gprMax produces a separate output file for each trace (A-scan) in the B-scan. These must be combined into a single file using the ``outputfiles_merge.py`` module (found in the ``toolboxes\Utilities``). This module uses matplotlib to plot an image of the B-scan. Usage (from the top-level gprMax directory) is: .. code-block:: none diff --git a/toolboxes/STLtoVoxel/README.rst b/toolboxes/STLtoVoxel/README.rst index 932f7cc5..b075597f 100644 --- a/toolboxes/STLtoVoxel/README.rst +++ b/toolboxes/STLtoVoxel/README.rst @@ -45,7 +45,7 @@ To create a voxelised mesh (HDF5 geometry file) from the ubiquitous `Stanford bu 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. +Since the number of voxels are 108 x 88 x 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. The following is an example of a ``materials.txt`` file that can be used with the generated geometry file (HDF5 format) when importing into gprMax. Since ``-matindex`` is set to 2 the material with name ``hdpe``, i.e. a plastic, will be used. @@ -53,7 +53,7 @@ The following is an example of a ``materials.txt`` file that can be used with th :language: none :linenos: -The following Python script (using the gprMax API) can be used to import the generated geometry file ``Stanford_Bunny.h5`` and materials file ``materials.txt`` into a gprMax model: +The following Python script (using our Python API) can be used to import the generated geometry file ``Stanford_Bunny.h5`` and materials file ``materials.txt`` into a gprMax model: .. literalinclude:: ../../toolboxes/STLtoVoxel/examples/bunny.py :language: python