[CentralOH] Post-processing of output files/creating animation

Aaron Bush asb.bush at gmail.com
Thu Aug 5 03:54:56 CEST 2010


While not a solution in Python I would suggest looking at R (
http://www.r-project.org/).  There is a package available that may be what
you are looking to do with the plot:

http://www.exposurescience.org/heR.doc/library/heR.Misc/html/rose2.html
"Creates a directional histogram, i.e., a rose diagram, representing data on
direction, and possibly magnitude"

The ggplot2 package is also very helpful in getting your data into a graph (
http://had.co.nz/ggplot2/).

-ab

On Wed, Aug 4, 2010 at 11:03 AM, Armen Ezekielian <aezekielian at gmail.com>wrote:

> 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!!!
>
> --Armen
> _______________________________________________
> CentralOH mailing list
> CentralOH at python.org
> http://mail.python.org/mailman/listinfo/centraloh
>



-- 
-ab
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/mailman/private/centraloh/attachments/20100804/155c54fe/attachment-0001.html>


More information about the CentralOH mailing list