An external Kriging python library can be applied using the Programmable Filter.
For example, if you want to use PyKrige (
PyKrige — PyKrige 1.6.1 documentation
), first, prepare the same version of the Python environment that ParaView uses, and install Pykrige on it. Then, copy:
Anaconda3/envs/pyKrige/Lib/site-packages/pykrige
Anaconda3/envs/pyKrige/Lib/site-packages/scipy
(This is an Anaconda example)
under (ParaView install folder)/bin/Lib/site-packages. After this preparation, star…
But when I used some codes to use this module, this error occured.
The missing files are not in my computer. I re-download several times but all was the same.
The missing files were more than 600, so I couldn’t download them one by one.
Do you have some ideas about this problem?
The version of numpy in ParaView 5.11.1 is 1.21.1, which is older than the one used by PyKrige, so you will get a Warning, but if you use the Anaconda environment on Windows, you can achieve this as follows.
Backup the numpy folder in ParaView
In C:\Program Files\ParaView 5.11.1\bin\Lib\site-packages, rename the numpy folder name to numpy_bak.
Copy the folders
Copy the folders under C:\Users\aaa\anaconda3\envs\pykrige\Lib\site-packages:
・numpy
・pykrige
・scipy
・scipy.libs
to C:\Program Files\ParaView 5.11.1\bin\Lib\site-packages
(I used anaconda3 powershell prompt and created environment from the start.
But I didn’t rename the numpy folder and copy the scipy.libs folder.
So I did those 2 in this try.)
Thank you for your help.
I installed the OpenBLAS and re-installed numpy and pykrige.
And I got the same DLL error message.
image754×344 12.6 KB
Thank you for your help.
But I installed pykrige and scipy with pip command.
I re-installed scipy just in case. Then the scipy folder disappeared in the C:\Users\aaa\anaconda3\envs\pykrige\Lib\site-packages.
so I copied just 3 folders and there was the same dll error.
I am not sure about the disappearance of the scipy folder after reinstalling scipy. Have you activated the virtual environment with the
activate pykrige
command and then installed pykrige or scipy?
Hello, thank you for your help.
I resolved this problem by creating new environment.
But there is another problem.
I got this error message after running your code
image1411×431 128 KBimage1512×1364 182 KB
(I used “RandomAttributes1” as the data for interpolation and “filtered_coordinates.vtk” as the space data to assign interpolation results.)
Thank you for reading!
I think this error means that the imported library dosen’t have the function which is in the code.
But I know your code worked well the other cases.
So I have no idea what was wrong.
Adding a header line to borehole_data.csv seems to work. Also, the Kriging method requires a very large amount of memory, as can be seen in the semi-variogram definition. Hence, it is difficult to treat many observation points as input.
Attached below is the State file when Kriging is applied when the number of observation points and the points to be predicted are reduced. pykrige_small.7z (23.8 KB)
small_kring_test1041×734 78.7 KB
Of course, to use Kriging properly, an empirical variogram must be created from the observation point data and fitted to the appropriate variogram model to determine the sill, range, and nugget.
Thank you for your help.
I understood the process.
When I load your state, the figure was same as the image you uploaded.
But if I do this work in my computer, the figure dosen’t created.
And I got this error message. (This error occured when I loaded your state, too.)
I thought this error occured because of the version of numpy.
So I updated numpy at anaconda powershell prompt and copied the numpy folder.
But this error occured again.