This one is really giving me a headache...
I have a dataset consisting of X groups of particles each with some group-specific properties. Each of these groups contain a certain amount of particles with a given velocity distribution and each particle flies in a certain direction. I'm keeping track of the position of the particles as a function of time. Now, I want to make some meaningful visualizations out of this data.
For the case of simplicity, let's assume the velocities have been binned into N bins and the number of particles per velocity bin is always the same. Furthermore, let's assume I'm only looking at the absolute distance w.r.t. origin (i.e. position becomes a single value).
I have the position data for this simplified case stored for T timesteps in a 3D array (T x N x X). I have already discretized my position data such that all values are now points on a equidistant grid. Now I'm looking to visualize e.g. the total number of particles at every position at a given time using e.g. hist3
or surf
.
Basically, all I want to do is count the number of occurrences of each discrete position for every timestep. While I could simply loop over the timesteps to get my counts, I'm hoping there is a more elegant solution to tackle this!