Skip to content
Snippets Groups Projects
Commit 269c1d81 authored by Daniel Brown's avatar Daniel Brown
Browse files

fixing mod again

parent 4a2ed64e
No related branches found
No related tags found
No related merge requests found
......@@ -3,7 +3,7 @@ from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
__version__ = "0.8.4"
__version__ = "0.8.5"
# This flag is used to switch on the gui features in pkat at import time
USE_GUI = False
......
......@@ -1088,13 +1088,21 @@ class modulator(Component):
def phase(self, value): self.__phase.value = SIfloat(value)
@property
def order(self): return int(self.__order)
def order(self): return self.__order
@order.setter
def order(self, value):
try:
value = int(value)
print(value)
if value <= 1 and value > 6:
raise pkex.BasePyKatException("modulator order must be between 1 and 6 or 's' for single sideband")
except ValueError:
if value != 's' or (isinstance(value, int) and value <= 1 and value > 6):
raise pkex.BasePyKatException("modulator order must be between 1 and 6 or 's' for single sideband")
self.__midx.value = value
self.__order = value
@property
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment