Coder Social home page Coder Social logo

gprmax / gprmax Goto Github PK

View Code? Open in Web Editor NEW
579.0 37.0 247.0 197.56 MB

gprMax is open source software that simulates electromagnetic wave propagation using the Finite-Difference Time-Domain (FDTD) method for numerical modelling of Ground Penetrating Radar (GPR)

Home Page: https://www.gprmax.com

License: GNU General Public License v3.0

Python 75.78% Shell 0.30% MATLAB 3.59% Cython 20.33%
gpr fdtd modelling electromagnetic gpu cuda nvidia antenna soil simulation

gprmax's Issues

GPU version

Any plans for a GPU version? You should get a 20-40x speedup on a GPU. You could also use pycuda so it nicely integrates with the current python.

calling gprMax from another directory-windows and linux problem

Hello Craig,

I need to call gprMax from another directory (a subdirectory-new folder- in the gprMax-master parent directory). Is this possible at all?
I'm getting the following error:
C:\Miniconda3\python.exe: No module named gprMax

Any solution?
Thanks a lot,
Sajad

Cannot import relative imports

Hi Professor,

I downloaded the software on Ubuntu 14.04 platform. When i run it using python3 it gives me :
"SystemError: Parent module '' not loaded, cannot perform relative import". I think, python3 cannot recognize those dots typed in front of import paths. Can you produce the same error?

Kind Regards,
Ilker

If you're using `setuptools` in an unusual way (and you are), please make sure the normal use modes don't work.

Basically, for 99.9% of the packages out there, python3 setup.py install is the appropriate procedure for installing a setuptools-based package.

However, for gprMax, this appears to result in a broken, partial install, and you instead have an unusual non-library based use-case built around --inplace and copying directories about into other projects.

That's fine, if odd, but if you're going to do that, it would be appropriate to make sure that python3 setup.py install does not work, or people used to normal python packages (like myself) will spend a fair bit of time wondering why they're getting weird import errors.

Ideally, python3 setup.py install should simply emit a "don't do that, use --inplace" error message, but frankly just crashing or throwing an error would be better then what there is now.

Alternatively, make gprMax a proper, installable library?

Triangle with paraview

Hi Craig,
I'm wondering if paraview is able to display triangle geometry.
I'm trying to see "#triangle" using paraview but tend to not show it...

I just modified the A-scan example

#title: A-scan from a metal cylinder buried in a dielectric half-space

domain: 0.240 0.190 0.002

dx_dy_dz: 0.002 0.002 0.002

time_window: 3e-9

time_step_limit_type: 2D

pml_cells: 10 10 0 10 10 0

material: 6 0 1 0 half_space

waveform: ricker 1 1.5e9 my_ricker

hertzian_dipole: z 0.100 0.170 0 my_ricker

rx: 0.140 0.170 0

box: 0 0 0 0.240 0.170 0.002 half_space

triangle: 0.1 0.1 0.002 0.2 0.1 0.002 0.15 0.15 0.002 0 pec

geometry_view: 0 0 0 0.240 0.190 0.002 0.002 0.002 0.002 cylinder_half_space n

Any hints on that ?

cheers

emmanuel

mpi

Hi Craig,
Just wanted to let you know that I used the code on a cluster for 2 months now.
The maximum nodes I used was 20 and up to 10 proc. on each nodes.
Everything runs very smooth, didn't have any issue, very fast. I did not do any statistics though.
The only limitation is of course the memory. 3D models eat a looot of memory.

Thanks for your job

best

e

Time step calculations seems to be wrong in the new update

For all the models the 'dt' or time step is not adhering to the CFL condition as said in "Guidance for GPR Modelling" section.

In the example cylinder_Bscan_2D.in, provided, when print(f.attrs['dt']]) is run in the plot_Bscan.py file it displays,

4.7173086735e-12

But when the CFL condition is solved manually the result is,

3.85166640309e-12

Which is clearly greater (which should not be)

This was perfect in the previous versions. But appears to have changed.

This is incorrect right?

conda - hdf5 version issue

@craig-warren,

I'm reinstalling the latest issue of gprMax due to some server issues I had. When compiling the Cython extensions I get the error starting with "Sorry:" in the attached file. Could be related to the server, but maybe you know the reason for this. Updating from the repo has always worked so far. I can't run gprMax at the moment and I'm guessing it's due to this error. Any ideas?

sam_scr

Error - Compile Cython extensions

I have followed the instruction to install everything expect the MPI.

