From da88488674660041eff734aa4dc0d28a1d2bbe4b Mon Sep 17 00:00:00 2001 From: Thomas White Date: Thu, 19 Oct 2017 14:40:03 +0200 Subject: peakogram-stream: Show the line and cell parameters when the maths goes wrong --- scripts/peakogram-stream | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/peakogram-stream b/scripts/peakogram-stream index 1f67b39c..233a4e6f 100755 --- a/scripts/peakogram-stream +++ b/scripts/peakogram-stream @@ -102,7 +102,11 @@ with open(args.i) as f: # Add reflection to list columns = line.split() n += 1 - data.append([resolution(cell, columns[0:3]),columns[5]]) + try: + data.append([resolution(cell, columns[0:3]),columns[5]]) + except: + print("Error with line: "+line.rstrip("\r\n")) + print("Cell: "+str(cell)) if n%1000==0: sys.stdout.write("\r%i peaks found" % n) -- cgit v1.2.3