18 from sys
import argv,exit
20 if len(argv) != 2
or not path.exists(argv[1]):
21 print(
"Usage: {0} <path_to_data_file>".format(argv[0]))
27 ext = path.splitext(fn)[1]
44 shape = (ens.nbod-1, 6, ens.nsys)
45 value = numpy.empty(shape)
46 for sysid, sys
in enumerate(ens):
48 center = (star.pos,star.vel,star.mass)
50 for bodid
in range(1,ens.nbod):
52 planet = (bod.pos,bod.vel,bod.mass)
54 value[bodid-1, :,sysid] = orbital_elements
62 print(
"Body number, Semi-major axis, Eccentricity, Inclination, Longtitude of the ascending node, Argument of periapsis, Mean anomaly")
63 for bodid
in range(1,ens.nbod):
64 orbital_elements = [0,0,0,0,0]
65 o =
"{0}".format(bodid)
67 o +=
", {0}±{1}".format(numpy.average(value[bodid-1,i,:]),numpy.std(value[bodid-1,i,:]))