aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2016-01-16 15:11:21 -0800
committerThomas White <taw@physics.org>2016-01-16 15:11:21 -0800
commitd03c49371628e676c79139e6846ccce184b62245 (patch)
tree3fcc735824412bf704c940ed7da44f83174ca8ae /scripts
parentdab0992fd181f9dc969518883c514a8dbe4e4dca (diff)
scripts/ave-resolution: Show histogram of resolution values
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/ave-resolution8
1 files changed, 8 insertions, 0 deletions
diff --git a/scripts/ave-resolution b/scripts/ave-resolution
index ff93ed68..a69c456e 100755
--- a/scripts/ave-resolution
+++ b/scripts/ave-resolution
@@ -13,6 +13,7 @@
import sys
import numpy
+import matplotlib.pyplot as plt
f = open(sys.argv[1])
a = []
@@ -33,3 +34,10 @@ print " Mean: %.2f nm^-1 = %.2f A" % (numpy.mean(b),10.0/numpy.mean(b))
print " Best: %.2f nm^-1 = %.2f A" % (numpy.max(b),10.0/numpy.max(b))
print "Worst: %.2f nm^-1 = %.2f A" % (numpy.min(b),10.0/numpy.min(b))
print "Std deviation: %.2f nm^-1" % (numpy.std(b))
+
+plt.hist(a,bins=30)
+plt.title('Resolution based on indexing results')
+plt.xlabel('Resolution / nm^-1')
+plt.ylabel('Frequency')
+plt.grid(True)
+plt.show()