I go the "Comple Cython Extensions" Stage by running the : python3 setup.py build_ext --inplace
The error happen :
Traceback (most recent call last):
File "setup.py", line 43, in
os.environ['CC'] = glob.glob('/usr/local/bin/gcc-[4-5]*')[0].split(os.sep)[-1]
IndexError: list index out of range

Could you let me how to fix this error,please?

Many thanks.

Fengzhou

S21 Parameter issue

Could it be when calculating the S21 parameter in your new script, the electric field value has yet to be multiplied with the discretisation of the domain?

vti

Good evening,
I've a question concerning the generation of vti files during B scans.
My input file contains a "#geometry_view:" command with a basename, let us say "basename".
While running B scan (let's say 10 traces) I'll have the generation of basename_1 to basename_10.
Which are all the same.
Is there a way to tell gprMax to not generate multiple ?
Thanks a lot,
Best

e

Materials listing in Paraview

On Microsoft Windows versions of Paraview, materials are listed 'material 1, material 2, material 3' etc... instead of with their names.

Check the gprMax_materials Python macro in Paraview.

Sinusoidale surface

Hi again,
coming back with the same problem I cannot figure out why I cannot see any reflection and anything in the vti file.
I'm fine on Time window as well as on geometry.
I'd be glad to understand why I cannot see anything on the vti and ultimately on my radargram. Cheers
fractal.txt

CmdInputError

Hi,
Thanks before for guiding me until now.
when I try to simulate this example , I get some error (see Fig). What should I do to fix this problem? Thank you :)


domain: 2.000 2.000 1.000

dx_dy_dz: 0.01 0.01 0.01

time_window: 12e-9

material: 3 0 1 0 dry_sand

-------------------- Geometry of the problem defined here-----------------

box: 0.0 0.0 0.0 2.000 2.000 0.850 dry_sand

cylinder: 0.0 1.000 0.605 2.000 1.000 0.605 0.035 free_space


python:

from user_libs.antennas import antenna_like_GSSI_1500
antenna_like_GSSI_1500(1.00, 0.075 + current_model_run * 0.05 , 0.86)

end_python:


capture1

Compiled or line interpreted?

Hi,

We are performing a comparison of running a simulation on gprMax version 3.0.0b19 to an older version 2.0 and note that the speed is significantly slower on the new version (around five times slower).

Please advise if this version is compiled or line interpreted?

Best Regards,

Bjorn

Limitation on the number of boxes?

Hi again,
I'm trying to model boxes with a sinusoidale interface.
So I just wrote a script where I assign each cells a values, it gives about 60K boxes ( I tried with plates as well).
However I don't see any reflection on my surface. could you help me to understand why ?

An extract of the .in file:

"

material: 10.000000 0.0 1.0 0.0 orga

material: 5.000000 0.0 1.0 0.0 sand

material: 20.000000 0.0 1.0 0.0 gravel

material: 3.000000 0.0 1.0 0.0 ice

waveform: ricker 1 5.000000e+08 my_ricker

hertzian_dipole: z 0.250000 2.000000 0 my_ricker

rx: 0.250000 2.000000 0

src_steps: 1.000000 0.000000 0

rx_steps: 1.000000 0.000000 0

box: 0.000000 0.000000 0 3.000000 2.000000 0.005000 sand

plate:0.000000 0.995000 0.005000 0.005000 1.000000 0.005000 orga

plate:0.000000 1.000000 0.005000 0.005000 1.005000 0.005000 orga

plate:0.000000 1.005000 0.005000 0.005000 1.010000 0.005000 orga

"

Thanks

best

e

First example output display error

Hello:

I was successfully run this example and get the right output. However, I see the error when i run follow
running command : python3 -m tools.plot_Ascan user_models/cylinder_Ascan_2D.out
error : /usr/local/opt/python3/bin/python3.5: No module named tools.plot_Ascan
Could you guide me how to fix this problem.

Kind regards.

Fengzhou

paraview snapshort

Hi,
I'm facing an issue with seeing snapshot with paraview:
ERROR: In /build/buildd/paraview-4.0.1/VTK/IO/XML/vtkXMLStructuredDataReader.cxx, line 348
vtkXMLImageDataReader (0x3338e40): Error reading extent 0 300 0 300 0 0 from piece 0

[4] + segmentation fault (core dumped) paraview snapshot1.vti

Enclose is the input file, I don't get what do I do wrong...Stupid of me as usual
Thanks for you help!
2couchesperm.txt

Matlab error while reading file

The same error is encountered in both A-Scan and B-Scan

