aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortlatorre <tlatorre@uchicago.edu>2019-03-26 10:39:47 -0500
committertlatorre <tlatorre@uchicago.edu>2019-03-26 10:39:47 -0500
commit219a9023ff789aa735b9a95c78e942e256a0424a (patch)
tree46d2b4464c061cdc6c414ece5919527f1814111e
parentbf60d08d517e7887417f0aa4068b726a8c749e58 (diff)
downloadsddm-219a9023ff789aa735b9a95c78e942e256a0424a.tar.gz
sddm-219a9023ff789aa735b9a95c78e942e256a0424a.tar.bz2
sddm-219a9023ff789aa735b9a95c78e942e256a0424a.zip
update plotting scripts to handle case when there is no fit
-rwxr-xr-xutils/plot4
-rwxr-xr-xutils/plot-fit-results4
2 files changed, 8 insertions, 0 deletions
diff --git a/utils/plot b/utils/plot
index 8fd2fae..6aa55fa 100755
--- a/utils/plot
+++ b/utils/plot
@@ -95,6 +95,10 @@ if __name__ == '__main__':
if 'ev' not in event:
continue
+ if 'fit' not in event['ev'][0]:
+ # if nhit < 100 we don't fit the event
+ continue
+
if id not in event['ev'][0]['fit']:
continue
diff --git a/utils/plot-fit-results b/utils/plot-fit-results
index 7a9708e..e1f7987 100755
--- a/utils/plot-fit-results
+++ b/utils/plot-fit-results
@@ -103,6 +103,10 @@ if __name__ == '__main__':
a[i]['id'] = id
+ if 'fit' not in event['ev'][0]:
+ # if nhit < 100 we don't fit the event
+ continue
+
if id not in event['ev'][0]['fit']:
a[i] = np.ma.masked
continue