Re: [Paraview] Using Probe Filter To Get The Average Value Around A Point
As far as I know, there is no way to get the probe filter to get all points within a radius as you describe. You may instead consider the Point Data to Cell Data Filter. That will for each cell take the values of all attached points and average them. The point volume interpolator filter will create a grid (by default 100^3) and, in gaussian kernel mode, will “splat” a gaussian function onto the grid from every point. Another way to think of it is that a 3D gaussian function is convolved with a 3D function comprising an impulse function at every point in the mesh scaled by the field value (and then sampled on the grid). -Ken Sent from my iPad > On Feb 6, 2018, at 8:21 PM, Jeremias Gonzalez > wrote: > > Thank you very much for your explanations and suggestions. Responses > interspersed below. > >> On 2/5/2018 4:57 PM, Moreland, Kenneth wrote: >> Jeremias, >> When you set a radius and number of points in the probe filter, then the >> filter will randomly sample the volume within the defined sphere the number >> of times requested. The resulting values are the field values at those >> randomly sampled locations. > >> An easy way to get an average of your samples is to run the result of the >> probe filter through the descriptive statistics filter. Look at the >> "Statistical Model" table and it will report the mean value for each field. >> (Note that if you are using ParaView 5.4 there is a bug, #17627, that shows >> the Statistical Model table wrong by default. You have to also change the >> Composite Data Set Index parameter in the Display part of the properties >> panel to select only the Derived Statistics block.) >> A couple of caveats to this approach. First, because the sampling is random, >> don't expect the exact same answer every time you run it. Second, if one of >> the samples happens to lie outside of the mesh, that sample will be filled >> with 0's for all fields. That will throw off the average value. > > Is there a probe setting that will simply grab all the points living in the > original mesh within the radius of the sphere I choose? > >> That said, another approach you might want to take is to first filter the >> data in a way that blurs out the noise first. One way you can do that is to >> run the Point Volume Interpolator filter. Change the Kernel to something >> like Gaussian (the default Voronoi filter will not do the averaging that you >> want). Set the radius appropriately. You can then probe the resulting data >> set with a single value (radius 0) and immediate see the "averaged" result. >> -Ken > > I don't seem to be finding any information on what exactly the Gaussian > kernel does with the data, so how close is it to the plain averaging I would > like it to be doing? ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the ParaView Wiki at: http://paraview.org/Wiki/ParaView Search the list archives at: http://markmail.org/search/?q=ParaView Follow this link to subscribe/unsubscribe: https://paraview.org/mailman/listinfo/paraview
Re: [Paraview] Using Probe Filter To Get The Average Value Around A Point
Thank you very much for your explanations and suggestions. Responses interspersed below. On 2/5/2018 4:57 PM, Moreland, Kenneth wrote: Jeremias, When you set a radius and number of points in the probe filter, then the filter will randomly sample the volume within the defined sphere the number of times requested. The resulting values are the field values at those randomly sampled locations. > An easy way to get an average of your samples is to run the result of the probe filter through the descriptive statistics filter. Look at the "Statistical Model" table and it will report the mean value for each field. (Note that if you are using ParaView 5.4 there is a bug, #17627, that shows the Statistical Model table wrong by default. You have to also change the Composite Data Set Index parameter in the Display part of the properties panel to select only the Derived Statistics block.) A couple of caveats to this approach. First, because the sampling is random, don't expect the exact same answer every time you run it. Second, if one of the samples happens to lie outside of the mesh, that sample will be filled with 0's for all fields. That will throw off the average value. Is there a probe setting that will simply grab all the points living in the original mesh within the radius of the sphere I choose? That said, another approach you might want to take is to first filter the data in a way that blurs out the noise first. One way you can do that is to run the Point Volume Interpolator filter. Change the Kernel to something like Gaussian (the default Voronoi filter will not do the averaging that you want). Set the radius appropriately. You can then probe the resulting data set with a single value (radius 0) and immediate see the "averaged" result. -Ken I don't seem to be finding any information on what exactly the Gaussian kernel does with the data, so how close is it to the plain averaging I would like it to be doing? ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the ParaView Wiki at: http://paraview.org/Wiki/ParaView Search the list archives at: http://markmail.org/search/?q=ParaView Follow this link to subscribe/unsubscribe: https://paraview.org/mailman/listinfo/paraview
Re: [Paraview] PythonFullExample does not send any data
Hi Simon, I'm confused a to where the data is being sent from and to. If it's from the simulation and to the adaptor then all of that would get done before Catalyst would ever see it. If it's from the adaptor to Catalyst or to the PV GUI through the Live connection you'll probably want to look at coprocessing.py and grep through it for "live". I don't look too often at the Live sections of the code so it would take a bit of time to go through all of the details on it properly. Best, Andy On Tue, Feb 6, 2018 at 10:44 AM, Michalke, Simon wrote: > Thank you very much, it works now. > > Since I am getting the initial data via http and process it manually, is > there a way to "directly" open a connection and send data? I think the > coprocessor structure is not suitable for my case. Something like: > > con = openConnection() > > con.sendData(data) > con.sendData(data) > con.sendData(data) > > con.close() > > where data is something like vtkPolyData. Or, alternatively transfer the > grid at the beginning and only send the data as vtk*Array itself after > first initialization. > > Cheers, > Simon > > > Am 2018-02-06 14:18, schrieb Andy Bauer: > >> In cpscript.py you will need to change the following line: >> coprocessor.EnableLiveVisualization(False, 1) >> >> to: >> coprocessor.EnableLiveVisualization(True, 1) >> >> As for building VTK objects through the Python API, the VTK Examples at >> https://lorensen.github.io/VTKExamples/site/Python/ should have several >> will help you out. >> >> Cheers, >> Andy >> >> On Tue, Feb 6, 2018 at 4:37 AM, Michalke, Simon >> wrote: >> >> Hello, >>> >>> I am trying to code a tool to send live data from a simulation to >>> paraview. I build my paraview with the latest superbuild and with system >>> python (3.4m). Then I tried to run the "PythonFullExample". After >>> un-commenting line 25 in fedriver.py: >>> coprocessor.addscript("cpscript.py") >>> the script still does not send any data. There are no error messages as >>> well. I made sure that paraview is listening to the correct port. >>> >>> In general, I cannot find any python example on how to attach values to a >>> poly element or a point. >>> >>> Regards, >>> Simon Michalke >>> ___ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensou >>> rce/opensource.html >>> >>> Please keep messages on-topic and check the ParaView Wiki at: >>> http://paraview.org/Wiki/ParaView >>> >>> Search the list archives at: http://markmail.org/search/?q=ParaView >>> >>> Follow this link to subscribe/unsubscribe: >>> https://paraview.org/mailman/listinfo/paraview >>> >>> ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the ParaView Wiki at: http://paraview.org/Wiki/ParaView Search the list archives at: http://markmail.org/search/?q=ParaView Follow this link to subscribe/unsubscribe: https://paraview.org/mailman/listinfo/paraview
[Paraview] file naming of downloadable data files
Hi all, the data files https://www.paraview.org/paraview-downloads/download.php?submit=Download&version=v5.4&type=binary&os=Sources&downloadFile=ParaViewData-v5.4.1.tar.gz e.g. have a confusing file naming :( What's the intention for this? Thus I could hardly identify the wanted file :[ Many thanks for an explanation Thomas ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the ParaView Wiki at: http://paraview.org/Wiki/ParaView Search the list archives at: http://markmail.org/search/?q=ParaView Follow this link to subscribe/unsubscribe: https://paraview.org/mailman/listinfo/paraview
Re: [Paraview] PythonFullExample does not send any data
Thank you very much, it works now. Since I am getting the initial data via http and process it manually, is there a way to "directly" open a connection and send data? I think the coprocessor structure is not suitable for my case. Something like: con = openConnection() con.sendData(data) con.sendData(data) con.sendData(data) con.close() where data is something like vtkPolyData. Or, alternatively transfer the grid at the beginning and only send the data as vtk*Array itself after first initialization. Cheers, Simon Am 2018-02-06 14:18, schrieb Andy Bauer: In cpscript.py you will need to change the following line: coprocessor.EnableLiveVisualization(False, 1) to: coprocessor.EnableLiveVisualization(True, 1) As for building VTK objects through the Python API, the VTK Examples at https://lorensen.github.io/VTKExamples/site/Python/ should have several will help you out. Cheers, Andy On Tue, Feb 6, 2018 at 4:37 AM, Michalke, Simon wrote: Hello, I am trying to code a tool to send live data from a simulation to paraview. I build my paraview with the latest superbuild and with system python (3.4m). Then I tried to run the "PythonFullExample". After un-commenting line 25 in fedriver.py: coprocessor.addscript("cpscript.py") the script still does not send any data. There are no error messages as well. I made sure that paraview is listening to the correct port. In general, I cannot find any python example on how to attach values to a poly element or a point. Regards, Simon Michalke ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensou rce/opensource.html Please keep messages on-topic and check the ParaView Wiki at: http://paraview.org/Wiki/ParaView Search the list archives at: http://markmail.org/search/?q=ParaView Follow this link to subscribe/unsubscribe: https://paraview.org/mailman/listinfo/paraview ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the ParaView Wiki at: http://paraview.org/Wiki/ParaView Search the list archives at: http://markmail.org/search/?q=ParaView Follow this link to subscribe/unsubscribe: https://paraview.org/mailman/listinfo/paraview
Re: [Paraview] PythonFullExample does not send any data
In cpscript.py you will need to change the following line: coprocessor.EnableLiveVisualization(False, 1) to: coprocessor.EnableLiveVisualization(True, 1) As for building VTK objects through the Python API, the VTK Examples at https://lorensen.github.io/VTKExamples/site/Python/ should have several will help you out. Cheers, Andy On Tue, Feb 6, 2018 at 4:37 AM, Michalke, Simon wrote: > Hello, > > I am trying to code a tool to send live data from a simulation to > paraview. I build my paraview with the latest superbuild and with system > python (3.4m). Then I tried to run the "PythonFullExample". After > un-commenting line 25 in fedriver.py: > coprocessor.addscript("cpscript.py") > the script still does not send any data. There are no error messages as > well. I made sure that paraview is listening to the correct port. > > In general, I cannot find any python example on how to attach values to a > poly element or a point. > > Regards, > Simon Michalke > ___ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensou > rce/opensource.html > > Please keep messages on-topic and check the ParaView Wiki at: > http://paraview.org/Wiki/ParaView > > Search the list archives at: http://markmail.org/search/?q=ParaView > > Follow this link to subscribe/unsubscribe: > https://paraview.org/mailman/listinfo/paraview > ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the ParaView Wiki at: http://paraview.org/Wiki/ParaView Search the list archives at: http://markmail.org/search/?q=ParaView Follow this link to subscribe/unsubscribe: https://paraview.org/mailman/listinfo/paraview
[Paraview] Segmentation fault when trying to use the SurfaceLIC representation for a vti file
Hello, I am having issues with a new installation of Paraview on a Debian computer. I have loaded the SurfaceLIC plugin and open a vti file. When I select the SurfaceLIC representation Paraview crashes with the following output on the command line: $ paraview Generic Warning: In /build/paraview-NOjbRJ/paraview-5.1.2+dfsg1/VTK/Rendering/Volume/vtkVolumeTextureMapper3D.cxx, line 682 vtkVolumeTextureMapper3D::vtkVolumeTextureMapper3D was deprecated for VTK 7.0 and will be removed in a future version. Generic Warning: In /build/paraview-NOjbRJ/paraview-5.1.2+dfsg1/VTK/Rendering/VolumeOpenGL/vtkOpenGLVolumeTextureMapper3D.cxx, line 57 vtkOpenGLVolumeTextureMapper3D::vtkOpenGLVolumeTextureMapper3D was deprecated for VTK 7.0 and will be removed in a future version. ERROR: In /build/paraview-NOjbRJ/paraview-5.1.2+dfsg1/VTK/Rendering/OpenGL/vtkPixelBufferObject.cxx, line 578 vtkPixelBufferObject (0x55e89ba74ed0): failed at glBufferData 1 OpenGL errors detected 0 : (1285) Out of memory ERROR: In /build/paraview-NOjbRJ/paraview-5.1.2+dfsg1/VTK/Rendering/OpenGL/vtkTextureObject.cxx, line 1456 vtkTextureObject (0x55e89b57e1c0): failed at glGetTexImage 1 OpenGL errors detected 0 : (1282) Invalid operation ERROR: In /build/paraview-NOjbRJ/paraview-5.1.2+dfsg1/VTK/Rendering/OpenGL/vtkPixelBufferObject.cxx, line 504 vtkPixelBufferObject (0x55e89ba74ed0): failed at glMapBuffer 1 OpenGL errors detected 0 : (1282) Invalid operation Segmentation fault The vti files can be processed successfully on other computers. Has anybody else come across this kind of problem? Best regards, Maria ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the ParaView Wiki at: http://paraview.org/Wiki/ParaView Search the list archives at: http://markmail.org/search/?q=ParaView Follow this link to subscribe/unsubscribe: https://paraview.org/mailman/listinfo/paraview
[Paraview] PythonFullExample does not send any data
Hello, I am trying to code a tool to send live data from a simulation to paraview. I build my paraview with the latest superbuild and with system python (3.4m). Then I tried to run the "PythonFullExample". After un-commenting line 25 in fedriver.py: coprocessor.addscript("cpscript.py") the script still does not send any data. There are no error messages as well. I made sure that paraview is listening to the correct port. In general, I cannot find any python example on how to attach values to a poly element or a point. Regards, Simon Michalke ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the ParaView Wiki at: http://paraview.org/Wiki/ParaView Search the list archives at: http://markmail.org/search/?q=ParaView Follow this link to subscribe/unsubscribe: https://paraview.org/mailman/listinfo/paraview