aboutsummaryrefslogtreecommitdiff
path: root/scripts/peak-intensity
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2017-07-06 17:22:11 +0200
committerThomas White <taw@physics.org>2017-07-06 17:24:59 +0200
commit5292f57d4434c7267e8d945871513d742ff42427 (patch)
treed460aa5cef5a501516876850ef243cfc27313d5a /scripts/peak-intensity
parent48d4a6b8e82cce81222ec58fdfb488ed79ce0bcf (diff)
parentdc3395900fc3ce0d3961757628ff83ad6456be19 (diff)
Merge branch 'master' into taketwo
Diffstat (limited to 'scripts/peak-intensity')
-rwxr-xr-xscripts/peak-intensity16
1 files changed, 8 insertions, 8 deletions
diff --git a/scripts/peak-intensity b/scripts/peak-intensity
index 53610b73..65e066cf 100755
--- a/scripts/peak-intensity
+++ b/scripts/peak-intensity
@@ -1,13 +1,13 @@
#!/usr/bin/env python
-
+# -*- coding: utf-8 -*-
#
# Quantify peak intensities
#
-# Copyright (c) 2015 Deutsches Elektronen-Synchrotron DESY,
-# a research centre of the Helmholtz Association.
+# Copyright © 2015-2017 Deutsches Elektronen-Synchrotron DESY,
+# a research centre of the Helmholtz Association.
#
# Author:
-# 2015 Thomas White <taw@physics.org>
+# 2015-2017 Thomas White <taw@physics.org>
#
import sys
@@ -40,8 +40,8 @@ while True:
f.close()
-print '%i patterns, %i peaks' % (n_patt,n_peaks)
-print 'Mean %.2f peaks per pattern' % (n_peaks/n_patt)
-print 'Mean %.2f ADU per peak' % (total_intens/n_peaks)
-print 'Mean %.2f ADU total per pattern' % (total_intens/n_patt)
+print('{} patterns, %i peaks'.format(n_patt,n_peaks))
+print('Mean {:.2f} peaks per pattern'.format(n_peaks/float(n_patt)))
+print('Mean {:.2f} ADU per peak'.format(total_intens/float(n_peaks)))
+print('Mean {:.2f} ADU total per pattern'.format(total_intens/n_patt))