In [440]:
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 scipy
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 [2]:
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[2]:
In [317]:
pre = "/Users/weilu/Research/server/may_2018/03_week"
temp = 370
location = pre + "/second_start_extended_combined/_280-350/2d_z_qw/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=30,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[317]:
In [318]:
pre = "/Users/weilu/Research/server/may_2018/03_week"
temp = 370
location = pre + "/second_start_extended_combined/_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[318]:
In [41]:
pre = "/Users/weilu/Research/server/may_2018/03_week"
temp = 380
location = pre + "/second_start_extended_combined/_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[41]:
In [42]:
pre = "/Users/weilu/Research/server/may_2018/03_week"
temp = 380
location = pre + "/second_start_extended_combined/_280-350/2d_z_qw/without_subsample/"
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 [305]:
pre = "/Users/weilu/Research/server/may_2018/03_week"
temp = 370
location = pre + "/second_start_extended_combined/_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[305]:
In [149]:
pre = "/Users/weilu/Research/server/may_2018/03_week"
temp = 390
location = pre + "/second_start_extended_combined_2/_280-350/2d_zAverage_dis/force_0.1/"
location2 = location + f"perturbation-2-pmf-{temp}.dat"
path, f = shortest_path(location2, start=(10, 25), end=(17,1),save=False, xlabel="Distance", ylabel="AverageZ", 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 [141]:
pre = "/Users/weilu/Research/server/may_2018/03_week"
temp = 380
location = pre + "/second_start_extended_combined_2/_280-350/2d_zAverage_dis/force_0.1/"
location2 = location + f"perturbation-7-pmf-{temp}.dat"
path, f = shortest_path(location2, start=(10, 25), end=(17,1),save=False, xlabel="Distance", ylabel="AverageZ", 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 [139]:
pre = "/Users/weilu/Research/server/may_2018/03_week"
temp = 380
location = pre + "/second_start_extended_combined_2/_280-350/2d_zAverage_dis/force_0.1/"
location2 = location + f"perturbation-2-pmf-{temp}.dat"
path, f = shortest_path(location2, start=(10, 23), end=(17,1),save=False, xlabel="Distance", ylabel="AverageZ", 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 [ ]:
In [ ]:
In [ ]:
In [ ]:
In [421]:
pre = "/Users/weilu/Research/server/may_2018/03_week"
temp = 370
location = pre + "/second_start_extended_combined_2/_280-350/2d_zAverage_dis/more_bins/"
location2 = location + f"perturbation-2-pmf-{temp}.dat"
zmax=25
res=40
path_origin, f_origin = shortest_path_2(location2, start=(18, 30), end=(29,1),save=False, xlabel="Distance", ylabel="AverageZ", zmax=zmax,res=res)
# print(getBound(location2, res=res, zmax=zmax))
xmin,xmax,ymin,ymax = getBound(location2, res=res, zmax=zmax)
In [420]:
pre = "/Users/weilu/Research/server/may_2018/03_week"
temp = 370
location = pre + "/second_start_extended_combined_2/_280-350/2d_zAverage_dis/more_bins/"
location2 = location + f"perturbation-2-pmf-{temp}.dat"
zmax=25
res=40
path_origin, f_origin = shortest_path_2(location2, start=(18, 30), end=(29,1),save=False, xlabel="Distance", ylabel="AverageZ", zmax=zmax,res=res)
# print(getBound(location2, res=res, zmax=zmax))
xmin,xmax,ymin,ymax = getBound(location2, res=res, zmax=zmax)
In [433]:
pre = "/Users/weilu/Research/server/may_2018/03_week"
temp = 370
location = pre + "/second_start_extended_combined_2/_280-350/2d_zAverage_dis/more_bins/"
location2 = location + f"perturbation-2-pmf-{temp}.dat"
zmax=25
res=40
path_origin, f_origin = shortest_path_2(location2, start=(18, 30), end=(29,1),save=False, xlabel="Distance", ylabel="AverageZ", zmax=zmax,res=res)
# print(getBound(location2, res=res, zmax=zmax))
xmin,xmax,ymin,ymax = getBound(location2, res=res, zmax=zmax)
In [434]:
perturbation_table = {3:"Decrease Go",
4:"Increase Go",
5:"Decrease Lipid",
6:"Increase Lipid",
7:"Decrease Membrane",
8:"Increase Membrane",
9:"Decrease Rg",
10:"Increase Rg"}
all_path = {}
all_f = {}
all_location = {}
In [435]:
for i in perturbation_table:
# print(i,perturbation_table[i])
location_i = location + f"perturbation-{i}-pmf-{temp}.dat"
path, f = plot_shortest_path(location_i, path, save=False,
xlabel="Distance", ylabel="AverageZ", zmax=zmax,res=res,
xmin=xmin,xmax=xmax,ymin=ymin,ymax=ymax, plot2d=False)
all_path[i] = path
all_f[i] = f
all_location[i] = location_i
In [445]:
i = 3
j = 4
title = "Go"
plot2d_side_by_side(all_location[i], all_location[j], title1=perturbation_table[i], title2=perturbation_table[j])
plt.savefig(f"/Users/weilu/Dropbox/GlpG_paper_2018/figures/{title}_compare.png", dpi=300)
plt.figure()
x = np.arange(len(f_origin))
x_smooth = np.linspace(x.min(), x.max(), 200)
spl = scipy.interpolate.interp1d(x, f_origin, kind="cubic")
plt.plot(x_smooth, spl(x_smooth), label="original")
spl = scipy.interpolate.interp1d(x, all_f[i], kind="cubic")
plt.plot(x_smooth, spl(x_smooth), label=perturbation_table[i])
spl = scipy.interpolate.interp1d(x, all_f[j], kind="cubic")
plt.plot(x_smooth, spl(x_smooth), label=perturbation_table[j])
plt.ylim([0,20.5])
plt.legend(prop={'size': 20})
plt.savefig(f"/Users/weilu/Dropbox/GlpG_paper_2018/figures/{title}_1d.png", dpi=300)
In [447]:
i = 5
j = 6
title = "Lipid"
plot2d_side_by_side(all_location[i], all_location[j], title1=perturbation_table[i], title2=perturbation_table[j])
plt.savefig(f"/Users/weilu/Dropbox/GlpG_paper_2018/figures/{title}_compare.png", dpi=300)
plt.figure()
x = np.arange(len(f_origin))
x_smooth = np.linspace(x.min(), x.max(), 200)
spl = scipy.interpolate.interp1d(x, f_origin, kind="cubic")
plt.plot(x_smooth, spl(x_smooth), label="original")
spl = scipy.interpolate.interp1d(x, all_f[i], kind="cubic")
plt.plot(x_smooth, spl(x_smooth), label=perturbation_table[i])
spl = scipy.interpolate.interp1d(x, all_f[j], kind="cubic")
plt.plot(x_smooth, spl(x_smooth), label=perturbation_table[j])
# plt.ylim([0,20.5])
plt.legend(prop={'size': 20})
plt.savefig(f"/Users/weilu/Dropbox/GlpG_paper_2018/figures/{title}_1d.png", dpi=300)
In [ ]:
In [407]:
plot2d_side_by_side(all_location[5], all_location[6], title1=perturbation_table[5], title2=perturbation_table[6])
# plt.savefig(f"/Users/weilu/Dropbox/GlpG_paper_2018/figures/lipid_compare.png", dpi=300)
plt.figure()
plt.plot(f_origin, label="original")
plt.plot(all_f[5], label=perturbation_table[5])
plt.plot(all_f[6], label=perturbation_table[6])
plt.legend(prop={'size': 20})
# plt.savefig(f"/Users/weilu/Dropbox/GlpG_paper_2018/figures/lipid_1d.png", dpi=300)
Out[407]:
In [ ]:
In [409]:
i = 7
j = 8
title = "membrane"
plot2d_side_by_side(all_location[i], all_location[j], title1=perturbation_table[i], title2=perturbation_table[j])
plt.savefig(f"/Users/weilu/Dropbox/GlpG_paper_2018/figures/{title}_compare.png", dpi=300)
plt.figure()
plt.plot(f_origin, label="original")
plt.plot(all_f[i], label=perturbation_table[i])
plt.plot(all_f[j], label=perturbation_table[j])
plt.legend(prop={'size': 20})
plt.savefig(f"/Users/weilu/Dropbox/GlpG_paper_2018/figures/{title}_1d.png", dpi=300)
In [410]:
i = 9
j = 10
title = "Rg"
plot2d_side_by_side(all_location[i], all_location[j], title1=perturbation_table[i], title2=perturbation_table[j])
plt.savefig(f"/Users/weilu/Dropbox/GlpG_paper_2018/figures/{title}_compare.png", dpi=300)
plt.figure()
plt.plot(f_origin, label="original")
plt.plot(all_f[i], label=perturbation_table[i])
plt.plot(all_f[j], label=perturbation_table[j])
plt.legend(prop={'size': 20})
plt.savefig(f"/Users/weilu/Dropbox/GlpG_paper_2018/figures/{title}_1d.png", dpi=300)
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [386]:
location5 = location + f"perturbation-5-pmf-{temp}.dat"
path5, f5 = plot_shortest_path(location5, path, save=False,
xlabel="Distance", ylabel="AverageZ", zmax=zmax,res=res,
xmin=xmin,xmax=xmax,ymin=ymin,ymax=ymax, plot2d=False)
location6 = location + f"perturbation-6-pmf-{temp}.dat"
path6, f6 = plot_shortest_path(location6, path, save=False,
xlabel="Distance", ylabel="AverageZ", zmax=zmax,res=res,
xmin=xmin,xmax=xmax,ymin=ymin,ymax=ymax, plot2d=False)
# plt.colorbar()
plot2d_side_by_side(location5, location6, title1="decrease lipid", title2="increase lipid")
plt.savefig(f"/Users/weilu/Dropbox/GlpG_paper_2018/figures/lipid_compare.png", dpi=300)
In [363]:
plt.plot(f, label="original")
plt.plot(f5, label="decrease lipid")
plt.plot(f6, label="enhance lipid")
plt.legend(prop={'size': 20})
Out[363]:
In [364]:
location7 = location + f"perturbation-7-pmf-{temp}.dat"
path7, f7 = plot_shortest_path(location7, path, save=False,
xlabel="Distance", ylabel="AverageZ", zmax=zmax,res=res,
xmin=xmin,xmax=xmax,ymin=ymin,ymax=ymax, plot2d=False)
location8 = location + f"perturbation-8-pmf-{temp}.dat"
path8, f8 = plot_shortest_path(location8, path, save=False,
xlabel="Distance", ylabel="AverageZ", zmax=zmax,res=res,
xmin=xmin,xmax=xmax,ymin=ymin,ymax=ymax, plot2d=False)
# plt.colorbar()
plot2d_side_by_side(location7, location8)
In [365]:
plt.plot(f, label="original")
plt.plot(f7, label="decrease membrane")
plt.plot(f8, label="enhance membrane")
plt.legend(prop={'size': 20})
Out[365]:
In [366]:
location9 = location + f"perturbation-9-pmf-{temp}.dat"
path9, f9 = plot_shortest_path(location9, path, save=False,
xlabel="Distance", ylabel="AverageZ", zmax=zmax,res=res,
xmin=xmin,xmax=xmax,ymin=ymin,ymax=ymax, plot2d=False)
location10 = location + f"perturbation-10-pmf-{temp}.dat"
path10, f10 = plot_shortest_path(location10, path, save=False,
xlabel="Distance", ylabel="AverageZ", zmax=zmax,res=res,
xmin=xmin,xmax=xmax,ymin=ymin,ymax=ymax, plot2d=False)
# plt.colorbar()
plot2d_side_by_side(location9, location10)
In [367]:
plt.plot(f, label="original")
plt.plot(f9, label="decrease rg")
plt.plot(f10, label="enhance rg")
plt.legend(prop={'size': 20})
Out[367]:
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [376]:
pre = "/Users/weilu/Research/server/may_2018/03_week"
temp = 380
location = pre + "/second_start_extended_combined_2/_280-350/2d_zAverage_dis/without_417/"
location2 = location + f"perturbation-2-pmf-{temp}.dat"
zmax=25
res=30
path, f = shortest_path_2(location2, start=(10, 23), end=(20,1),save=False, xlabel="Distance", ylabel="AverageZ", zmax=zmax,res=res)
print(getBound(location2, res=res, zmax=zmax))
xmin,xmax,ymin,ymax = getBound(location2, res=res, zmax=zmax)
In [327]:
location5 = location + f"perturbation-5-pmf-{temp}.dat"
path5, f5 = plot_shortest_path(location5, path, save=False,
xlabel="Distance", ylabel="AverageZ", zmax=25,res=30,
xmin=xmin,xmax=xmax,ymin=ymin,ymax=ymax, plot2d=False)
location6 = location + f"perturbation-6-pmf-{temp}.dat"
path6, f6 = plot_shortest_path(location6, path, save=False,
xlabel="Distance", ylabel="AverageZ", zmax=25,res=30,
xmin=xmin,xmax=xmax,ymin=ymin,ymax=ymax, plot2d=False)
# plt.colorbar()
plot2d_side_by_side(location5, location6)
In [335]:
plt.plot(f, label="original")
plt.plot(f5, label="decrease lipid")
plt.plot(f6, label="enhance lipid")
plt.legend(prop={'size': 20})
Out[335]:
In [329]:
location7 = location + f"perturbation-7-pmf-{temp}.dat"
path7, f7 = plot_shortest_path(location7, path, save=False,
xlabel="Distance", ylabel="AverageZ", zmax=25,res=30,
xmin=xmin,xmax=xmax,ymin=ymin,ymax=ymax, plot2d=False)
location8 = location + f"perturbation-8-pmf-{temp}.dat"
path8, f8 = plot_shortest_path(location8, path, save=False,
xlabel="Distance", ylabel="AverageZ", zmax=25,res=30,
xmin=xmin,xmax=xmax,ymin=ymin,ymax=ymax, plot2d=False)
# plt.colorbar()
plot2d_side_by_side(location7, location8)
In [336]:
plt.plot(f, label="original")
plt.plot(f7, label="decrease membrane")
plt.plot(f8, label="enhance membrane")
plt.legend(prop={'size': 20})
Out[336]:
In [331]:
location9 = location + f"perturbation-9-pmf-{temp}.dat"
path9, f9 = plot_shortest_path(location9, path, save=False,
xlabel="Distance", ylabel="AverageZ", zmax=25,res=30,
xmin=xmin,xmax=xmax,ymin=ymin,ymax=ymax, plot2d=False)
location10 = location + f"perturbation-10-pmf-{temp}.dat"
path10, f10 = plot_shortest_path(location10, path, save=False,
xlabel="Distance", ylabel="AverageZ", zmax=25,res=30,
xmin=xmin,xmax=xmax,ymin=ymin,ymax=ymax, plot2d=False)
# plt.colorbar()
plot2d_side_by_side(location9, location10)
In [337]:
plt.plot(f, label="original")
plt.plot(f9, label="decrease rg")
plt.plot(f10, label="enhance rg")
plt.legend(prop={'size': 20})
Out[337]:
In [ ]:
In [ ]:
In [ ]:
In [189]:
location2
Out[189]:
In [187]:
pre = "/Users/weilu/Research/server/may_2018/03_week"
temp = 380
location = pre + "/second_start_extended_combined_2/_280-350/2d_zAverage_dis/without_417/"
location2 = location + f"perturbation-2-pmf-{temp}.dat"
path, f = shortest_path(location2, start=(10, 23), end=(20,1),save=False, xlabel="Distance", ylabel="AverageZ", 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 [186]:
pre = "/Users/weilu/Research/server/may_2018/03_week"
temp = 380
location = pre + "/second_start_extended_combined_2/_280-350/2d_zAverage_dis/without_417/"
location2 = location + f"perturbation-5-pmf-{temp}.dat"
path, f = shortest_path(location2, start=(10, 23), end=(20,1),save=False, xlabel="Distance", ylabel="AverageZ", 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 [157]:
pre = "/Users/weilu/Research/server/may_2018/03_week"
temp = 380
location = pre + "/second_start_extended_combined/_280-350/2d_zAverage_dis/force_0.1/"
location2 = location + f"perturbation-2-pmf-{temp}.dat"
path, f = shortest_path(location2, start=(10, 25), end=(20,1),save=False, xlabel="Distance", ylabel="AverageZ", 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 [84]:
pre = "/Users/weilu/Research/server/may_2018/03_week"
temp = 370
location = pre + "/second_start_extended_combined/_280-350/2d_zAverage_dis/force_0.1/"
location2 = location + f"perturbation-1-pmf-{temp}.dat"
path, f = shortest_path(location2, start=(10, 25), end=(20,1),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 [76]:
pre = "/Users/weilu/Research/server/may_2018/03_week"
temp = 380
location = pre + "/second_start_extended_combined/_280-350/2d_zAverage_dis/force_0.1/"
location2 = location + f"perturbation-4-pmf-{temp}.dat"
path, f = shortest_path(location2, start=(10, 25), end=(20,1),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 [170]:
pre = "/Users/weilu/Research/server/may_2018/03_week"
temp = 390
location = pre + "/second/_280-350/2d_zAverage_dis/force_0.0/"
location2 = location + f"perturbation-2-pmf-{temp}.dat"
path, f = shortest_path(location2, start=(10, 25), end=(20,1),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 [23]:
pre = "/Users/weilu/Research/server/may_2018/03_week"
temp = 380
location = pre + "/second/_280-350/2d_zAverage_dis/force_0.1/"
location2 = location + f"perturbation-1-pmf-{temp}.dat"
path, f = shortest_path(location2, start=(10, 25), end=(20,1),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 [ ]: