aboutsummaryrefslogtreecommitdiffstats
path: root/ReduceH5
diff options
context:
space:
mode:
authorVolker Hoffmann <volker@cheleb.net>2014-11-26 21:18:10 +0100
committerVolker Hoffmann <volker@cheleb.net>2014-11-26 21:18:10 +0100
commitf420323d497ed961c667490765b9eca4f35ab4d7 (patch)
treed681e650715d555c172e6663b86b3d0583181434 /ReduceH5
parentfeddc3a3501b9af98dd463f0769ece5216d28879 (diff)
use vectorized version of compute_ellipse in reduction
Diffstat (limited to 'ReduceH5')
-rw-r--r--ReduceH5/reduce_genga.py11
1 files changed, 4 insertions, 7 deletions
diff --git a/ReduceH5/reduce_genga.py b/ReduceH5/reduce_genga.py
index d62c62f..5e33086 100644
--- a/ReduceH5/reduce_genga.py
+++ b/ReduceH5/reduce_genga.py
@@ -127,15 +127,12 @@ for istep, nstep in enumerate(nsteps):
f5.attrs["coordinate_frame"] = "barycentric"
# Compute Ellipses?
- # @todo - Write vectorized version?
if args.ellipses:
+ xell, yell, zell = kh.compute_ellipseX(a, e, i, Omega, omega)
for ipid, pidloc in enumerate(pid):
- xell, yell, zell = \
- kh.compute_ellipse(a[ipid], e[ipid], i[ipid], \
- Omega[ipid], omega[ipid])
- f5.create_dataset("ellipses/%i/x" % pidloc, data=xell)
- f5.create_dataset("ellipses/%i/y" % pidloc, data=yell)
- f5.create_dataset("ellipses/%i/z" % pidloc, data=zell)
+ f5.create_dataset("ellipses/%i/x" % pidloc, data=xell[ipid,:])
+ f5.create_dataset("ellipses/%i/y" % pidloc, data=yell[ipid,:])
+ f5.create_dataset("ellipses/%i/z" % pidloc, data=zell[ipid,:])
f5["ellipses/%i/x" % pidloc].attrs["units"] = "AU"
f5["ellipses/%i/y" % pidloc].attrs["units"] = "AU"
f5["ellipses/%i/z" % pidloc].attrs["units"] = "AU"