Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

visualization with paraview #443

Open
igel89 opened this issue May 3, 2024 · 2 comments
Open

visualization with paraview #443

igel89 opened this issue May 3, 2024 · 2 comments

Comments

@igel89
Copy link

igel89 commented May 3, 2024

Thank you very much for the program, I am using it in my PhD at the RWTH Aachen (Germany)- Chair of Building Informatics and Geoinformation Systems and Geodetic Institute.

I have the problem with the implementation of gprMax in Paraview (Macro). I get the following error message:

Traceback (most recent call last):
File "", line 170, in
File "C:\Program Files\ParaView 5.12.0\bin\Lib\site-packages\paraview\simple.py", line 750, in Hide
raise ValueError ("proxy argument cannot be None when no active source is present.")
ValueError: proxy argument cannot be None when no active source is present.
Traceback (most recent call last):
File "", line 185, in
File "C:\Program Files\ParaView 5.12.0\bin\lib\ntpath.py", line 249, in dirname
return split(p)[0]
File "C:\Program Files\ParaView 5.12.0\bin\lib\ntpath.py", line 211, in split
p = os.fspath(p)
TypeError: expected str, bytes or os.PathLike object, not FileNameProperty

To minimze the sources of error I only use the example files from the gprMax User Guide.

Execution of gprMax in miniconda
cd C:\Users\Igel\gprMax
conda activate gprMax

To test an animation with standard example: http://docs.gprmax.com/en/latest/examples_advanced.html
Since this is only a model and not an animation, the code for ‘snapshot’ is added as a loop ==> .vti

http://docs.gprmax.com/en/latest/input.html#snapshot
#python:
for i in range(1, 31):
print(‘#snapshot: x1 y1 z1 x2 y2 z2 dx dy dz {} snapshot{}’.format((i/10)*1e-9, i))
#end_python:

Insert the parameters from the 14th line of heterogeneous_soil.in
print(‘#snapshot: 0 0 0 0.15 0.15 0.1 0.001 0.001 0.001 {} snapshot{}’.format((i/10)*1e-9, i))

Execute
python -m gprMax user_models/heterogeneous_soil.in
Start Paraview
File/Open: user_models/snapshot1.vti
gprMax Macro activate

I typically use Windows 11 due to the error I have also tried an installation on Linux Ubuntu. However, it does not work with both.
I would be very grateful for an installation routine for gprMax, Paraview, python etc. so which versions work together to display the results.

@igel89
Copy link
Author

igel89 commented May 3, 2024

addition: The file folder is file folder is written with a big capital L. ->Lib
C:\Programme\ParaView 5.12.0\bin\lib\ntpath.py
C:\Programme\ParaView 5.12.0\bin\Lib\ntpath.py

@craig-warren
Copy link
Member

@igel89 the Paraview macro button for gprMax is only for viewing the geometry files - where extra steps are necessary to visualise all the materials with the correct names. You do not need the macro for viewing the snapshot files - these can be opened and you can view the fields directly. See the steps to view snapshots in the docs - https://docs.gprmax.com/en/latest/output.html#snapshots

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants