mirror of
https://github.com/vale981/master-thesis
synced 2025-03-05 10:01:43 -05:00
figsaver is now plot_utils
This commit is contained in:
parent
b1b4005d70
commit
56facd27cd
2 changed files with 38 additions and 40 deletions
|
@ -270,15 +270,15 @@ fs.tex_value(
|
|||
cycles
|
||||
|
||||
ts = np.linspace(0,50,1000)
|
||||
fig, ax = fs.plot_complex(ts, model.bcf(0)(ts))
|
||||
fs.plot_complex(ts, model.thermal_correlations(0)(ts))
|
||||
fig, ax = pu.plot_complex(ts, model.bcf(0)(ts))
|
||||
pu.plot_complex(ts, model.thermal_correlations(0)(ts))
|
||||
|
||||
ts = np.linspace(0,10,1000)
|
||||
proc = model.thermal_process(1)
|
||||
import hops
|
||||
z=hops.core.utility.uni_to_gauss(np.random.rand(proc.get_num_y() * 2))
|
||||
proc.new_process(z)
|
||||
fs.plot_complex(ts, proc(ts) * model.bcf_scales[1])
|
||||
pu.plot_complex(ts, proc(ts) * model.bcf_scales[1])
|
||||
|
||||
G_h = model.thermal_spectral_density(1)
|
||||
G_c = model.spectral_density(0)
|
||||
|
@ -291,17 +291,17 @@ plt.plot(vs, G_h(vs))
|
|||
|
||||
aux.integrate(model, 10000)
|
||||
|
||||
#_, ax = fs.plot_energy_overview(model, markersize=1, ensemble_args=dict(gc_sleep=0.05))
|
||||
#_, ax = pu.plot_energy_overview(model, markersize=1, ensemble_args=dict(gc_sleep=0.05))
|
||||
|
||||
fig, ax = plt.subplots()
|
||||
with aux.get_data(model) as data:
|
||||
fs.plot_with_σ(model.t, model.total_power(data), ax=ax)
|
||||
fs.plot_with_σ(model.t, model.total_energy_from_power(data), ax=ax)
|
||||
pu.plot_with_σ(model.t, model.total_power(data), ax=ax)
|
||||
pu.plot_with_σ(model.t, model.total_energy_from_power(data), ax=ax)
|
||||
|
||||
#ax.legend()
|
||||
|
||||
with aux.get_data(model) as data:
|
||||
fs.plot_with_σ(
|
||||
pu.plot_with_σ(
|
||||
model.t,
|
||||
EnsembleValue(
|
||||
(data.rho_t_accum.mean[:, 0, 0], data.rho_t_accum.ensemble_std[:, 0, 0])
|
||||
|
@ -317,16 +317,16 @@ plt.plot(model.t, ut.smoothen(model.t, ρ_ee, frac=.06, it=0))
|
|||
|
||||
with aux.get_data(model) as data:
|
||||
_, ax = plt.subplots()
|
||||
fs.plot_with_σ(model.t, model.bath_energy(data), bath=0, ax=ax)
|
||||
fs.plot_with_σ(model.t, model.bath_energy(data), bath=1, ax=ax)
|
||||
fs.plot_with_σ(model.t, model.bath_energy(data).sum_baths(), ax=ax)
|
||||
fs.plot_with_σ(model.t, model.total_energy_from_power(data), ax=ax)
|
||||
pu.plot_with_σ(model.t, model.bath_energy(data), bath=0, ax=ax)
|
||||
pu.plot_with_σ(model.t, model.bath_energy(data), bath=1, ax=ax)
|
||||
pu.plot_with_σ(model.t, model.bath_energy(data).sum_baths(), ax=ax)
|
||||
pu.plot_with_σ(model.t, model.total_energy_from_power(data), ax=ax)
|
||||
|
||||
fs.plot_with_σ(model.t, model.total_energy(data), ax=ax)
|
||||
#fs.plot_with_σ(model.t, model.interaction_energy(data).for_bath(1), ax=ax)
|
||||
pu.plot_with_σ(model.t, model.total_energy(data), ax=ax)
|
||||
#pu.plot_with_σ(model.t, model.interaction_energy(data).for_bath(1), ax=ax)
|
||||
|
||||
#fs.plot_with_σ(model.t, model.system_energy(data), ax=ax)
|
||||
#fs.plot_with_σ(model.t, model.system_energy(data) + model.bath_energy(data).sum_baths(), ax=ax)
|
||||
#pu.plot_with_σ(model.t, model.system_energy(data), ax=ax)
|
||||
#pu.plot_with_σ(model.t, model.system_energy(data) + model.bath_energy(data).sum_baths(), ax=ax)
|
||||
#ax.plot(model.t, ut.smoothen(model.t, model.total_energy(data).value, frac=.1))
|
||||
#ax.plot(model.t, np.gradient(model.total_energy(data).value))
|
||||
|
||||
|
@ -343,7 +343,6 @@ with aux.get_data(model) as data:
|
|||
tot_power = (model.total_power(data).sum_baths()) #model.total_energy(data).value
|
||||
|
||||
fig, ax = plt.subplots()
|
||||
fig.set_size_inches(fs.get_figsize("poster", 0.49))
|
||||
|
||||
for t in ts_begin:
|
||||
plt.axvline(t, linestyle="dashed", color="orangered", linewidth=1)
|
||||
|
@ -351,7 +350,7 @@ for t in ts_begin:
|
|||
for t in ts_end:
|
||||
plt.axvline(t, linestyle="dotted", color="lightblue", linewidth=1)
|
||||
|
||||
fs.plot_with_σ(
|
||||
pu.plot_with_σ(
|
||||
model.t[ind_begin[0]:], tot_power.slice(ind_begin[0], None, 1), ax=ax, linewidth=0.5
|
||||
)
|
||||
ax.plot(
|
||||
|
@ -396,15 +395,15 @@ mean_norm.max()
|
|||
|
||||
model, _ = anti_zeno_engine(Δ=5, γ=0.1 / 2, ω_c=1, ω_0=2, ε=1e-1, ε_couple=1 / 3, n=6, cycle_scale=1, switch_cycles=3)
|
||||
|
||||
_, ax = fs.plot_energy_overview(model, markersize=1)
|
||||
_, ax = pu.plot_energy_overview(model, markersize=1)
|
||||
|
||||
model, params = anti_zeno_engine(ω_0=6)
|
||||
|
||||
_, ax = fs.plot_energy_overview(model, markersize=1)
|
||||
_, ax = pu.plot_energy_overview(model, markersize=1)
|
||||
|
||||
model, params = anti_zeno_engine(ω_0=6, ε=1e-1)
|
||||
|
||||
_, ax = fs.plot_energy_overview(model, markersize=1)
|
||||
_, ax = pu.plot_energy_overview(model, markersize=1)
|
||||
|
||||
model, params = anti_zeno_engine(ε=1e-1, ε_couple=1/4)
|
||||
|
||||
|
|
|
@ -372,8 +372,8 @@ Let's test the assumptions of the paper.
|
|||
|
||||
#+begin_src jupyter-python
|
||||
ts = np.linspace(0,50,1000)
|
||||
fig, ax = fs.plot_complex(ts, model.bcf(0)(ts))
|
||||
fs.plot_complex(ts, model.thermal_correlations(0)(ts))
|
||||
fig, ax = pu.plot_complex(ts, model.bcf(0)(ts))
|
||||
pu.plot_complex(ts, model.thermal_correlations(0)(ts))
|
||||
#+end_src
|
||||
|
||||
#+RESULTS:
|
||||
|
@ -389,7 +389,7 @@ Let's test the assumptions of the paper.
|
|||
import hops
|
||||
z=hops.core.utility.uni_to_gauss(np.random.rand(proc.get_num_y() * 2))
|
||||
proc.new_process(z)
|
||||
fs.plot_complex(ts, proc(ts) * model.bcf_scales[1])
|
||||
pu.plot_complex(ts, proc(ts) * model.bcf_scales[1])
|
||||
#+end_src
|
||||
|
||||
#+RESULTS:
|
||||
|
@ -512,12 +512,12 @@ Let's test the assumptions of the paper.
|
|||
|
||||
|
||||
#+Begin_src jupyter-python
|
||||
#_, ax = fs.plot_energy_overview(model, markersize=1, ensemble_args=dict(gc_sleep=0.05))
|
||||
#_, ax = pu.plot_energy_overview(model, markersize=1, ensemble_args=dict(gc_sleep=0.05))
|
||||
|
||||
fig, ax = plt.subplots()
|
||||
with aux.get_data(model) as data:
|
||||
fs.plot_with_σ(model.t, model.total_power(data), ax=ax)
|
||||
fs.plot_with_σ(model.t, model.total_energy_from_power(data), ax=ax)
|
||||
pu.plot_with_σ(model.t, model.total_power(data), ax=ax)
|
||||
pu.plot_with_σ(model.t, model.total_energy_from_power(data), ax=ax)
|
||||
|
||||
#ax.legend()
|
||||
#+end_src
|
||||
|
@ -537,7 +537,7 @@ Let's test the assumptions of the paper.
|
|||
|
||||
#+begin_src jupyter-python
|
||||
with aux.get_data(model) as data:
|
||||
fs.plot_with_σ(
|
||||
pu.plot_with_σ(
|
||||
model.t,
|
||||
EnsembleValue(
|
||||
(data.rho_t_accum.mean[:, 0, 0], data.rho_t_accum.ensemble_std[:, 0, 0])
|
||||
|
@ -573,16 +573,16 @@ We need the time points where we sample the total energy.
|
|||
#+begin_src jupyter-python
|
||||
with aux.get_data(model) as data:
|
||||
_, ax = plt.subplots()
|
||||
fs.plot_with_σ(model.t, model.bath_energy(data), bath=0, ax=ax)
|
||||
fs.plot_with_σ(model.t, model.bath_energy(data), bath=1, ax=ax)
|
||||
fs.plot_with_σ(model.t, model.bath_energy(data).sum_baths(), ax=ax)
|
||||
fs.plot_with_σ(model.t, model.total_energy_from_power(data), ax=ax)
|
||||
pu.plot_with_σ(model.t, model.bath_energy(data), bath=0, ax=ax)
|
||||
pu.plot_with_σ(model.t, model.bath_energy(data), bath=1, ax=ax)
|
||||
pu.plot_with_σ(model.t, model.bath_energy(data).sum_baths(), ax=ax)
|
||||
pu.plot_with_σ(model.t, model.total_energy_from_power(data), ax=ax)
|
||||
|
||||
fs.plot_with_σ(model.t, model.total_energy(data), ax=ax)
|
||||
#fs.plot_with_σ(model.t, model.interaction_energy(data).for_bath(1), ax=ax)
|
||||
pu.plot_with_σ(model.t, model.total_energy(data), ax=ax)
|
||||
#pu.plot_with_σ(model.t, model.interaction_energy(data).for_bath(1), ax=ax)
|
||||
|
||||
#fs.plot_with_σ(model.t, model.system_energy(data), ax=ax)
|
||||
#fs.plot_with_σ(model.t, model.system_energy(data) + model.bath_energy(data).sum_baths(), ax=ax)
|
||||
#pu.plot_with_σ(model.t, model.system_energy(data), ax=ax)
|
||||
#pu.plot_with_σ(model.t, model.system_energy(data) + model.bath_energy(data).sum_baths(), ax=ax)
|
||||
#ax.plot(model.t, ut.smoothen(model.t, model.total_energy(data).value, frac=.1))
|
||||
#ax.plot(model.t, np.gradient(model.total_energy(data).value))
|
||||
#+end_src
|
||||
|
@ -606,7 +606,6 @@ We need the time points where we sample the total energy.
|
|||
|
||||
#+begin_src jupyter-python
|
||||
fig, ax = plt.subplots()
|
||||
fig.set_size_inches(fs.get_figsize("poster", 0.49))
|
||||
|
||||
for t in ts_begin:
|
||||
plt.axvline(t, linestyle="dashed", color="orangered", linewidth=1)
|
||||
|
@ -614,7 +613,7 @@ We need the time points where we sample the total energy.
|
|||
for t in ts_end:
|
||||
plt.axvline(t, linestyle="dotted", color="lightblue", linewidth=1)
|
||||
|
||||
fs.plot_with_σ(
|
||||
pu.plot_with_σ(
|
||||
model.t[ind_begin[0]:], tot_power.slice(ind_begin[0], None, 1), ax=ax, linewidth=0.5
|
||||
)
|
||||
ax.plot(
|
||||
|
@ -690,7 +689,7 @@ We need the time points where we sample the total energy.
|
|||
#+end_src
|
||||
|
||||
#+begin_src jupyter-python
|
||||
_, ax = fs.plot_energy_overview(model, markersize=1)
|
||||
_, ax = pu.plot_energy_overview(model, markersize=1)
|
||||
#+end_src
|
||||
|
||||
#+RESULTS:
|
||||
|
@ -705,7 +704,7 @@ model, params = anti_zeno_engine(ω_0=6)
|
|||
#+end_src
|
||||
|
||||
#+begin_src jupyter-python
|
||||
_, ax = fs.plot_energy_overview(model, markersize=1)
|
||||
_, ax = pu.plot_energy_overview(model, markersize=1)
|
||||
#+end_src
|
||||
|
||||
#+RESULTS:
|
||||
|
@ -720,7 +719,7 @@ _, ax = fs.plot_energy_overview(model, markersize=1)
|
|||
|
||||
|
||||
#+begin_src jupyter-python
|
||||
_, ax = fs.plot_energy_overview(model, markersize=1)
|
||||
_, ax = pu.plot_energy_overview(model, markersize=1)
|
||||
#+end_src
|
||||
|
||||
#+RESULTS:
|
||||
|
|
Loading…
Add table
Reference in a new issue