programmable filter to evaluate field at some points and visualize it

I applied the programmable filter to two active sources which both contain a scalar field called energy:

source1= inputs[0]
source2= inputs[1]
field1 = source1.PointData[“energy”]
field2 = source2.PointData[“energy”]
err = (field1 - field2)/field1

I want to evaluate the error “err” at some points that I read from file and then visualize the error at these points.

If I do

output.PointData.append(err , “errEnergy”)

I get a new field that contains the entire domain, not only the sampled points. However, I want to get something like a “scatter plot”.

How can I do this? Is programmable filter the right tool for me?

Thank you!

I want to evaluate the error “err” at some points

One way to achieve this is by resampling your initial data onto the points of interest and then calculate the error. Check the Resample to Dataset filter .

However, I want to get something like a “scatter plot”.
Depending on the dataset you pass in the above filter you can achieve any distribution you want.

For example, here I am evaluating the wavelet field only at some points .

By supplying as input the output dataset from above and as seeds the points of interest you should have the result you are looking for.