Error using hdf5lib2
The HDF5 library encountered an error and produced the following stack trace information:

    H5O_attr_open_by_name    can't locate attribute
    H5A_open_by_name         unable to load attribute info from object header
    H5Aopen_name             can't open attribute

Error in H5A.open_name (line 16)
attr_id = H5ML.hdf5lib2('H5Aopen_name', loc_id,name);

Error in h5readatt (line 48)
attr_id = H5A.open_name(obj_id,options.Attname);

Error in plot_Bscan (line 13)
    iterations = double(h5readatt(filename, '/', 'Iterations')); 

Runing script

Good morning,
First of all, it is a grrreat work you have been doing! I am really amazed. Congrats!

I was wondering if it was possible to run gprMax not from the Master folder.
I usually that with .py script by adding the interpreter line at the first line of the script, like #!/usr/bin/python3 and then chmod+x the script and adding it to the path.
But it seems it dos not work with gprMax.py as I always get:
SystemError: Parent module '' not loaded, cannot perform relative import

Where do I miss something?

cheers

Optional start and stop times for sources

The User Guide states these are optional parameters that should come before the source identifier in the command. However, the code looks for the source identifier in the command before the start and stop times. Need to make a design decision on what is best and make both match.

BScans

I'm having a problem with running multiple tx rx positions. I'm clearly missing something.
e.g.

python -m gprMax user_models/cylinder_Bscan_2D.in
followed by
python -m tools.plot_Bscan user_models/cylinder_Bscan_2D.out Ez
fails with our-of-range.

It seems there is only one time trace per run.
The documentation says: Provide a simple method to allow you to move the location of all sources (#src_steps) or all receivers (#rx_steps) between runs of a model.

What does it mean by "between runs of the model"?
If I run it once I only get 1 trace, even though I've specified the tx/rx_steps.
If I run it multiple times I still only get 1 trace.

I'm clearly missing something, help please!

snapshot error

Hello,
I have an issue and questions regarding snapshots in 2D and 3D. An answer to my 2D problem might solve my 3D question, so the former first. With the 2D model below I get errors with creating snapshots in the xy-plane.

*#domain: 1.0 1.0 0.002

dx_dy_dz: 0.002 0.002 0.002

snapshot: 0.002 0.002 0 0.998 0.998 0.001 0.002 0.002 0.002 4e-9 snap1*

I always get an error concerning the lower or upper coordinates. I guess I'm not sure what the minimum/maximum coordinates may be with regard to the model extensions. For me, no alteration of the lower (0 or 0.002) or upper (0 or 0.002) coordinate works.

A further question I have is about the snapshot time. Does gprMax choose the closest time-step to it or does it interpolate?

Cheers,
Sam

test_Stadler_2D.txt

miniconda install issue

Hi,

I am trying to install gprMax on a Windows 32-bit machine using the instructions provided:
https://github.com/gprMax/gprMax

I downloaded the latest gprMax-master file. I note in step 1) you mention copying contents of windows-32 zip file into gprMax directory. Where do I obtain the windows-32bit zip file?

Installed Python 3.5 Version of Miniconda (32-bit version):
http://conda.pydata.org/miniconda.html

Followed through step two and have activated the new environment (activate gprMax).
I have also installed the C libraries suggested in step 3.

When I run the cylinder_Ascan_2D.in example I get the following issue:

screenshot

I have read through the thread:
#27
You mention a step 4 of building the Cython extensions, could this be the problem? If so, how do I do this?

Best Regards,
Bjorn

unrecognized arguments: -benchmark

