From 669ee55af0567a99186e54442e2706a2bc180cb8 Mon Sep 17 00:00:00 2001 From: Richard Jones Date: Thu, 17 May 2018 20:13:37 -0400 Subject: [PATCH] - update to write out run ranges instead of individual runs [rtj] --- ccdb/rcdbscan.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/ccdb/rcdbscan.py b/ccdb/rcdbscan.py index e2057d8b5..5682bffa2 100755 --- a/ccdb/rcdbscan.py +++ b/ccdb/rcdbscan.py @@ -17,21 +17,25 @@ run = -1 col = 0 con = 0 +lastrun = 0 for value in values.rows: lastcol = col lastcon = con run = value[0] + if value[2] == "Retracted": + con = 0 + elif value[2] == "Be 75um": + con = 75 + elif value[2] == "Be 750um": + con = 750 if value[1] == "5.0mm hole": col = 50 elif value[1] == "3.4mm hole": col = 34 elif value[1] == "Blocking": col = 0 - if value[2] == "Retracted": con = 0 - elif value[2] == "Be 75um": - con = 75 - elif value[2] == "Be 750um": - con = 750 if col != lastcol or con != lastcon: - print run, col, con + print "{0}-{1}".format(lastrun, run-1), lastcol, lastcon + lastrun = run +print "{0}-{1}".format(lastrun, run), col, con