[CentralOH] Post-processing of output files/creating animation
aezekielian at gmail.com
Wed Aug 4 17:03:53 CEST 2010
I have a C program which outputs a six-column by N-row
data file for each time step of a simulation. The six columns
contain floats representing the coordinates and velocity
components for N particles. N is generally on the order of a
few hundred and there are at least 1000 of these files.
x y z v_x v_y v_z
N of these lines --> 1.0 1.3 1.1 2.6 1.9 3.8
And as I said there is one of these files for each time step.
I was hoping to use python to process these data files and
create a visualization using the visual.sphere() function
in VPython. I want to render a sphere at every x, y, z
point and color the spheres according to a colormap
based on the magnitude of the velocity (red = fast,
blue = slow). This would be done for each time step file
and then loop through them to create an animation.
Unfortunately I have limited python experience and little
time to accomplish this. If anyone has any tips/suggestions
on how to do the file I/O I would be extremely grateful. I am
researching the problem myself but the majority of my time is
being spent helping the students debug/run their C programs
which produce the output files above. Thank you!!!
More information about the CentralOH