Hi,
I'm working to optimize my system configuration and greatly appreciate the idea of the benchmarking sub-packet described in the b23 User Guide. However, I'm working with b21 (the latest build that I've seen on github), which does not appear to have the sub-packet with it. I therefore created a subfolder in the tests subfolder with the benchxxx.in files and replaced input.py with the latest file. Still, gprMax does not recognize the -benchmark argument. I'm obviously missing another file. What is that and where may I find it? Or.... is b23 available somewhere so that I can replace my b21 and use the benchmarking?
Thanks for your help!!!

figure saving issue

I think I found a small error in your new plotting scripts. When trying to save the files, the variable "filename" has to be passed instead of "file". See for example line 342 in the plot_antenna_params.py file.

Cheers,
Sam

New 400MHz Antenna

@craig-warren or whomever has information.

For my work, I am interested in modelling the 400MHz GSSI Antenna, which has a similar build-up as your pre-made 1.5GHz GSSI Antenna. By modifying the dimensions (which we sort of have for the 400MHz antenna) I plan to use your exising model. It is however quite time consuming to reverse engineer and understand the antenna dimensions from a geometry and the antenna.py file, at least for me that is. Do you maybe have some sort of schematic with the dimensions written down which I could use? If successful and in case you're interested, I would be glad to commit my efforts.

Cheers,
Sam

PDF images in docs

PDF images in the documentation do not seem to display in browsers under Microsoft Windows.

Consider converting to PNG files which would also be more compatible with the ePub format.

Performance with hyper-threading and OpenMP

There is some evidence of poor performance with OpenMP on CPUs that support hyper-threading, i.e. Intel Core i7 series. This is reported elsewhere http://stackoverflow.com/questions/24368576/poor-performance-due-to-hyper-threading-with-openmp-how-to-bind-threads-to-core

To try to mitigate this issue, if the user does not specify a #num_threads command, gprMax will automatically set the number of OpenMP threads to the number of physical cores on the machine. This happens for Mac OS X and Linux but not yet Windows.

Further investigation of hyper-threading and OpenMP performance is required.

Possible solutions for detecting hyper-threading on Windows currently require too many extra installs for the user.

Cross-platform hardware detector
https://git.fedorahosted.org/git/python-hwloc.git

pywin32 extensions
http://timgolden.me.uk/python/wmi/index.html

Lighting in Paraview

@craig-warren, I have a question regarding the .vti files that are produced by the "snapshots". Could be that this problem I have is Paraview-specific, I just couldn't find an answer. When opening the .vti files in paraview, there seems to be a greyish background that underlays all the colors from the colorbar (arbitrary in this case). This is not the background color of the viewer window in paraview, but a color behind the model data.

This makes the 2D-diagrams not as neat as they could be. Would you know how to go about this or have you had this issue before? Could it have to do with the fact that the "snapshots" produce a volume?

no module named 'pyfiglet'

Every time I try to simulate the cilinder_ascan_2d.in it shows this message
image

I don't know what to do. I have made the instalation twice and downloaded the lastest version.

Please, help.

What Python packages are required?

Hi,

could you please provide a list with Python packages that are required to install gprMax ? Not everybody likes anaconda/miniconda.

Best regards

Number of processors to run on - Error in German OpenSuse Linux

Hi Craig,
When I run gprMax on a Linux server with a german version of openSUSE, I get the following Error message:

Traceback (most recent call last):
File "/usr/lib64/python3.4/runpy.py", line 170, in _run_module_as_main
"main", mod_spec)
File "/usr/lib64/python3.4/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/loewer/gprMax/gprMax/main.py", line 4, in
main()
File "/home/loewer/gprMax/gprMax/gprMax.py", line 130, in main
run_model(args, modelrun, numbermodelruns, inputfile, inputdirectory)
File "/home/loewer/gprMax/gprMax/gprMax.py", line 163, in run_model
process_singlecmds(singlecmds, multicmds, G)
File "/home/loewer/gprMax/gprMax/input_cmds_singleuse.py", line 86, in process_singlecmds
corespersocket = int(corespersocket[0].split(':')[1].strip())
IndexError: list index out of range

In the python script 'input_cmds_singleuse.py' the number of cores per socket is calculated by searching for the string 'Core(s) per socket'. In my openSUSE version all entries in 'lscpu' are in german ('Kerne pro Sockel'), so the english string 'Core(s) per socket' is never found and an error above is dropped.

My interim solution was to run in the 'else' procedure by changing the name 'linux' to sth random.

Cheers
Markus

add_grass

Concerning the add_grass command in the tutorial:
"For example, to apply 100 blades of grass that vary in height between 100 and 150 mm to the entire surface in the positive z direction of a #fractal_box that had been specified using

fractal_box: 0 0 0 0.1 0.1 0.1 1.5 1 1 50 my_soil my_fractal_box, use:

add_grass: 0 0 0.1 0.1 0.1 0.1 1.5 0.2 0.25 100 my_fractal_box.

I think you meant "apply 100 blades of grass that vary in height between 200 and 250 mm"
?

Best
e

miniconda missing mpi4py

Hi all,
Just to mention that after creating the environment with conda,
you have to install mpi4py package using conda, it is not there by default.

Cheers
e

plotting geometry

I added a fractal_box including a rectangular anomaly (not among predefined materials) as my medium. Using '--geometry-only' I plotted the geometry of the case. But It's not showing the anomaly (in paraview)!
I changed the kind of anomaly to 'pec' to see if there is an error or not, it worked perfectly and geometry was drawn without an issue. Can you please help me with this issue?
A picture of issue is attached as well.
untitled

