From 0ebac484e2d58bef696c515f730e0527da7d9de9 Mon Sep 17 00:00:00 2001 From: Daniel Brown <ddb@star.sr.bham.ac.uk> Date: Fri, 31 Jan 2014 14:11:00 +0000 Subject: [PATCH] fixing typos affecting DC pd --- pykat/detectors.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pykat/detectors.py b/pykat/detectors.py index 6e2f409..bc9c0dd 100644 --- a/pykat/detectors.py +++ b/pykat/detectors.py @@ -213,12 +213,12 @@ class pd(Detector): demods = int(values[0][3]) elif len(values[0]) == 3: demods = int(values[0][2]) - elif len(values[0] != 2): + elif len(values[0]) != 2: raise pkex.BasePyKatException("Photodiode code format incorrect '{0}'".format(text)) if len(values) <= 3 and demods > 0: raise pkex.BasePyKatException("Photodiode code format incorrect '{0}'".format(text)) - elif len(values) >= 3 and demods == 0: + elif len(values) > 3 and demods == 0: raise pkex.BasePyKatException("Photodiode code format incorrect '{0}'".format(text)) num_f_phs = len(values) - 3 -- GitLab