Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Institute of Experimental Physics
Quantum Circuits
python-repo
Commits
335d558c
Commit
335d558c
authored
Apr 22, 2021
by
Romain Baptiste Dominique Albert
Browse files
Merge branch 'master' into Bilt_voltage_source
parents
5445010c
26406f48
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
13 deletions
+10
-13
CircleFit/circuit.py
CircleFit/circuit.py
+3
-3
DataModule/functions.py
DataModule/functions.py
+1
-1
Instruments/PS.py
Instruments/PS.py
+6
-9
No files found.
CircleFit/circuit.py
View file @
335d558c
...
...
@@ -373,7 +373,7 @@ class Notch(circuit):
# Notch model
value
=
(
self
.
a
*
np
.
exp
(
1j
*
self
.
alpha
)
*
(
1
-
self
.
Ql
/
self
.
absQc
*
np
.
exp
(
1j
*
self
.
phi0
)
/
(
1.
+
2j
*
self
.
Ql
*
(
self
.
freq
/
(
1.
+
2j
*
self
.
Ql
*
(
freq
s
/
self
.
fr
-
1
))))
# Subtract Background
try
:
...
...
@@ -385,7 +385,7 @@ class Notch(circuit):
pass
# Electric delay
value
*=
np
.
exp
(
-
2j
*
np
.
pi
*
self
.
freq
*
self
.
delay
)
value
*=
np
.
exp
(
-
2j
*
np
.
pi
*
freq
s
*
self
.
delay
)
return
value
...
...
@@ -470,6 +470,6 @@ class Reflection(circuit):
pass
# Electric delay
value
*=
np
.
exp
(
-
2j
*
np
.
pi
*
self
.
freq
*
self
.
delay
)
value
*=
np
.
exp
(
-
2j
*
np
.
pi
*
freq
s
*
self
.
delay
)
return
value
DataModule/functions.py
View file @
335d558c
...
...
@@ -161,7 +161,7 @@ def load_datamodule(filename, upgrade=True):
tmp
=
data_grid
([[
0
],
[
0
],
[[
0
]]])
# Save xarray DataArray
tmp
.
df
=
ds
[
list
(
ds
.
keys
())[
0
]]
tmp
.
df
=
ds
[
list
(
ds
.
keys
())[
0
]]
.
copy
()
# Set attributes of dm object
for
key
,
value
in
eval
(
tmp
.
df
.
attrs
[
'dm_metadata'
]).
items
():
...
...
Instruments/PS.py
100644 → 100755
View file @
335d558c
...
...
@@ -113,10 +113,11 @@ class PS(object):
Frequency in Hz. Use '?' to query current value.
"""
resp
=
self
.
instr
.
frequency
(
frequency
)
# Update database values
if
str
(
frequency
)
!=
"?"
:
if
str
(
frequency
)
!=
"?"
and
str
(
frequency
)
!=
"min?"
and
str
(
frequency
)
!=
"max?"
:
update_db
(
self
)
# Return value
...
...
@@ -131,10 +132,11 @@ class PS(object):
Phase in degree. Use '?' to query current value.
"""
resp
=
self
.
instr
.
phase
(
phase
)
# Update database values
if
str
(
phase
)
!=
"?"
:
if
str
(
phase
)
!=
"?"
and
str
(
phase
)
!=
"min?"
and
str
(
phase
)
!=
"max?"
and
str
(
phase
)
!=
"step?"
:
update_db
(
self
)
# Return value
...
...
@@ -142,12 +144,7 @@ class PS(object):
# Database functions #######################################################
def
get_parameters
(
self
):
d
=
{
'Phase'
:
'{} degree'
.
format
(
self
.
phase
()),
'Frequency'
:
'{} Hz'
.
format
(
self
.
frequency
()),
'Minimum frequency'
:
'{} Hz'
.
format
(
self
.
frequency
(
'min?'
)),
'Maximum frequency'
:
'{} Hz'
.
format
(
self
.
frequency
(
'max?'
)),
'Minimum phase'
:
'{} degree'
.
format
(
self
.
phase
(
'min?'
)),
'Maximum phase'
:
'{} degree'
.
format
(
self
.
phase
(
'max?'
)),
'Step phase'
:
'{} degree'
.
format
(
self
.
phase
(
'step?'
)),
}
'Frequency'
:
'{} Hz'
.
format
(
self
.
frequency
())}
return
d
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