aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2017-11-14 15:15:08 +0100
committerThomas White <taw@physics.org>2017-11-14 15:15:08 +0100
commit69e6dcc10d7ac96ba71b35a2908197a9a60ac20c (patch)
tree1f5857d76bac8ca5a748ba4d5214e68e9106decf
parentc08e56bb8d46f70a41f444e7e77f27ec83e2c5a2 (diff)
scripts/detector-shift: Handle "-" for input
-rwxr-xr-xscripts/detector-shift6
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/detector-shift b/scripts/detector-shift
index 440bd962..74106179 100755
--- a/scripts/detector-shift
+++ b/scripts/detector-shift
@@ -17,7 +17,11 @@ import re
import numpy as np
import matplotlib.pyplot as plt
-f = open(sys.argv[1], 'r')
+if sys.argv[1] == "-":
+ f = sys.stdin
+else:
+ f = open(sys.argv[1], 'r')
+
if len(sys.argv) > 2:
geom = sys.argv[2]
have_geom = 1