Segmentation fault when using #fractal_box command

gprMax throws a segmentation fault after the first run when the fractal_box and soil_peplinksi commands are used to create a soil mixture model. This occurs even on the example provided. Any help to solve this would be appreciated as this feature is extremely helpful for our modelling.

Please let me know if more information is needed.

Thanks.

B-scan with n traces

Hi,
I would like to ask about B-Scan. For example, To run the model for a B-scan with 60 traces:
python -m gprMax cylinder_Bscan_2D.in -n 60

But, when the running program is interrupted in the 25 traces. Is there some command for running the B-scan starting with 25th trace, rather than repeating the simulation and going back to the beginning.

Thank you in advance for your answer.

Reporting thickness of triangle

The #triangle command correctly sets the user-specified thickness, but does not print the correct value in the messages. The value in cells (calculated from knowing the orientation) is passed to the building function.

Demo does not work.

On a fresh install, attempting to execute the first demo here.

python3 -m gprMax cylinder_Ascan_2D.in executes fine.
python3 -m tools.plot_Ascan cylinder_Ascan_2D.out crashes:

durr@build3:~/gprMax$ python3 -m tools.plot_Ascan cylinder_Ascan_2D.out
Traceback (most recent call last):
  File "/usr/lib/python3.4/runpy.py", line 170, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.4/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/durr/gprMax/tools/plot_Ascan.py", line 67, in <module>
    fielddata = f[path + field][:]
  File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper (/tmp/pip-build-nj97s0cg/h5py/h5py/_objects.c:2574)
  File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper (/tmp/pip-build-nj97s0cg/h5py/h5py/_objects.c:2533)
  File "/usr/local/lib/python3.4/dist-packages/h5py/_hl/group.py", line 164, in __getitem__
    oid = h5o.open(self.id, self._e(name), lapl=self._lapl)
  File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper (/tmp/pip-build-nj97s0cg/h5py/h5py/_objects.c:2574)
  File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper (/tmp/pip-build-nj97s0cg/h5py/h5py/_objects.c:2533)
  File "h5py/h5o.pyx", line 190, in h5py.h5o.open (/tmp/pip-build-nj97s0cg/h5py/h5py/h5o.c:3546)
KeyError: "Unable to open object (Object 'hz' doesn't exist)"

I'm assuming it's looking for the wrong item in the hdf output file. I'll dig about in it tomorrow, I don't have time today.

miniconda install

Hi,
first of all great job for the miniconda install it is much easier,
However, after building it, I'm facing:
python -m gprMax user_models/cylinder_Ascan_2D.in
Traceback (most recent call last):
File "/global/home/users/eleger/miniconda3/envs/gprMax/lib/python3.5/runpy.py", line 170, in _run_module_as_main
"main", mod_spec)
File "/global/home/users/eleger/miniconda3/envs/gprMax/lib/python3.5/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/global/home/users/eleger/bin/gprMax-master/gprMax/main.py", line 3, in
from .gprMax import main
File "/global/home/users/eleger/bin/gprMax-master/gprMax/gprMax.py", line 35, in
from gprMax.fields_update import *
ImportError: No module named 'gprMax.fields_update'

miniconda and gprmax installs runned very fine and smooth, nothing to declare.

Thanks!

e

Error when installing on OS X

I am unable to install gprMax.

This is the output while trying to build.

Rajaths-MacBook-Pro:gprMax rajathkumarmp$ python3 setup.py build_ext --inplace
Traceback (most recent call last):
  File "setup.py", line 106, in <module>
    os.environ['CC'] = glob.glob('/usr/local/bin/gcc-[4-5]*')[0].split(os.sep)[-1]
IndexError: list index out of range

(ImportError: No module named 'gprMax.fields_update') problem

Hi,
First I would thank you for sharing the new version of GPRMAX.
It includes some new features that looks really interesting.
However, I got some problem while start runing the GPRMAX.
I followed your guidence, and the installation of the Python and GPRMAX goes smooth.
But I received error while trying to run the examples that you shows in the guidence.
The error is shown as:
File "C:\gprMax-master\gprMax\gprMax.py", line 32, in
from gprMax.fields_update import *
ImportError: No module named 'gprMax.fields_update'

I found a similar issue that you closed 2 weeks ago and you mentioned you already fixed it with the latest GPRMAX-master version. I am also using this version but the error appears.
The only difference to the previous issue is that I am using the windows10-64 bit. Is this can be the reason for this problem?

Best regards.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.