Skip to content
Snippets Groups Projects
Verified Commit 335970cb authored by Valentin Bruch's avatar Valentin Bruch
Browse files

data management: better filtering, error messages

parent 366c37d5
No related branches found
No related tags found
No related merge requests found
...@@ -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
......
...@@ -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":
......
...@@ -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),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment