pyvista.DataSetFilters.probe#

DataSetFilters.probe(points, tolerance=None, pass_cell_data=True, pass_point_data=True, categorical=False, progress_bar=False, locator=None)[source]#

Sample data values at specified point locations.

Deprecated since version 0.41.0: probe will be removed in a future version. Use pyvista.DataSetFilters.sample() instead. If using mesh1.probe(mesh2), use mesh2.sample(mesh1).

This uses vtkProbeFilter.

Parameters:
pointspyvista.DataSet

The points to probe values on to. This should be a PyVista mesh or something wrap() can handle.

tolerancefloat, optional

Tolerance used to compute whether a point in the source is in a cell of the input. If not given, tolerance is automatically generated.

pass_cell_databool, default: True

Preserve source mesh’s original cell data arrays.

pass_point_databool, default: True

Preserve source mesh’s original point data arrays.

categoricalbool, default: False

Control whether the source point data is to be treated as categorical. If the data is categorical, then the resultant data will be determined by a nearest neighbor interpolation scheme.

progress_barbool, default: False

Display a progress bar to indicate progress.

locatorvtkAbstractCellLocator, optional

Prototype cell locator to perform the FindCell() operation.

Returns:
pyvista.DataSet

Dataset containing the probed data.

Examples

Probe the active scalars in grid at the points in mesh.

>>> import pyvista as pv
>>> from pyvista import examples
>>> mesh = pv.Sphere(center=(4.5, 4.5, 4.5), radius=4.5)
>>> grid = examples.load_uniform()
>>> result = grid.probe(mesh)  
>>> 'Spatial Point Data' in result.point_data  
True