-
Notifications
You must be signed in to change notification settings - Fork 5
ParticleAnalyser: Output
Max Sommer edited this page Aug 19, 2014
·
4 revisions
The output of ParticleAnalyser is a binary file that holds a 2-dimensional array organized in row-major order. All values are stored in single-precision floating-point format. Every column holds the results for a specific particle, i.e. the number of columns is equal to the number of particles stored in the file. The number of rows depends on the output format that you can specify in the input. The rows hold particle information as follows:
-
normal mode (default)
- 1 X-position
- 2 Y-position
- 3 Z-position
- 4 particle number
- 5 multiplication factor
- 6 particle mass
- 7 particle beta
- 8 creation time
-
velocity mode
-v- 1 X-position
- 2 Y-position
- 3 Z-position
- 4 X-velocity
- 5 Y-velocity
- 6 Z-velocity
- 7 particle number
- 8 multiplication factor
- 9 particle mass
- 10 particle beta
- 11 creation time
-
nodal mode
-n- 1 X-position
- 2 Y-position
- 3 Z-position
- 4 X-velocity
- 5 Y-velocity
- 6 Z-velocity
- 7 nodal time
- 8 particle number
- 9 multiplication factor
- 10 particle mass
- 11 particle beta
- 12 creation time
-
PointCache2 mode
-p- particle positions are stored in .pc2 format (see here for details).
SPICE units are used: Position coordinates are in km, velocities are in km/s, times are ephemeris times in seconds past/before J2000 (TDB), and particle masses are in kg.
%Load particles
file = fopen(file_path);
particle_states = fread(file,[8,Inf],'float');
fclose(file);