tAdded porosity plot function - sphere - GPU-based 3D discrete element method a… | |
git clone git://src.adamsgaard.dk/sphere | |
Log | |
Files | |
Refs | |
LICENSE | |
--- | |
commit 54d689a2ba2ccbed85b742b66b1c33c13bb34f28 | |
parent 7aee4d6b8a34e425bff22f156771f5d03a712a5f | |
Author: Anders Damsgaard <[email protected]> | |
Date: Mon, 8 Apr 2013 10:44:10 +0200 | |
Added porosity plot function | |
Diffstat: | |
M python/sphere.py | 16 +++++++++++++++- | |
1 file changed, 15 insertions(+), 1 deletion(-) | |
--- | |
diff --git a/python/sphere.py b/python/sphere.py | |
t@@ -9,6 +9,7 @@ import subprocess | |
numpy.seterr(all='warn', over='raise') | |
+ | |
class Spherebin: | |
""" | |
Class containing all data SPHERE data. | |
t@@ -1438,7 +1439,6 @@ class Spherebin: | |
# Save x displacement standard deviation | |
err[iz] = numpy.std(self.xysum[I,0]) | |
- | |
plt.figure(figsize=[4, 4]) | |
ax = plt.subplot(111) | |
ax.scatter(self.xysum[:,0], self.x[:,2], c='gray', marker='+') | |
t@@ -1448,6 +1448,20 @@ class Spherebin: | |
ax.set_ylabel("Vertical position, [m]") | |
plt.savefig(self.sid + '-sheardisp.' + outformat, transparent=True) | |
+ def porosities(self, outformat='pdf', zslices=16): | |
+ ''' Plot porosities with depth ''' | |
+ | |
+ porosity, depth = self.porosity(zslices) | |
+ | |
+ plt.figure(figsize=[4, 4]) | |
+ ax = plt.subplot(111) | |
+ ax.plot(porosity, depth, | |
+ c='black', linestyle='-', linewidth=1.4) | |
+ ax.set_xlabel("Horizontally averaged porosity, [-]") | |
+ ax.set_ylabel("Vertical position, [m]") | |
+ plt.savefig(self.sid + '-porositiy.' + outformat, transparent=True) | |
+ | |
+ | |
def thinsection_x1x3(self, | |
x2 = 'center', |