-
Notifications
You must be signed in to change notification settings - Fork 444
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature Request: Temporal data set (or clarification on usage) #412
Comments
Hi @MatthewFlamm, thanks for posting your question here as it brings up an excellent data management point when it comes to temporal datasets. We haven't really given a ton of thought to how we should be properly managing time-varying datasets in PyVista because VTK handles time variance over a pipeline and PyVista has effectively removed the pipelining nature of VTK. Thus we're in need of a clear way to manage time varying data which can become be rather complicated. Datasets/meshes can have time variance in one of two ways:
Typically, I work with datasets where the spatial reference remains constant but the values on the points/cells change (simulating a time-varying field in a discretized space). To do this, I usually have a single data array for each timestep associated with one mesh. I.e. something like: import pyvista as pv
import numpy as np
mesh = pv.Sphere()
time_steps = [0, 1, 2, ]
for t in time_steps:
# each of these arrays would be my data at different time steps
mesh["time:{}".format(t)] = np.random.rand(mesh.n_points) and then I might iterate over those arrays while plotting to create a GIF or something like in the docs. What might be an interesting idea would be to add a metadata tracker to PyVista meshes where you can say all arrays with a given prefix (e.g. When it comes to dealing with time-variance of the mesh's spatial reference, things get really messy. At the moment, having a |
I am currently using data which has a static spatial grid but has varying values over time points, so your example definitely makes more sense to me. I don't need to use It would be great to have a more general time varying data set implementation and corresponding filters (or operations) for more complex cases, but I agree that this needs a lot of thought to keep it as straightforward, flexible, and easy-to-use as the existing functionality. Keep up the great work! At some point vtk had a |
Is there a more standard way to group and use temporal data sets in PyVista than what I am doing? If not, I would like this to be a feature request for a
TemporalDataSet
implementation.I have a 'file.pvd' that has a vtk collection with 'timestep' but this cannot be read in with
pv.read('file.pvd')
, so I'm using this manual method to read it in and then manual methods to sort and extract data.#90 deals with plotting as far as I can tell, and this request is about the structure to handle time dependent data.
Here is a skeleton of what I'm doing now:
The text was updated successfully, but these errors were encountered: