From ae1d5543e9eab63e18ec022a4c3d30c76d6dbb20 Mon Sep 17 00:00:00 2001
From: Daniel Brown <ddb@star.sr.bham.ac.uk>
Date: Sun, 31 Jan 2016 14:57:15 +0000
Subject: [PATCH] adding in new modulator types yaw and pitch

---
 pykat/components.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/pykat/components.py b/pykat/components.py
index 2f38226..0636079 100644
--- a/pykat/components.py
+++ b/pykat/components.py
@@ -1101,8 +1101,10 @@ class modulator(Component):
     def type(self): return self.__type
     @type.setter
     def type(self, value):
-        if value != "am" and value != "pm":
-            raise pkex.BasePyKatException("Modulator type must be am (amplitude modulation) or pm (phase modulation)")
+        accepted = ["am", "pm", "yaw", "pitch"]
+        
+        if value not in accepted:
+            raise pkex.BasePyKatException("Modulator type must be: " + ", ".join(accepted))
             
         self.__type = str(value)
     
-- 
GitLab