Introduction
Introduction Statistics Contact Development Disclaimer Help
tupdate slider plotting routine with new variable names - slidergrid - grid of …
git clone git://src.adamsgaard.dk/slidergrid
Log
Files
Refs
README
LICENSE
---
commit b7c2f91bf3969f60232019e78e937aaa8d894f1f
parent 2186c59a2858b1645b8f09a0cea58e87358aeda0
Author: Anders Damsgaard <[email protected]>
Date: Wed, 30 Mar 2016 14:02:24 -0700
update slider plotting routine with new variable names
Diffstat:
M postprocessing.py | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
---
diff --git a/postprocessing.py b/postprocessing.py
t@@ -33,10 +33,20 @@ class sgvis:
def read_sliders(self, filename):
self.filename = filename
- self.sliders = np.loadtxt(self.folder + '/' + self.filename)
+ raw = np.loadtxt(self.folder + '/' + self.filename)
+ self.pos = raw[:, 0:3]
+ self.vel = raw[:, 3:6]
+ self.acc = raw[:, 6:9]
+ self.force = raw[:, 9:12]
+ self.angpos = raw[:, 12:15]
+ self.angvel = raw[:, 15:18]
+ self.angacc = raw[:, 18:21]
+ self.torque = raw[:, 21:24]
+ self.mass = raw[:, 24]
+ self.moment_of_inertia = raw[:, 25]
def plot_sliders(self):
- plt.plot(self.sliders[:, 0], self.sliders[:, 1], '+')
+ plt.plot(self.pos[:, 0], self.pos[:, 1], '+')
outfile = self.folder + '/' + self.filename + '.pdf'
print(outfile)
plt.savefig(outfile)
t@@ -73,6 +83,7 @@ class sgvis:
plt.savefig(outfile)
plt.clf()
+
def iterate_over_folders_and_files(folders,
plot_sliders,
plot_kinetic_energy):
You are viewing proxied material from mx1.adamsgaard.dk. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.