In [2]:
import os
import sys
import random
import time
from random import seed, randint
import argparse
import platform
from datetime import datetime
import imp
import numpy as np
import fileinput
from itertools import product
import pandas as pd
from scipy.interpolate import griddata
from scipy.interpolate import interp2d
import seaborn as sns
from os import listdir
import matplotlib.pyplot as plt
import seaborn as sns
from scipy.interpolate import griddata
import matplotlib as mpl
sys.path.insert(0,'..')
from notebookFunctions import *
# from .. import notebookFunctions
%matplotlib inline
plt.rcParams['figure.figsize'] = (10,6.180) #golden ratio
# %matplotlib notebook
%load_ext autoreload
%autoreload 2
In [75]:
pre = "/Users/weilu/Research/server/may_2018/02_week"
temp = 370
location = pre + "/second_2/_280-350/2d_z_qw/force_0.05/"
location2 = location + f"perturbation-2-pmf-{temp}.dat"
path, f = shortest_path(location2, start=(1, 5), end=(28,20),save=False, xlabel="z_H6", ylabel="Qw", zmax=25,res=30)
# plt.savefig("/Users/weilu/papers/figures/2d_z6_qw.png", dpi=300)
# plt.savefig("/Users/weilu/papers/figures/shortest_path.png", dpi=300)
location3 = location + f"evpb-{temp}.dat"
(xi,yi,zi) = plot2d(location3, zmax=120)
plt.plot(xi[path[:,1]], yi[path[:,0]], 'r.-')
# plt.savefig("/Users/weilu/papers/figures/2d_expected_dis.png", dpi=300)
plt.figure()
f_on_path = [zi[tuple(p)] for p in reversed(path)]
plt.plot(f_on_path)
# plt.savefig("/Users/weilu/papers/figures/shortest_path_expected_dis.png", dpi=300)
Out[75]:
In [74]:
pre = "/Users/weilu/Research/server/may_2018/02_week"
temp = 370
location = pre + "/second_2/_280-350/2d_z_qw/more_temp_force_0.05/"
location2 = location + f"perturbation-2-pmf-{temp}.dat"
path, f = shortest_path(location2, start=(1, 5), end=(28,20),save=False, xlabel="z_H6", ylabel="Qw", zmax=25,res=30)
# plt.savefig("/Users/weilu/papers/figures/2d_z6_qw.png", dpi=300)
# plt.savefig("/Users/weilu/papers/figures/shortest_path.png", dpi=300)
location3 = location + f"evpb-{temp}.dat"
(xi,yi,zi) = plot2d(location3, zmax=120)
plt.plot(xi[path[:,1]], yi[path[:,0]], 'r.-')
# plt.savefig("/Users/weilu/papers/figures/2d_expected_dis.png", dpi=300)
plt.figure()
f_on_path = [zi[tuple(p)] for p in reversed(path)]
plt.plot(f_on_path)
# plt.savefig("/Users/weilu/papers/figures/shortest_path_expected_dis.png", dpi=300)
Out[74]:
In [62]:
pre = "/Users/weilu/Research/server/may_2018/02_week"
temp = 370
location = pre + "/second_2/_280-350/2d_z_qw/force_0.1/"
location2 = location + f"perturbation-2-pmf-{temp}.dat"
path, f = shortest_path(location2, start=(1, 5), end=(28,20),save=False, xlabel="z_H6", ylabel="Qw", zmax=25,res=30)
# plt.savefig("/Users/weilu/papers/figures/2d_z6_qw.png", dpi=300)
# plt.savefig("/Users/weilu/papers/figures/shortest_path.png", dpi=300)
location3 = location + f"evpb-{temp}.dat"
(xi,yi,zi) = plot2d(location3, zmax=120)
plt.plot(xi[path[:,1]], yi[path[:,0]], 'r.-')
# plt.savefig("/Users/weilu/papers/figures/2d_expected_dis.png", dpi=300)
plt.figure()
f_on_path = [zi[tuple(p)] for p in reversed(path)]
plt.plot(f_on_path)
# plt.savefig("/Users/weilu/papers/figures/shortest_path_expected_dis.png", dpi=300)
Out[62]:
In [73]:
pre = "/Users/weilu/Research/server/may_2018/02_week"
temp = 370
location = pre + "/second_2/_280-350/2d_z_qw/real_force_0.0/"
location2 = location + f"perturbation-1-pmf-{temp}.dat"
path, f = shortest_path(location2, start=(1, 5), end=(28,20),save=False, xlabel="z_H6", ylabel="Qw", zmax=25,res=30)
# plt.savefig("/Users/weilu/papers/figures/2d_z6_qw.png", dpi=300)
# plt.savefig("/Users/weilu/papers/figures/shortest_path.png", dpi=300)
location3 = location + f"evpb-{temp}.dat"
(xi,yi,zi) = plot2d(location3, zmax=120)
plt.plot(xi[path[:,1]], yi[path[:,0]], 'r.-')
# plt.savefig("/Users/weilu/papers/figures/2d_expected_dis.png", dpi=300)
plt.figure()
f_on_path = [zi[tuple(p)] for p in reversed(path)]
plt.plot(f_on_path)
# plt.savefig("/Users/weilu/papers/figures/shortest_path_expected_dis.png", dpi=300)
Out[73]:
In [66]:
pre = "/Users/weilu/Research/server/may_2018/02_week"
temp = 380
location = pre + "/second_2/_280-350/2d_z_qw/real_force_0.0/"
location2 = location + f"perturbation-1-pmf-{temp}.dat"
path, f = shortest_path(location2, start=(1, 5), end=(28,20),save=False, xlabel="z_H6", ylabel="Qw", zmax=25,res=30)
# plt.savefig("/Users/weilu/papers/figures/2d_z6_qw.png", dpi=300)
# plt.savefig("/Users/weilu/papers/figures/shortest_path.png", dpi=300)
location3 = location + f"evpb-{temp}.dat"
(xi,yi,zi) = plot2d(location3, zmax=120)
plt.plot(xi[path[:,1]], yi[path[:,0]], 'r.-')
# plt.savefig("/Users/weilu/papers/figures/2d_expected_dis.png", dpi=300)
plt.figure()
f_on_path = [zi[tuple(p)] for p in reversed(path)]
plt.plot(f_on_path)
# plt.savefig("/Users/weilu/papers/figures/shortest_path_expected_dis.png", dpi=300)
Out[66]:
In [53]:
pre = "/Users/weilu/Research/server/may_2018/02_week"
temp = 380
location = pre + "/second_2/_280-350/2d_z_qw/force_0.05/"
location2 = location + f"perturbation-2-pmf-{temp}.dat"
path, f = shortest_path(location2, start=(1, 10), end=(28,20),save=False, xlabel="z_H6", ylabel="Qw", zmax=25,res=30)
# plt.savefig("/Users/weilu/papers/figures/2d_z6_qw.png", dpi=300)
# plt.savefig("/Users/weilu/papers/figures/shortest_path.png", dpi=300)
location3 = location + f"evpb-{temp}.dat"
(xi,yi,zi) = plot2d(location3, zmax=120)
plt.plot(xi[path[:,1]], yi[path[:,0]], 'r.-')
# plt.savefig("/Users/weilu/papers/figures/2d_expected_dis.png", dpi=300)
plt.figure()
f_on_path = [zi[tuple(p)] for p in reversed(path)]
plt.plot(f_on_path)
# plt.savefig("/Users/weilu/papers/figures/shortest_path_expected_dis.png", dpi=300)
Out[53]:
In [42]:
pre = "/Users/weilu/Research/server/may_2018/02_week"
temp = 380
location = pre + "/second_2/_280-350/2d_z_qw/high_temp_with_perturb_force_0.05/"
location2 = location + f"perturbation-2-pmf-{temp}.dat"
path, f = shortest_path(location2, start=(1, 5), end=(28,20),save=False, xlabel="z_H6", ylabel="Qw", zmax=25,res=30)
# plt.savefig("/Users/weilu/papers/figures/2d_z6_qw.png", dpi=300)
# plt.savefig("/Users/weilu/papers/figures/shortest_path.png", dpi=300)
location3 = location + f"evpb-{temp}.dat"
(xi,yi,zi) = plot2d(location3, zmax=120)
plt.plot(xi[path[:,1]], yi[path[:,0]], 'r.-')
# plt.savefig("/Users/weilu/papers/figures/2d_expected_dis.png", dpi=300)
plt.figure()
f_on_path = [zi[tuple(p)] for p in reversed(path)]
plt.plot(f_on_path)
# plt.savefig("/Users/weilu/papers/figures/shortest_path_expected_dis.png", dpi=300)
Out[42]:
In [36]:
pre = "/Users/weilu/Research/server/may_2018/02_week"
temp = 380
location = pre + "/second_2/_280-350/2d_z_qw/high_temp_with_perturb_force_0.05/"
location2 = location + f"perturbation-1-pmf-{temp}.dat"
path, f = shortest_path(location2, start=(1, 5), end=(28,20),save=False, xlabel="z_H6", ylabel="Qw", zmax=25,res=30)
# plt.savefig("/Users/weilu/papers/figures/2d_z6_qw.png", dpi=300)
# plt.savefig("/Users/weilu/papers/figures/shortest_path.png", dpi=300)
location3 = location + f"evpb-{temp}.dat"
(xi,yi,zi) = plot2d(location3, zmax=120)
plt.plot(xi[path[:,1]], yi[path[:,0]], 'r.-')
# plt.savefig("/Users/weilu/papers/figures/2d_expected_dis.png", dpi=300)
plt.figure()
f_on_path = [zi[tuple(p)] for p in reversed(path)]
plt.plot(f_on_path)
# plt.savefig("/Users/weilu/papers/figures/shortest_path_expected_dis.png", dpi=300)
Out[36]:
In [34]:
pre = "/Users/weilu/Research/server/may_2018/02_week"
temp = 380
location = pre + "/second_2/_280-350/2d_z_qw/high_temp_with_perturb_quicker/"
location2 = location + f"perturbation-2-pmf-{temp}.dat"
path, f = shortest_path(location2, start=(1, 5), end=(28,20),save=False, xlabel="z_H6", ylabel="Qw", zmax=25,res=30)
# plt.savefig("/Users/weilu/papers/figures/2d_z6_qw.png", dpi=300)
# plt.savefig("/Users/weilu/papers/figures/shortest_path.png", dpi=300)
location3 = location + f"evpb-{temp}.dat"
(xi,yi,zi) = plot2d(location3, zmax=120)
plt.plot(xi[path[:,1]], yi[path[:,0]], 'r.-')
# plt.savefig("/Users/weilu/papers/figures/2d_expected_dis.png", dpi=300)
plt.figure()
f_on_path = [zi[tuple(p)] for p in reversed(path)]
plt.plot(f_on_path)
# plt.savefig("/Users/weilu/papers/figures/shortest_path_expected_dis.png", dpi=300)
Out[34]:
In [33]:
pre = "/Users/weilu/Research/server/may_2018/02_week"
temp = 380
location = pre + "/second_2/_280-350/2d_z_qw/high_temp_with_perturb/"
location2 = location + f"perturbation-1-pmf-{temp}.dat"
path, f = shortest_path(location2, start=(1, 5), end=(28,20),save=False, xlabel="z_H6", ylabel="Qw", zmax=25,res=30)
# plt.savefig("/Users/weilu/papers/figures/2d_z6_qw.png", dpi=300)
# plt.savefig("/Users/weilu/papers/figures/shortest_path.png", dpi=300)
location3 = location + f"evpb-{temp}.dat"
(xi,yi,zi) = plot2d(location3, zmax=120)
plt.plot(xi[path[:,1]], yi[path[:,0]], 'r.-')
# plt.savefig("/Users/weilu/papers/figures/2d_expected_dis.png", dpi=300)
plt.figure()
f_on_path = [zi[tuple(p)] for p in reversed(path)]
plt.plot(f_on_path)
# plt.savefig("/Users/weilu/papers/figures/shortest_path_expected_dis.png", dpi=300)
Out[33]:
In [18]:
pre = "/Users/weilu/Research/server/may_2018/02_week"
temp = 380
location = pre + "/second_2/_280-350/2d_z_qw/high_temp_with_perturb/"
location2 = location + f"pmf-{temp}.dat"
path, f = shortest_path(location2, start=(1, 5), end=(28,20),save=False, xlabel="z_H6", ylabel="Qw", zmax=25,res=30)
# plt.savefig("/Users/weilu/papers/figures/2d_z6_qw.png", dpi=300)
# plt.savefig("/Users/weilu/papers/figures/shortest_path.png", dpi=300)
location3 = location + f"evpb-{temp}.dat"
(xi,yi,zi) = plot2d(location3, zmax=120)
plt.plot(xi[path[:,1]], yi[path[:,0]], 'r.-')
# plt.savefig("/Users/weilu/papers/figures/2d_expected_dis.png", dpi=300)
plt.figure()
f_on_path = [zi[tuple(p)] for p in reversed(path)]
plt.plot(f_on_path)
# plt.savefig("/Users/weilu/papers/figures/shortest_path_expected_dis.png", dpi=300)
Out[18]:
In [14]:
data.columns
Out[14]:
In [12]:
rerun7 = pd.read_feather("/Users/weilu/Research/server/may_2018/second/rerun_7_17_May_211310.feather")
rerun6 = pd.read_feather("/Users/weilu/Research/server/may_2018/second/rerun_6_17_May_211310.feather")
data = pd.concat([rerun6, rerun7])
dic = {"T0":300, "T1":335, "T2":373, "T3":417, "T4":465, "T5":519, "T6":579, "T7":645, "T8":720, "T9":803, "T10":896, "T11":1000}
data["TempT"] = data["Temp"].apply(lambda x: dic[x])
chosen = data.query("TempT < 400")
chosen.reset_index().to_feather("/Users/weilu/Research/server/may_2018/02_week/all_data_folder/second_may17.feather")
In [3]:
data = pd.read_feather("/Users/weilu/Research/server/may_2018/second/rerun_7_17_May_211310.feather")
dic = {"T0":300, "T1":335, "T2":373, "T3":417, "T4":465, "T5":519, "T6":579, "T7":645, "T8":720, "T9":803, "T10":896, "T11":1000}
a = data
a["Temp"] = a["Temp"].apply(lambda x: dic[x])
rerun7 = data
t = a.query("Temp < 400").groupby(["BiasTo","Temp"])[["DisReal","Run"]].mean().reset_index()
t["Diff"] = t["DisReal"]-t["BiasTo"].apply(pd.to_numeric)
t["BiasTo"] = t["BiasTo"].apply(pd.to_numeric)
fg = sns.FacetGrid(data=t, hue='Temp', size=8, aspect=1.61)
fg.map(plt.scatter, 'BiasTo', 'Diff').add_legend()
Out[3]:
In [5]:
data.query("Temp == 335").plot.hexbin("z_h6", "Qw", cmap="seismic", sharex=False)
Out[5]:
In [7]:
data.columns
Out[7]:
In [10]:
data.query("Temp == 373 and z_h6 < -10").plot.hexbin("AMH_3H", "Qw", cmap="seismic", sharex=False)
Out[10]:
In [9]:
data.query("Temp == 335").plot.hexbin("AMH_3H", "Qw", cmap="seismic", sharex=False)
Out[9]:
In [8]:
data.query("Temp == 335 and z_h6 < -10").plot.hexbin("AMH_3H", "Qw", cmap="seismic", sharex=False)
Out[8]:
In [169]:
pre = "/Users/weilu/Research/server/may_2018/02_week"
temp = 330
location = pre + "/second/_280-350/2d_z_qw/middle_temp/"
location2 = location + f"pmf-{temp}.dat"
path, f = shortest_path(location2, start=(1, 5), end=(28,20),save=False, xlabel="z_H6", ylabel="Qw", zmax=25,res=30)
# plt.savefig("/Users/weilu/papers/figures/2d_z6_qw.png", dpi=300)
# plt.savefig("/Users/weilu/papers/figures/shortest_path.png", dpi=300)
location3 = location + f"evpb-{temp}.dat"
(xi,yi,zi) = plot2d(location3, zmax=120)
plt.plot(xi[path[:,1]], yi[path[:,0]], 'r.-')
# plt.savefig("/Users/weilu/papers/figures/2d_expected_dis.png", dpi=300)
plt.figure()
f_on_path = [zi[tuple(p)] for p in reversed(path)]
plt.plot(f_on_path)
# plt.savefig("/Users/weilu/papers/figures/shortest_path_expected_dis.png", dpi=300)
Out[169]:
In [171]:
pre = "/Users/weilu/Research/server/may_2018/02_week"
temp = 360
location = pre + "/second/_280-350/2d_z_qw/high_temp_force_0.05/"
location2 = location + f"pmf-{temp}.dat"
path, f = shortest_path(location2, start=(1, 5), end=(28,20),save=False, xlabel="z_H6", ylabel="Qw", zmax=25,res=30)
# plt.savefig("/Users/weilu/papers/figures/2d_z6_qw.png", dpi=300)
# plt.savefig("/Users/weilu/papers/figures/shortest_path.png", dpi=300)
location3 = location + f"evpb-{temp}.dat"
(xi,yi,zi) = plot2d(location3, zmax=120)
plt.plot(xi[path[:,1]], yi[path[:,0]], 'r.-')
# plt.savefig("/Users/weilu/papers/figures/2d_expected_dis.png", dpi=300)
plt.figure()
f_on_path = [zi[tuple(p)] for p in reversed(path)]
plt.plot(f_on_path)
# plt.savefig("/Users/weilu/papers/figures/shortest_path_expected_dis.png", dpi=300)
Out[171]:
In [140]:
pre = "/Users/weilu/Research/server/may_2018/02_week"
temp = 360
location = pre + "/second/_280-350/2d_z_qw/high_temp_force_0.1/"
location2 = location + f"pmf-{temp}.dat"
path, f = shortest_path(location2, start=(1, 5), end=(28,20),save=False, xlabel="z_H6", ylabel="Qw", zmax=25,res=30)
# plt.savefig("/Users/weilu/papers/figures/2d_z6_qw.png", dpi=300)
# plt.savefig("/Users/weilu/papers/figures/shortest_path.png", dpi=300)
location3 = location + f"evpb-{temp}.dat"
(xi,yi,zi) = plot2d(location3, zmax=120)
plt.plot(xi[path[:,1]], yi[path[:,0]], 'r.-')
# plt.savefig("/Users/weilu/papers/figures/2d_expected_dis.png", dpi=300)
plt.figure()
f_on_path = [zi[tuple(p)] for p in reversed(path)]
plt.plot(f_on_path)
# plt.savefig("/Users/weilu/papers/figures/shortest_path_expected_dis.png", dpi=300)
Out[140]:
In [197]:
pre = "/Users/weilu/Research/server/may_2018/02_week"
temp = 370
location = pre + "/second/_280-350/2d_z_qw/high_temp/"
location2 = location + f"pmf-{temp}.dat"
path, f = shortest_path(location2, start=(1, 10), end=(28,20),block=[-15,-10,0.1,0.3],save=False, xlabel="z_H6", ylabel="Qw", zmax=25,res=30)
# plt.savefig("/Users/weilu/papers/figures/2d_z6_qw.png", dpi=300)
# plt.savefig("/Users/weilu/papers/figures/shortest_path.png", dpi=300)
location3 = location + f"evpb-{temp}.dat"
(xi,yi,zi) = plot2d(location3, zmax=120)
plt.plot(xi[path[:,1]], yi[path[:,0]], 'r.-')
# plt.savefig("/Users/weilu/papers/figures/2d_expected_dis.png", dpi=300)
plt.figure()
f_on_path = [zi[tuple(p)] for p in reversed(path)]
plt.plot(f_on_path)
# plt.savefig("/Users/weilu/papers/figures/shortest_path_expected_dis.png", dpi=300)
Out[197]:
In [195]:
pre = "/Users/weilu/Research/server/may_2018/02_week"
temp = 380
location = pre + "/second/_280-350/2d_z_qw/high_temp/"
location2 = location + f"perturbation-2-pmf-{temp}.dat"
path, f = shortest_path(location2, start=(1, 5), end=(28,20),save=False, xlabel="z_H6", ylabel="Qw", zmax=25,res=30)
# plt.savefig("/Users/weilu/papers/figures/2d_z6_qw.png", dpi=300)
# plt.savefig("/Users/weilu/papers/figures/shortest_path.png", dpi=300)
location3 = location + f"evpb-{temp}.dat"
(xi,yi,zi) = plot2d(location3, zmax=120)
plt.plot(xi[path[:,1]], yi[path[:,0]], 'r.-')
# plt.savefig("/Users/weilu/papers/figures/2d_expected_dis.png", dpi=300)
plt.figure()
f_on_path = [zi[tuple(p)] for p in reversed(path)]
plt.plot(f_on_path)
# plt.savefig("/Users/weilu/papers/figures/shortest_path_expected_dis.png", dpi=300)
Out[195]:
In [118]:
pre = "/Users/weilu/Research/server/may_2018/02_week"
temp = 300
location = pre + "/second/_280-350/2d_z_qw/perturb/"
location2 = location + f"perturbation-1-pmf-{temp}.dat"
path, f = shortest_path(location2, start=(10, 5), end=(28,20),save=False, xlabel="z_H6", ylabel="Qw", zmax=25,res=30)
# plt.savefig("/Users/weilu/papers/figures/2d_z6_qw.png", dpi=300)
# plt.savefig("/Users/weilu/papers/figures/shortest_path.png", dpi=300)
location3 = location + f"evpb-{temp}.dat"
(xi,yi,zi) = plot2d(location3, zmax=120)
plt.plot(xi[path[:,1]], yi[path[:,0]], 'r.-')
# plt.savefig("/Users/weilu/papers/figures/2d_expected_dis.png", dpi=300)
plt.figure()
f_on_path = [zi[tuple(p)] for p in reversed(path)]
plt.plot(f_on_path)
# plt.savefig("/Users/weilu/papers/figures/shortest_path_expected_dis.png", dpi=300)
Out[118]:
In [107]:
pre = "/Users/weilu/Research/server/may_2018/02_week"
temp = 300
location = pre + "/second/_280-350/2d_z_qw/perturb/"
location2 = location + f"pmf-{temp}.dat"
path, f = shortest_path(location2, start=(13, 5), end=(28,20),save=False, xlabel="z_H6", ylabel="Qw", zmax=25,res=30)
# plt.savefig("/Users/weilu/papers/figures/2d_z6_qw.png", dpi=300)
# plt.savefig("/Users/weilu/papers/figures/shortest_path.png", dpi=300)
location3 = location + f"evpb-{temp}.dat"
(xi,yi,zi) = plot2d(location3, zmax=120)
plt.plot(xi[path[:,1]], yi[path[:,0]], 'r.-')
# plt.savefig("/Users/weilu/papers/figures/2d_expected_dis.png", dpi=300)
plt.figure()
f_on_path = [zi[tuple(p)] for p in reversed(path)]
plt.plot(f_on_path)
# plt.savefig("/Users/weilu/papers/figures/shortest_path_expected_dis.png", dpi=300)
Out[107]:
In [81]:
pre = "/Users/weilu/Research/server/may_2018/02_week"
temp = 300
location = pre + "/second/_280-350/2d_z_qw/quick/"
location2 = location + f"pmf-{temp}.dat"
path, f = shortest_path(location2, start=(13, 5), end=(28,20),save=False, xlabel="z_H6", ylabel="Qw", zmax=25,res=30)
# plt.savefig("/Users/weilu/papers/figures/2d_z6_qw.png", dpi=300)
# plt.savefig("/Users/weilu/papers/figures/shortest_path.png", dpi=300)
location3 = location + f"evpb-{temp}.dat"
(xi,yi,zi) = plot2d(location3, zmax=120)
plt.plot(xi[path[:,1]], yi[path[:,0]], 'r.-')
# plt.savefig("/Users/weilu/papers/figures/2d_expected_dis.png", dpi=300)
plt.figure()
f_on_path = [zi[tuple(p)] for p in reversed(path)]
plt.plot(f_on_path)
# plt.savefig("/Users/weilu/papers/figures/shortest_path_expected_dis.png", dpi=300)
Out[81]:
In [86]:
pre = "/Users/weilu/Research/server/may_2018/02_week"
temp = 280
location = pre + "/second/_280-350/2d_z_qw/quick/"
location2 = location + f"pmf-{temp}.dat"
path, f = shortest_path(location2, start=(13, 5), end=(28,20),save=False, xlabel="z_H6", ylabel="Qw", zmax=25,res=30)
# plt.savefig("/Users/weilu/papers/figures/2d_z6_qw.png", dpi=300)
# plt.savefig("/Users/weilu/papers/figures/shortest_path.png", dpi=300)
location3 = location + f"evpb-{temp}.dat"
(xi,yi,zi) = plot2d(location3, zmax=120)
plt.plot(xi[path[:,1]], yi[path[:,0]], 'r.-')
# plt.savefig("/Users/weilu/papers/figures/2d_expected_dis.png", dpi=300)
plt.figure()
f_on_path = [zi[tuple(p)] for p in reversed(path)]
plt.plot(f_on_path)
# plt.savefig("/Users/weilu/papers/figures/shortest_path_expected_dis.png", dpi=300)
Out[86]:
In [85]:
pre = "/Users/weilu/Research/server/may_2018/02_week"
temp = 280
location = pre + "/second/_280-350/2d_z_qw/zero_energy/"
location2 = location + f"pmf-{temp}.dat"
path, f = shortest_path(location2, start=(1, 10), end=(28,20),save=False, xlabel="z_H6", ylabel="Qw", zmax=25,res=30)
# plt.savefig("/Users/weilu/papers/figures/2d_z6_qw.png", dpi=300)
# plt.savefig("/Users/weilu/papers/figures/shortest_path.png", dpi=300)
location3 = location + f"evpb-{temp}.dat"
(xi,yi,zi) = plot2d(location3, zmax=120)
plt.plot(xi[path[:,1]], yi[path[:,0]], 'r.-')
# plt.savefig("/Users/weilu/papers/figures/2d_expected_dis.png", dpi=300)
plt.figure()
f_on_path = [zi[tuple(p)] for p in reversed(path)]
plt.plot(f_on_path)
# plt.savefig("/Users/weilu/papers/figures/shortest_path_expected_dis.png", dpi=300)
Out[85]:
In [84]:
pre = "/Users/weilu/Research/server/may_2018/02_week"
temp = 300
location = pre + "/second/_280-350/2d_z_qw/zero_energy/"
location2 = location + f"pmf-{temp}.dat"
path, f = shortest_path(location2, start=(1, 10), end=(28,20),save=False, xlabel="z_H6", ylabel="Qw", zmax=25,res=30)
# plt.savefig("/Users/weilu/papers/figures/2d_z6_qw.png", dpi=300)
# plt.savefig("/Users/weilu/papers/figures/shortest_path.png", dpi=300)
location3 = location + f"evpb-{temp}.dat"
(xi,yi,zi) = plot2d(location3, zmax=120)
plt.plot(xi[path[:,1]], yi[path[:,0]], 'r.-')
# plt.savefig("/Users/weilu/papers/figures/2d_expected_dis.png", dpi=300)
plt.figure()
f_on_path = [zi[tuple(p)] for p in reversed(path)]
plt.plot(f_on_path)
# plt.savefig("/Users/weilu/papers/figures/shortest_path_expected_dis.png", dpi=300)
Out[84]:
In [95]:
pre = "/Users/weilu/Research/server/may_2018/02_week"
temp = 270
location = pre + "/second/_280-350/2d_z_qw/amh_energy/"
location2 = location + f"pmf-{temp}.dat"
path, f = shortest_path(location2, start=(10, 5), end=(28,20),save=False, xlabel="z_H6", ylabel="Qw", zmax=25,res=30)
# plt.savefig("/Users/weilu/papers/figures/2d_z6_qw.png", dpi=300)
# plt.savefig("/Users/weilu/papers/figures/shortest_path.png", dpi=300)
location3 = location + f"evpb-{temp}.dat"
(xi,yi,zi) = plot2d(location3, zmax=120)
plt.plot(xi[path[:,1]], yi[path[:,0]], 'r.-')
# plt.savefig("/Users/weilu/papers/figures/2d_expected_dis.png", dpi=300)
plt.figure()
f_on_path = [zi[tuple(p)] for p in reversed(path)]
plt.plot(f_on_path)
# plt.savefig("/Users/weilu/papers/figures/shortest_path_expected_dis.png", dpi=300)
Out[95]:
In [58]:
pre = "/Users/weilu/Research/server/may_2018/02_week"
temp = 290
location = pre + "/second/_280-350/2d_z_qw/amh_energy_x10/"
location2 = location + f"pmf-{temp}.dat"
path, f = shortest_path(location2, start=(1, 10), end=(28,20),save=False, xlabel="z_H6", ylabel="Qw", zmax=25,res=30)
# plt.savefig("/Users/weilu/papers/figures/2d_z6_qw.png", dpi=300)
# plt.savefig("/Users/weilu/papers/figures/shortest_path.png", dpi=300)
location3 = location + f"evpb-{temp}.dat"
(xi,yi,zi) = plot2d(location3, zmax=120)
plt.plot(xi[path[:,1]], yi[path[:,0]], 'r.-')
# plt.savefig("/Users/weilu/papers/figures/2d_expected_dis.png", dpi=300)
plt.figure()
f_on_path = [zi[tuple(p)] for p in reversed(path)]
plt.plot(f_on_path)
# plt.savefig("/Users/weilu/papers/figures/shortest_path_expected_dis.png", dpi=300)
Out[58]:
In [14]:
pre = "/Users/weilu/Research/server/may_2018/02_week"
temp = 310
location = pre + "/second/_280-350/2d_z_qw/force_0.13/"
location2 = location + f"pmf-{temp}.dat"
path, f = shortest_path(location2, start=(1, 10), end=(28,20),save=False, xlabel="z_H6", ylabel="Qw", zmax=25,res=30)
# plt.savefig("/Users/weilu/papers/figures/2d_z6_qw.png", dpi=300)
# plt.savefig("/Users/weilu/papers/figures/shortest_path.png", dpi=300)
location3 = location + f"evpb-{temp}.dat"
(xi,yi,zi) = plot2d(location3, zmax=120)
plt.plot(xi[path[:,1]], yi[path[:,0]], 'r.-')
# plt.savefig("/Users/weilu/papers/figures/2d_expected_dis.png", dpi=300)
plt.figure()
f_on_path = [zi[tuple(p)] for p in reversed(path)]
plt.plot(f_on_path)
# plt.savefig("/Users/weilu/papers/figures/shortest_path_expected_dis.png", dpi=300)
Out[14]:
In [83]:
pre = "/Users/weilu/Research/server/may_2018/02_week"
temp = 310
location = pre + "/second/_280-350/2d_z_qw/force_0.15/"
location2 = location + f"pmf-{temp}.dat"
path, f = shortest_path(location2, start=(1, 5), end=(28,20),save=False, xlabel="z_H6", ylabel="Qw", zmax=20,res=30)
# plt.savefig("/Users/weilu/papers/figures/2d_z6_qw.png", dpi=300)
# plt.savefig("/Users/weilu/papers/figures/shortest_path.png", dpi=300)
location3 = location + f"evpb-{temp}.dat"
(xi,yi,zi) = plot2d(location3, zmax=120)
plt.plot(xi[path[:,1]], yi[path[:,0]], 'r.-')
# plt.savefig("/Users/weilu/papers/figures/2d_expected_dis.png", dpi=300)
plt.figure()
f_on_path = [zi[tuple(p)] for p in reversed(path)]
plt.plot(f_on_path)
# plt.savefig("/Users/weilu/papers/figures/shortest_path_expected_dis.png", dpi=300)
Out[83]:
In [104]:
pre = "/Users/weilu/Research/server/may_2018/02_week"
temp = 320
location = pre + "/second/_280-350/2d_z_qw/force_0.13/"
location2 = location + f"pmf-{temp}.dat"
path, f = shortest_path(location2, start=(1, 5), end=(28,20),save=False, xlabel="z_H6", ylabel="Qw", zmax=25,res=30)
# plt.savefig("/Users/weilu/papers/figures/2d_z6_qw.png", dpi=300)
# plt.savefig("/Users/weilu/papers/figures/shortest_path.png", dpi=300)
location3 = location + f"evpb-{temp}.dat"
(xi,yi,zi) = plot2d(location3, zmax=120)
plt.plot(xi[path[:,1]], yi[path[:,0]], 'r.-')
# plt.savefig("/Users/weilu/papers/figures/2d_expected_dis.png", dpi=300)
plt.figure()
f_on_path = [zi[tuple(p)] for p in reversed(path)]
plt.plot(f_on_path)
# plt.savefig("/Users/weilu/papers/figures/shortest_path_expected_dis.png", dpi=300)
Out[104]:
In [ ]:
### pre = "/Users/weilu/Research/server/may_2018/02_week"
temp = 300
location = pre + "/second/_280-350/2d_z_qw/force_0.15/"
location2 = location + f"pmf-{temp}.dat"
path, f = shortest_path(location2, start=(1, 5), end=(28,20),save=False, xlabel="z_H6", ylabel="Qw", zmax=25,res=30)
# plt.savefig("/Users/weilu/papers/figures/2d_z6_qw.png", dpi=300)
# plt.savefig("/Users/weilu/papers/figures/shortest_path.png", dpi=300)
location3 = location + f"evpb-{temp}.dat"
(xi,yi,zi) = plot2d(location3, zmax=120)
plt.plot(xi[path[:,1]], yi[path[:,0]], 'r.-')
# plt.savefig("/Users/weilu/papers/figures/2d_expected_dis.png", dpi=300)
plt.figure()
f_on_path = [zi[tuple(p)] for p in reversed(path)]
plt.plot(f_on_path)
# plt.savefig("/Users/weilu/papers/figures/shortest_path_expected_dis.png", dpi=300)
In [74]:
pre = "/Users/weilu/Research/server/may_2018/02_week"
temp = 300
location = pre + "/second/_280-350/2d_z_qw/force_0.15/"
location2 = location + f"pmf-{temp}.dat"
path, f = shortest_path(location2, start=(1, 5), end=(28,20),block=[-15,-10,0.3,0.5],save=False, xlabel="z_H6", ylabel="Qw", zmax=25,res=30)
# plt.savefig("/Users/weilu/papers/figures/2d_z6_qw.png", dpi=300)
# plt.savefig("/Users/weilu/papers/figures/shortest_path.png", dpi=300)
location3 = location + f"evpb-{temp}.dat"
(xi,yi,zi) = plot2d(location3, zmax=120)
plt.plot(xi[path[:,1]], yi[path[:,0]], 'r.-')
# plt.savefig("/Users/weilu/papers/figures/2d_expected_dis.png", dpi=300)
plt.figure()
f_on_path = [zi[tuple(p)] for p in reversed(path)]
plt.plot(f_on_path)
# plt.savefig("/Users/weilu/papers/figures/shortest_path_expected_dis.png", dpi=300)
Out[74]:
In [106]:
pre = "/Users/weilu/Research/server/may_2018/02_week"
temp = 270
location = pre + "/second/_280-350/2d_z_qw/perturb/"
location2 = location + f"perturbation-1-pmf-{temp}.dat"
path, f = shortest_path(location2, start=(1, 5), end=(25,25),save=False, xlabel="z_H6", ylabel="Qw", zmax=25,res=30)
# plt.savefig("/Users/weilu/papers/figures/2d_z6_qw.png", dpi=300)
# plt.savefig("/Users/weilu/papers/figures/shortest_path.png", dpi=300)
location3 = location + f"evpb-{temp}.dat"
(xi,yi,zi) = plot2d(location3, zmax=120)
plt.plot(xi[path[:,1]], yi[path[:,0]], 'r.-')
# plt.savefig("/Users/weilu/papers/figures/2d_expected_dis.png", dpi=300)
plt.figure()
f_on_path = [zi[tuple(p)] for p in reversed(path)]
plt.plot(f_on_path)
# plt.savefig("/Users/weilu/papers/figures/shortest_path_expected_dis.png", dpi=300)
Out[106]:
In [105]:
pre = "/Users/weilu/Research/server/may_2018/02_week"
temp = 270
location = pre + "/second/_280-350/2d_z_qw/perturb/"
location2 = location + f"pmf-{temp}.dat"
path, f = shortest_path(location2, start=(1, 5), end=(25,25),save=False, xlabel="z_H6", ylabel="Qw", zmax=25,res=30)
# plt.savefig("/Users/weilu/papers/figures/2d_z6_qw.png", dpi=300)
# plt.savefig("/Users/weilu/papers/figures/shortest_path.png", dpi=300)
location3 = location + f"evpb-{temp}.dat"
(xi,yi,zi) = plot2d(location3, zmax=120)
plt.plot(xi[path[:,1]], yi[path[:,0]], 'r.-')
# plt.savefig("/Users/weilu/papers/figures/2d_expected_dis.png", dpi=300)
plt.figure()
f_on_path = [zi[tuple(p)] for p in reversed(path)]
plt.plot(f_on_path)
# plt.savefig("/Users/weilu/papers/figures/shortest_path_expected_dis.png", dpi=300)
Out[105]:
In [92]:
pre = "/Users/weilu/Research/server/may_2018/02_week"
temp = 300
location = pre + "/second/_280-350/2d_z_qw/remove_test2/"
location2 = location + f"pmf-{temp}.dat"
path, f = shortest_path(location2, start=(1, 5), end=(25,25),save=False, xlabel="z_H6", ylabel="Qw", zmax=25,res=30)
# plt.savefig("/Users/weilu/papers/figures/2d_z6_qw.png", dpi=300)
# plt.savefig("/Users/weilu/papers/figures/shortest_path.png", dpi=300)
location3 = location + f"evpb-{temp}.dat"
(xi,yi,zi) = plot2d(location3, zmax=120)
plt.plot(xi[path[:,1]], yi[path[:,0]], 'r.-')
# plt.savefig("/Users/weilu/papers/figures/2d_expected_dis.png", dpi=300)
plt.figure()
f_on_path = [zi[tuple(p)] for p in reversed(path)]
plt.plot(f_on_path)
# plt.savefig("/Users/weilu/papers/figures/shortest_path_expected_dis.png", dpi=300)
Out[92]:
In [80]:
pre = "/Users/weilu/Research/server/may_2018/02_week"
temp = 300
location = pre + "/second/_280-350/2d_z_qw/remove_test/"
location2 = location + f"pmf-{temp}.dat"
path, f = shortest_path(location2, start=(1, 5), end=(25,25),save=False, xlabel="z_H6", ylabel="Qw", zmax=25,res=30)
# plt.savefig("/Users/weilu/papers/figures/2d_z6_qw.png", dpi=300)
# plt.savefig("/Users/weilu/papers/figures/shortest_path.png", dpi=300)
location3 = location + f"evpb-{temp}.dat"
(xi,yi,zi) = plot2d(location3, zmax=120)
plt.plot(xi[path[:,1]], yi[path[:,0]], 'r.-')
# plt.savefig("/Users/weilu/papers/figures/2d_expected_dis.png", dpi=300)
plt.figure()
f_on_path = [zi[tuple(p)] for p in reversed(path)]
plt.plot(f_on_path)
# plt.savefig("/Users/weilu/papers/figures/shortest_path_expected_dis.png", dpi=300)
Out[80]:
In [165]:
pre = "/Users/weilu/Research/server/may_2018/02_week"
temp = 380
location = pre + "/second/_280-350/2d_z_qw/distance_high_temp/"
location2 = location + f"pmf-{temp}.dat"
path, f = shortest_path(location2, start=(1, 5), end=(28,20),save=False, xlabel="z_H6", ylabel="Qw", zmax=25,res=30)
# plt.savefig("/Users/weilu/papers/figures/2d_z6_qw.png", dpi=300)
# plt.savefig("/Users/weilu/papers/figures/shortest_path.png", dpi=300)
location3 = location + f"evpb-{temp}.dat"
(xi,yi,zi) = plot2d(location3, zmax=120)
plt.plot(xi[path[:,1]], yi[path[:,0]], 'r.-')
# plt.savefig("/Users/weilu/papers/figures/2d_expected_dis.png", dpi=300)
plt.figure()
f_on_path = [zi[tuple(p)] for p in reversed(path)]
plt.plot(f_on_path)
# plt.savefig("/Users/weilu/papers/figures/shortest_path_expected_dis.png", dpi=300)
In [ ]: