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
2c902753
Verified
Commit
2c902753
authored
Oct 12, 2022
by
Valentin Bruch
Browse files
Options
Downloads
Patches
Plain Diff
plots: comparison to photon assisted tunneling; adapt for asymmetric coupling
parent
d54aab25
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
final_plots.py
+26
-1
26 additions, 1 deletion
final_plots.py
plot.py
+1
-0
1 addition, 0 deletions
plot.py
plot_pyqtgraph.py
+25
-1
25 additions, 1 deletion
plot_pyqtgraph.py
with
52 additions
and
2 deletions
final_plots.py
+
26
−
1
View file @
2c902753
...
@@ -13,7 +13,8 @@ import matplotlib.colors as mplcolors
...
@@ -13,7 +13,8 @@ import matplotlib.colors as mplcolors
from
matplotlib.widgets
import
Slider
from
matplotlib.widgets
import
Slider
import
argparse
import
argparse
import
numpy
as
np
import
numpy
as
np
from
scipy.interpolate
import
bisplrep
,
bisplev
,
splrep
,
BSpline
,
griddata
from
scipy.interpolate
import
bisplrep
,
bisplev
,
splrep
,
BSpline
,
griddata
,
interp1d
from
scipy.special
import
jn
import
settings
import
settings
from
data_management
import
DataManager
,
KondoImport
from
data_management
import
DataManager
,
KondoImport
...
@@ -81,6 +82,30 @@ def save_overview(
...
@@ -81,6 +82,30 @@ def save_overview(
# # np.savetxt(file, np.array([vdc_data[i]/omega, vac_data[i]/omega, np.pi*gdc_g_interp[i], np.pi*gdc_i_interp[i], np.pi*gac_interp[i], idc_interp[i], iac_interp[i]]).T)
# # np.savetxt(file, np.array([vdc_data[i]/omega, vac_data[i]/omega, np.pi*gdc_g_interp[i], np.pi*gdc_i_interp[i], np.pi*gac_interp[i], idc_interp[i], iac_interp[i]]).T)
def
interp_vac0
(
dm
,
xL
=
0.5
):
"""
Return differential conductance G as function of Vdc at Vac=0
"""
data
=
dm
.
list
(
vac
=
0
,
omega
=
0
,
include_Ga
=
True
,
d
=
1e9
,
solver_tol_rel
=
1e-8
,
solver_tol_abs
=
1e-10
,
nmax
=
0
,
voltage_branches
=
4
,
integral_method
=-
15
,
xL
=
xL
)
data
=
data
.
sort_values
(
"
vdc
"
)
vdc
=
np
.
concatenate
((
-
data
.
vdc
[:
0
:
-
1
],
data
.
vdc
))
gdc
=
np
.
concatenate
((
data
.
dc_conductance
[:
0
:
-
1
],
data
.
dc_conductance
))
return
interp1d
(
vdc
,
gdc
,
kind
=
"
cubic
"
)
def
photon_assisted_tunneling
(
dm
,
omega
,
vdc
,
vac
,
nmax
=
50
,
xL
=
0.5
):
"""
Return differential conductance G calculated from photon
assisted tunneling at given parameters.
"""
result
=
np
.
zeros
(
np
.
broadcast_shapes
(
np
.
shape
(
omega
),
np
.
shape
(
vdc
),
np
.
shape
(
vac
)),
dtype
=
np
.
float64
)
interp
=
interp_vac0
(
dm
,
xL
=
xL
)
for
n
in
range
(
-
nmax
,
nmax
+
1
):
try
:
result
+=
jn
(
n
,
vac
/
omega
)
**
2
*
interp
(
vdc
+
n
*
omega
)
except
ValueError
:
pass
return
result
def
filter_grid_data
(
def
filter_grid_data
(
data
:
pd
.
DataFrame
,
data
:
pd
.
DataFrame
,
omega
=
16.5372
,
omega
=
16.5372
,
...
...
This diff is collapsed.
Click to expand it.
plot.py
+
1
−
0
View file @
2c902753
...
@@ -135,6 +135,7 @@ def plot(dm, **parameters):
...
@@ -135,6 +135,7 @@ def plot(dm, **parameters):
ax3
.
plot
(
table
[
parameter
],
table
.
ac_current_abs
,
'
.-
'
)
ax3
.
plot
(
table
[
parameter
],
table
.
ac_current_abs
,
'
.-
'
)
ax4
.
plot
(
table
[
parameter
],
table
.
ac_current_phase
,
'
.-
'
)
ax4
.
plot
(
table
[
parameter
],
table
.
ac_current_phase
,
'
.-
'
)
def
plot_vdc0
(
dm
,
**
parameters
):
def
plot_vdc0
(
dm
,
**
parameters
):
for
name
in
(
"
omega
"
,
"
vdc
"
,
"
vac
"
):
for
name
in
(
"
omega
"
,
"
vdc
"
,
"
vac
"
):
parameters
.
pop
(
name
,
None
)
parameters
.
pop
(
name
,
None
)
...
...
This diff is collapsed.
Click to expand it.
plot_pyqtgraph.py
+
25
−
1
View file @
2c902753
...
@@ -16,6 +16,7 @@ import pandas as pd
...
@@ -16,6 +16,7 @@ import pandas as pd
from
scipy.optimize
import
curve_fit
from
scipy.optimize
import
curve_fit
import
settings
import
settings
from
data_management
import
DataManager
from
data_management
import
DataManager
from
final_plots
import
photon_assisted_tunneling
#from OpenGL import GL
#from OpenGL import GL
#GL.glEnable(GL.GL_DEPTH_TEST)
#GL.glEnable(GL.GL_DEPTH_TEST)
...
@@ -31,12 +32,15 @@ def full_overview(dm,
...
@@ -31,12 +32,15 @@ def full_overview(dm,
gl_preset
=
"
translucent
"
,
gl_preset
=
"
translucent
"
,
plot_value
=
"
G
"
,
plot_value
=
"
G
"
,
cmap
=
"
viridis
"
,
cmap
=
"
viridis
"
,
show_gpat
=
False
,
**
parameters
):
**
parameters
):
"""
"""
Show all data for conductance.
Show all data for conductance.
"""
"""
if
size
is
None
:
if
size
is
None
:
size
=
0.25
size
=
0.25
if
show_gpat
:
raise
ValueError
assert
plot_value
in
(
"
G
"
,
"
gamma
"
,
"
Iac
"
,
"
Idc
"
)
assert
plot_value
in
(
"
G
"
,
"
gamma
"
,
"
Iac
"
,
"
Idc
"
)
data
=
dm
.
list
(
**
parameters
)
data
=
dm
.
list
(
**
parameters
)
data
.
sort_values
(
"
vac
"
,
inplace
=
True
)
data
.
sort_values
(
"
vac
"
,
inplace
=
True
)
...
@@ -108,6 +112,7 @@ def fixed_parameter(dm,
...
@@ -108,6 +112,7 @@ def fixed_parameter(dm,
plot_value
=
"
dc_conductance
"
,
plot_value
=
"
dc_conductance
"
,
mirror_vdc
=
True
,
mirror_vdc
=
True
,
cmap
=
"
viridis
"
,
cmap
=
"
viridis
"
,
show_gpat
=
False
,
**
parameters
):
**
parameters
):
"""
"""
Show overview of all data where one physical parameter is fixed
Show overview of all data where one physical parameter is fixed
...
@@ -152,6 +157,8 @@ def fixed_parameter(dm,
...
@@ -152,6 +157,8 @@ def fixed_parameter(dm,
if
name
!=
parameter
),
if
name
!=
parameter
),
data
[
plot_value
]
data
[
plot_value
]
]).
T
]).
T
xL
=
parameters
.
get
(
"
xL
"
,
0.5
)
scale
*=
1
/
(
4
*
xL
*
(
1
-
xL
))
if
xyscale
==
"
log
"
:
if
xyscale
==
"
log
"
:
pos
[:,
0
]
=
np
.
log10
(
pos
[:,
0
])
pos
[:,
0
]
=
np
.
log10
(
pos
[:,
0
])
pos
[:,
1
]
=
np
.
log10
(
pos
[:,
1
])
pos
[:,
1
]
=
np
.
log10
(
pos
[:,
1
])
...
@@ -166,6 +173,19 @@ def fixed_parameter(dm,
...
@@ -166,6 +173,19 @@ def fixed_parameter(dm,
sp
=
gl
.
GLScatterPlotItem
(
pos
=
pos
,
size
=
size
,
color
=
cmap
(
color_data
),
pxMode
=
False
)
sp
=
gl
.
GLScatterPlotItem
(
pos
=
pos
,
size
=
size
,
color
=
cmap
(
color_data
),
pxMode
=
False
)
sp
.
setGLOptions
(
gl_preset
)
sp
.
setGLOptions
(
gl_preset
)
w
.
addItem
(
sp
)
w
.
addItem
(
sp
)
if
show_gpat
:
if
plot_value
!=
"
dc_conductance
"
:
raise
NotImplementedError
gpat
=
photon_assisted_tunneling
(
dm
,
data
.
omega
,
data
.
vdc
,
data
.
vac
,
xL
=
xL
)
pos2
=
np
.
empty_like
(
pos
)
pos2
[:,:
2
]
=
pos
[:,:
2
]
pos2
[:,
2
]
=
scale
*
(
np
.
log10
(
gpat
)
if
zscale
==
"
log
"
else
gpat
)
color_data
=
gpat
.
copy
()
color_data
-=
color_data
.
min
()
color_data
/=
color_data
.
max
()
sp
=
gl
.
GLScatterPlotItem
(
pos
=
pos2
,
size
=
size
,
color
=
cmap
(
color_data
),
pxMode
=
False
)
sp
.
setGLOptions
(
gl_preset
)
w
.
addItem
(
sp
)
app
.
exec_
()
app
.
exec_
()
...
@@ -668,6 +688,8 @@ def main(dm, preset=None, **parameters):
...
@@ -668,6 +688,8 @@ def main(dm, preset=None, **parameters):
settings
.
logger
.
warning
(
"
Unknown preset:
"
+
preset
)
settings
.
logger
.
warning
(
"
Unknown preset:
"
+
preset
)
if
"
function
"
in
parameters
:
if
"
function
"
in
parameters
:
function
=
parameters
.
pop
(
"
function
"
)
function
=
parameters
.
pop
(
"
function
"
)
if
function
!=
fixed_parameter
:
parameters
.
pop
(
"
show_gpat
"
,
None
)
function
(
dm
,
**
parameters
)
function
(
dm
,
**
parameters
)
return
return
for
name
in
(
"
vdc
"
,
"
vac
"
,
"
omega
"
):
for
name
in
(
"
vdc
"
,
"
vac
"
,
"
omega
"
):
...
@@ -711,7 +733,7 @@ def parse():
...
@@ -711,7 +733,7 @@ def parse():
help
=
"
Voltage Fourier arguments, units of omega
"
)
help
=
"
Voltage Fourier arguments, units of omega
"
)
parser
.
add_argument
(
"
--d
"
,
metavar
=
"
float
"
,
type
=
float
,
parser
.
add_argument
(
"
--d
"
,
metavar
=
"
float
"
,
type
=
float
,
help
=
"
D (UV cutoff), units of Tkrg
"
)
help
=
"
D (UV cutoff), units of Tkrg
"
)
parser
.
add_argument
(
"
--xL
"
,
metavar
=
"
float
"
,
type
=
float
,
nargs
=
"
+
"
,
default
=
0.5
,
parser
.
add_argument
(
"
--xL
"
,
metavar
=
"
float
"
,
type
=
float
,
default
=
0.5
,
help
=
"
Asymmetry, 0 < xL < 1
"
)
help
=
"
Asymmetry, 0 < xL < 1
"
)
parser
.
add_argument
(
"
--truncation_order
"
,
metavar
=
'
int
'
,
type
=
int
,
choices
=
(
2
,
3
),
parser
.
add_argument
(
"
--truncation_order
"
,
metavar
=
'
int
'
,
type
=
int
,
choices
=
(
2
,
3
),
help
=
"
Truncation order of RG equations.
"
)
help
=
"
Truncation order of RG equations.
"
)
...
@@ -740,6 +762,8 @@ def parse():
...
@@ -740,6 +762,8 @@ def parse():
help
=
"
method for solving frequency integral (-1 for exact solution)
"
)
help
=
"
method for solving frequency integral (-1 for exact solution)
"
)
parser
.
add_argument
(
"
--include_Ga
"
,
metavar
=
"
bool
"
,
type
=
int
,
parser
.
add_argument
(
"
--include_Ga
"
,
metavar
=
"
bool
"
,
type
=
int
,
help
=
"
include Ga in RG equations
"
)
help
=
"
include Ga in RG equations
"
)
parser
.
add_argument
(
"
--show_gpat
"
,
metavar
=
"
int
"
,
type
=
int
,
help
=
"
Show G from photon assisted tunneling (0 or 1)
"
)
args
=
parser
.
parse_args
()
args
=
parser
.
parse_args
()
options
=
args
.
__dict__
options
=
args
.
__dict__
...
...
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