So this is an embarrassingly simple question, but I’ve Googled a lot, and am throwing in the towel and asking for directions.
I’m writing a pvbatch script that reads a cvs/ssv file, which works fine. But when viewed in ParaView proper, the spreadsheet view calls the data “Row Data”. And for the life of me, I can’t figure out how to access “Row Data” in the Python interface. There are functions for “Cell Data” and “Point Data” and “Field Data”, but no “Row Data” (nor a couple others that the Spreadsheet offers).
The scripting layer you are working with accesses the ParaView layer of data management. That’s what takes care of setting up pipelines and coordinating them across client and any existing server processes. The actual data is available on the server side only by default. To access it in the scripting environment in which you are working, you need to explicitly bring over a copy onto the client side, which is what servermanager.Fetch does. Once you have copied the data over, then you can work with it.
I also need to know this - that is, to get PV-displayed, multiblock data out of ParaView and into Python as a flat array. Have you tried the Python interface package “paraview?” One of the problems I’m having simply outputting data from ParaView is that it gives data files (CSV) listed in block format, and also doesn’t seem to output the correct number of points, even when requesting cell-center data. My simulation is 48 x 126 = 6,048 cells, but ParaView always puts out 12,283 data points, even when requesting cell center data - so that’s confusing.
Has anyone tried the Python package “paraview?” Does it work for extracting data? I think this package can also access data slices that OP needs…
Thanks for the reply! The package “paraview” has a steep learning curve as it’s intended to fully control Paraview. I found a package “openfoamparser” which reads all the OF output files in the correct formats into data arrays.