From 4d44e57d34ab57c1a63b33e86869e30e1088553e Mon Sep 17 00:00:00 2001 From: Daniel Brown <ddb@star.sr.bham.ac.uk> Date: Mon, 3 Nov 2014 12:57:29 +0000 Subject: [PATCH] fixing S/N qhd parsing --- bin/test_hom.py | 3 +++ pykat/detectors.py | 7 ++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/bin/test_hom.py b/bin/test_hom.py index d226523..87c6bef 100644 --- a/bin/test_hom.py +++ b/bin/test_hom.py @@ -13,6 +13,7 @@ fsig noise l1 amp 1 0 1 qhd qhd180 180 n2 n3 qhd qhd0 0 n2 n3 qhdS qhd2 0 n2 n3 +qhdN qhd2 0 n2 n3 scale meter qhd180 scale meter qhd0 scale meter qhd2 @@ -21,6 +22,8 @@ scale 2 qhd0 xaxis l1 phase lin 0 360 360 """) +print "".join(kat.generateKatScript()) + out = kat.run() out.plot() diff --git a/pykat/detectors.py b/pykat/detectors.py index e58e16f..6902331 100644 --- a/pykat/detectors.py +++ b/pykat/detectors.py @@ -850,7 +850,12 @@ class qhd(Detector2): def parseFinesseText(text): values = text.split() - return qhd(values[1], float(values[2]), str(values[3]), str(values[4])) + sens = values[0][-1] + + if sens != 'S' and sens != 'N': + sens = None + + return qhd(values[1], float(values[2]), str(values[3]), str(values[4]), sensitivity = sens) def getFinesseText(self): rtn = [] -- GitLab