Swarm-NG
1.1
|
In this tutorial, we revisit loading ensembles and extracting information from an ensemble; however, this time we are building a small utility to view statistical information about the contents of the ensemble.
Source code for this tutorial can be found at py/stats_tutorial.py
First try to make sure that correct command-line arguments are provided.
Next load the data file based on the extension
Now gather all data in a 3-dimensional NumPy array. NumPy has internal statstical information analysis functions that makes it easier to find different statistical information.
Dimensions are:
Now iterate through the 3-dimensional array and calculate the average and standard deviation of each orbital element value for each body, then print it to the output.
This concludes this tutorial, to learn more about the orbital elements and the calculation method look at swarmng.keplerian_for_cartesian