Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
frtrglib
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Valentin Bruch
frtrglib
Commits
335970cb
Verified
Commit
335970cb
authored
Aug 30, 2022
by
Valentin Bruch
Browse files
Options
Downloads
Patches
Plain Diff
data management: better filtering, error messages
parent
366c37d5
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
data_management.py
+6
-1
6 additions, 1 deletion
data_management.py
plot_pulses.py
+17
-0
17 additions, 0 deletions
plot_pulses.py
plot_pyqtgraph.py
+2
-2
2 additions, 2 deletions
plot_pyqtgraph.py
with
25 additions
and
3 deletions
data_management.py
+
6
−
1
View file @
335970cb
...
@@ -421,7 +421,7 @@ class KondoExport:
...
@@ -421,7 +421,7 @@ class KondoExport:
try
:
try
:
row
[
key
]
=
value
row
[
key
]
=
value
except
KeyError
:
except
KeyError
:
pass
settings
.
logger
.
warning
(
"
failed to set metadata value:
"
,
exc_info
=
1
)
row
.
append
()
row
.
append
()
# save data
# save data
...
@@ -842,6 +842,11 @@ class DataManager:
...
@@ -842,6 +842,11 @@ class DataManager:
selection
&=
(
self
.
df_table
.
solver_flags
&
DataManager
.
SOLVER_FLAGS
[
"
include_Ga
"
])
!=
0
selection
&=
(
self
.
df_table
.
solver_flags
&
DataManager
.
SOLVER_FLAGS
[
"
include_Ga
"
])
!=
0
elif
include_Ga
==
False
:
elif
include_Ga
==
False
:
selection
&=
(
~
self
.
df_table
.
solver_flags
&
DataManager
.
SOLVER_FLAGS
[
"
include_Ga
"
])
!=
0
selection
&=
(
~
self
.
df_table
.
solver_flags
&
DataManager
.
SOLVER_FLAGS
[
"
include_Ga
"
])
!=
0
solve_integral_exactly
=
parameters
.
pop
(
"
solve_integral_exactly
"
,
None
)
if
solve_integral_exactly
:
selection
&=
(
self
.
df_table
.
solver_flags
&
DataManager
.
SOLVER_FLAGS
[
"
solve_integral_exactly
"
])
!=
0
elif
solve_integral_exactly
==
False
:
selection
&=
(
~
self
.
df_table
.
solver_flags
&
DataManager
.
SOLVER_FLAGS
[
"
solve_integral_exactly
"
])
!=
0
truncation_order
=
parameters
.
pop
(
"
truncation_order
"
,
None
)
truncation_order
=
parameters
.
pop
(
"
truncation_order
"
,
None
)
if
truncation_order
==
2
:
if
truncation_order
==
2
:
selection
&=
(
self
.
df_table
.
solver_flags
&
DataManager
.
SOLVER_FLAGS
[
"
second_order_rg_equations
"
])
!=
0
selection
&=
(
self
.
df_table
.
solver_flags
&
DataManager
.
SOLVER_FLAGS
[
"
second_order_rg_equations
"
])
!=
0
...
...
This diff is collapsed.
Click to expand it.
plot_pulses.py
+
17
−
0
View file @
335970cb
...
@@ -11,6 +11,23 @@ import settings
...
@@ -11,6 +11,23 @@ import settings
from
data_management
import
DataManager
from
data_management
import
DataManager
from
gen_pulse_data
import
fourier_coef_gauss
from
gen_pulse_data
import
fourier_coef_gauss
import
matplotlib.pyplot
as
plt
import
matplotlib.pyplot
as
plt
from
matplotlib.colors
import
LogNorm
def
plot_gammaL
(
dm
,
omega
=
0.
,
pulse_duration
=
0.1
,
pulse_height
=
4.
,
pulse_phase
=
None
,
baseline
=
0.
,
pulse_shape
=
"
gauss
"
,
resolution
=
500
,
**
parameters
):
if
pulse_shape
==
"
gauss
"
:
vdc
,
fourier_coef
=
fourier_coef_gauss
(
10
,
omega
,
pulse_duration
,
pulse_height
,
pulse_phase
,
baseline
)
else
:
raise
ValueError
(
"
unknown pulse shape
"
)
# TODO: select parameters!
x
=
np
.
linspace
(
-
np
.
pi
,
np
.
pi
,
resolution
)
for
kondo
in
dm
.
load_all
(
vdc
=
vdc
,
has_fourier_coef
=
True
,
fourier_coef
=
fourier_coef
,
**
parameters
):
nmax
=
kondo
.
nmax
gammaL
=
kondo
.
gammaL
img
=
plt
.
imshow
(
np
.
abs
(
gammaL
),
norm
=
LogNorm
(
1e-6
))
plt
.
colorbar
(
img
)
plt
.
show
()
def
current_time
(
dm
,
omega
=
0.
,
pulse_duration
=
0.1
,
pulse_height
=
4.
,
pulse_phase
=
None
,
baseline
=
0.
,
pulse_shape
=
"
gauss
"
,
resolution
=
500
,
**
parameters
):
def
current_time
(
dm
,
omega
=
0.
,
pulse_duration
=
0.1
,
pulse_height
=
4.
,
pulse_phase
=
None
,
baseline
=
0.
,
pulse_shape
=
"
gauss
"
,
resolution
=
500
,
**
parameters
):
if
pulse_shape
==
"
gauss
"
:
if
pulse_shape
==
"
gauss
"
:
...
...
This diff is collapsed.
Click to expand it.
plot_pyqtgraph.py
+
2
−
2
View file @
335970cb
...
@@ -495,7 +495,7 @@ def compare_orders(dm,
...
@@ -495,7 +495,7 @@ def compare_orders(dm,
**
trashoptions
**
trashoptions
):
):
cmap
=
cm
.
get_cmap
(
cmap
)
cmap
=
cm
.
get_cmap
(
cmap
)
data
=
dm
.
list
(
omega
=
omega
,
d
=
d
,
solver_tol_rel
=
solver_tol_rel
,
solver_tol_abs
=
solver_tol_abs
,
method
=
method
,
padding
=
padding
,
xL
=
xL
)
data
=
dm
.
list
(
omega
=
omega
,
d
=
d
,
solver_tol_rel
=
solver_tol_rel
,
solver_tol_abs
=
solver_tol_abs
,
method
=
method
,
padding
=
padding
,
xL
=
xL
,
include_Ga
=
False
,
solve_integral_exactly
=
False
)
bad_flags
=
DataManager
.
SOLVER_FLAGS
[
"
simplified_initial_conditions
"
]
\
bad_flags
=
DataManager
.
SOLVER_FLAGS
[
"
simplified_initial_conditions
"
]
\
|
DataManager
.
SOLVER_FLAGS
[
"
extrapolate_voltage
"
]
\
|
DataManager
.
SOLVER_FLAGS
[
"
extrapolate_voltage
"
]
\
|
DataManager
.
SOLVER_FLAGS
[
"
deleted
"
]
|
DataManager
.
SOLVER_FLAGS
[
"
deleted
"
]
...
@@ -590,7 +590,7 @@ PRESETS = dict(
...
@@ -590,7 +590,7 @@ PRESETS = dict(
omega5log
=
dict
(
omega
=
16.5372
,
xyscale
=
"
log
"
,
scale
=
1
,
d
=
1e9
,
truncation_order
=
3
),
omega5log
=
dict
(
omega
=
16.5372
,
xyscale
=
"
log
"
,
scale
=
1
,
d
=
1e9
,
truncation_order
=
3
),
interp
=
dict
(
function
=
plot_interpolated
,
truncation_order
=
3
),
interp
=
dict
(
function
=
plot_interpolated
,
truncation_order
=
3
),
convergence
=
dict
(
function
=
plot_convergence
,
truncation_order
=
3
),
convergence
=
dict
(
function
=
plot_convergence
,
truncation_order
=
3
),
orders
=
dict
(
function
=
compare_orders
),
orders
=
dict
(
function
=
compare_orders
,
omega
=
16.5372
),
gamma_overview
=
dict
(
function
=
full_overview
,
d
=
1e9
,
truncation_order
=
3
,
plot_value
=
"
gamma
"
),
gamma_overview
=
dict
(
function
=
full_overview
,
d
=
1e9
,
truncation_order
=
3
,
plot_value
=
"
gamma
"
),
gamma
=
dict
(
d
=
1e9
,
truncation_order
=
3
,
plot_value
=
"
gamma
"
,
scale
=
10
,
size
=
1
),
gamma
=
dict
(
d
=
1e9
,
truncation_order
=
3
,
plot_value
=
"
gamma
"
,
scale
=
10
,
size
=
1
),
idc
=
dict
(
d
=
1e9
,
truncation_order
=
3
,
plot_value
=
"
dc_current
"
,
scale
=
10
,
size
=
1
),
idc
=
dict
(
d
=
1e9
,
truncation_order
=
3
,
plot_value
=
"
dc_current
"
,
scale
=
10
,
size
=
1
),
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment