Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
finesse
pykat
Commits
269c1d81
Commit
269c1d81
authored
Feb 01, 2016
by
Daniel Brown
Browse files
fixing mod again
parent
4a2ed64e
Changes
2
Hide whitespace changes
Inline
Side-by-side
pykat/__init__.py
View file @
269c1d81
...
...
@@ -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
...
...
pykat/components.py
View file @
269c1d81
...
...
@@ -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
):
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"
)
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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment