Setup: I have a Cell Data velocity vector u (3 components) on a Structured/Curvilinear Grid. I apply a Transform filter (rotation), then a Python Calculator on top with the expression u/20.15.
Problem: After the Transform filter, the Python Calculator treats u as a single scalar value instead of a 3-component vector, so I lose the ability to select X/Y/Z components in the output.
What works:
Applying the same Python Calculator expression before the Transform filter (directly on the original data) works fine — u is correctly treated as a vector.
The regular (non-Python) Calculator filter still works correctly even after the Transform filter, and it keeps u as a proper vector with the Magnitude/X/Y/Z selector.
So the issue seems specific to the Python Calculator when it’s placed after a Transform filter.
Question: Why does this happen, and is there a way to keep the vector shape intact when using the Python Calculator after a Transform filter?
I tried to reproduce your problem in ParaView 5.11,2, 5.13, and 6.2.0-RC1 (my 5.12 installation wasn’t working) on macOS using this pipeline:
FastUniformGrid → Point Data to Cell Data → Transform → Python Calculator with expression “Swirl/20.15”.
Both the “Swirl” cell data array produced by the Transform filter and the “result” array computed by the Python Calculator have three components, so I was unable to reproduce.
I also tried renaming “Swirl” to “u” in case there was anything special about the name “u” (there shouldn’t be), but that still worked fine.
Are you able to share sample data that is showing you this bug?
Yes, of course I can share the data. What is the best way to do it? (I can share anything you need).
I’m also uploading screenshots of both calculator’s Properties and Information windows, where you can see that for the normal calculator the output is a vector, but the same does not happen for the Python calculator.
Btw, I’m using the Python calculator because when I use the normal calculator filter, there in no way for the replacement value to be NaN, which is what I need. And if I unselect the “Replace Invalid Results” option, an error occurs.