Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Teresa Hönigl-Decrinis
python-repo
Commits
9a1484eb
Commit
9a1484eb
authored
Aug 18, 2019
by
Christian Schneider
Browse files
Fixed bugs and tested
parent
06702a41
Changes
2
Hide whitespace changes
Inline
Side-by-side
Instruments/DA.py
View file @
9a1484eb
...
...
@@ -148,8 +148,8 @@ class DA(object):
# Database functions #######################################################
def
get_parameters
(
self
):
d
=
{
'Attenuation'
:
'{:.
0
f} dB'
.
format
(
self
.
attenuation
()),
'Deviation'
:
'{
:.2f
} dB'
.
format
(
self
.
deviation
()),
d
=
{
'Attenuation'
:
'{:.
1
f} dB'
.
format
(
self
.
attenuation
()),
'Deviation'
:
'{} dB'
.
format
(
self
.
deviation
()),
'Maximum Attenuation'
:
(
'{:.0f} dB'
.
format
(
self
.
instr
.
max_attenuation
)),
'Maximum Frequency'
:
(
'{:.0f} GHz'
...
...
Instruments/Drivers/MiniCircuits/RCDAT.py
View file @
9a1484eb
...
...
@@ -36,7 +36,8 @@ class RCDAT(object):
self
.
_inst
=
rm
.
open_resource
(
'TCPIP0::{}::SOCKET'
.
format
(
ip
))
# Correct for bug in minicircuits communication implementation
self
.
_inst
.
read_termination
=
'
\n\r
'
self
.
_inst
.
read_termination
=
'
\r
'
self
.
_inst
.
read
()
def
com
(
self
,
command
,
arg
=
"?"
):
"""Function to communicate with the device. Gives the current status
...
...
@@ -44,7 +45,7 @@ class RCDAT(object):
if
arg
==
"?"
:
resp
=
self
.
_inst
.
query
(
"{}?"
.
format
(
command
))
try
:
return
float
(
resp
)
return
float
(
resp
.
strip
(
'
\n
'
)
)
except
:
return
resp
.
strip
(
'
\n
'
)
...
...
@@ -106,7 +107,7 @@ class RCDAT(object):
# Query current value
else
:
return
self
.
com
(
'ATT'
)
return
self
.
com
(
'
:
ATT'
)
def
set_offset
(
self
,
offset
=
'?'
):
pass
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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