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 [55]:
plt.plot(range(len(f)), i235d,range(len(f)), orignal_2, range(len(f)), i255d)
plt.savefig("/Users/weilu/Dropbox/GlpG_paper_2018/figures/mutation.png")
In [51]:
pre = "/Users/weilu/Research/server/apr_2018/01_week/"
temp = 260
location = pre + "/sixth_i255d/_280-350/2d_z_qw/force_0.2/"
location2 = location + f"pmf-{temp}.dat"
path, f = shortest_path(location2, start=(1, 14), plot1d=True, save=False)
# plt.savefig("/Users/weilu/papers/figures/2d_z6_qw.png", dpi=300)
# plt.savefig("/Users/weilu/papers/figures/shortest_path.png", dpi=300)
# location2 = location + f"evpb-{temp}.dat"
# (xi,yi,zi) = plot2d(location2, zmax=100)
# 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)
i255d = f
In [52]:
pre = "/Users/weilu/Research/server/apr_2018/01_week/"
temp = 260
location = pre + "/sixth_i235d/_280-350/2d_z_qw/force_0.2/"
location2 = location + f"pmf-{temp}.dat"
path, f = shortest_path(location2, start=(1, 14), plot1d=True, save=False)
# plt.savefig("/Users/weilu/papers/figures/2d_z6_qw.png", dpi=300)
# plt.savefig("/Users/weilu/papers/figures/shortest_path.png", dpi=300)
# location2 = location + f"evpb-{temp}.dat"
# (xi,yi,zi) = plot2d(location2, zmax=100)
# 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)
i235d = f
In [53]:
pre = "/Users/weilu/Research/server/apr_2018/01_week/"
temp = 260
location = pre + "/sixth_orignal/_280-350/2d_z_qw/force_0.2/"
location2 = location + f"pmf-{temp}.dat"
path, f = shortest_path(location2, start=(1, 14), plot1d=True, save=False)
# plt.savefig("/Users/weilu/papers/figures/2d_z6_qw.png", dpi=300)
# plt.savefig("/Users/weilu/papers/figures/shortest_path.png", dpi=300)
# location2 = location + f"evpb-{temp}.dat"
# (xi,yi,zi) = plot2d(location2, zmax=100)
# 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)
orignal_2 = f
In [40]:
pre = "/Users/weilu/Research/server/apr_2018/01_week/"
temp = 260
location = pre + "/sixth_orignal/_280-350/2d_z_qw/force_0.4/"
location2 = location + f"pmf-{temp}.dat"
path, f = shortest_path(location2, start=(1, 14), plot1d=True, save=False)
# plt.savefig("/Users/weilu/papers/figures/2d_z6_qw.png", dpi=300)
# plt.savefig("/Users/weilu/papers/figures/shortest_path.png", dpi=300)
location2 = location + f"evpb-{temp}.dat"
(xi,yi,zi) = plot2d(location2, zmax=100)
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[40]:
In [4]:
pre = "/Users/weilu/Research/server/apr_2018/01_week/"
temp = 260
location = pre + "/sixth_i255d/_280-350/2d_z_qw/force_0.2/"
location2 = location + f"pmf-{temp}.dat"
path, f = shortest_path(location2, start=(1, 14), plot1d=True, save=False)
# plt.savefig("/Users/weilu/papers/figures/2d_z6_qw.png", dpi=300)
# plt.savefig("/Users/weilu/papers/figures/shortest_path.png", dpi=300)
# location2 = location + f"evpb-{temp}.dat"
# (xi,yi,zi) = plot2d(location2, zmax=100)
# 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)
i255d = f
In [25]:
pre = "/Users/weilu/Research/server/mar_2018/05_week/"
temp = 260
location = pre + "/sixth_i235d/_280-350/2d_z_qw/force_0.2/"
location2 = location + f"pmf-{temp}.dat"
path, f = shortest_path(location2, start=(1, 14), plot1d=True, save=False)
# plt.savefig("/Users/weilu/papers/figures/2d_z6_qw.png", dpi=300)
# plt.savefig("/Users/weilu/papers/figures/shortest_path.png", dpi=300)
location2 = location + f"evpb-{temp}.dat"
(xi,yi,zi) = plot2d(location2, zmax=100)
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 [262]:
t = np.loadtxt(location2)
In [263]:
tt = np.where(np.isnan(t), 32, t)
In [259]:
t = t[~np.isnan(t).any(axis=1)]
In [264]:
plt.scatter(tt[:,1], tt[:,2], tt[:,3])
Out[264]:
In [238]:
plt.scatter(t[:,1], t[:,2], t[:,3])
Out[238]:
In [269]:
pre = "/Users/weilu/Research/server/mar_2018/05_week"
temp = 260
location = pre + "/sixth_i235d/_280-350/2d_z_qw/force_0.2/"
location2 = location + f"pmf-{temp}.dat"
path, f = shortest_path(location2, start=(1, 14), plot1d=True, save=False, zmax=32)
# plt.savefig("/Users/weilu/papers/figures/2d_z6_qw.png", dpi=300)
# plt.savefig("/Users/weilu/papers/figures/shortest_path.png", dpi=300)
# location2 = location + f"evpb-{temp}.dat"
# (xi,yi,zi) = plot2d(location2, zmax=100)
# 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 [329]:
t = np.loadtxt(location2)
In [333]:
plt.scatter(t[:,1], t[:,2], t[:,3])
Out[333]:
In [339]:
tt
Out[339]:
In [342]:
res = 30
xi = np.linspace(min(t[:,1]), max(t[:,1]), res)
yi = np.linspace(min(t[:,2]), max(t[:,2]), res)
In [344]:
yi
Out[344]:
In [341]:
xi
Out[341]:
In [356]:
mask = np.ones((res,res))*32
zi = t[:,3]
index_list = t[:,0]
count = 0
for i in range(res):
for j in range(res):
pos = i*res + j
if count < len(index_list):
if pos == int(index_list[count]):
mask[i][j] = zi[count]
count += 1
In [359]:
plt.imshow(mask.T)
Out[359]:
In [353]:
index_li
Out[353]:
In [338]:
t = np.loadtxt(location2)
tt = np.where(np.isnan(t), 32, t)
# t = t[~np.isnan(t).any(axis=1)]
t = tt
plt.scatter(t[:,1], t[:,2], c=t[:,3], cmap="jet")
plt.colorbar()
Out[338]:
In [102]:
pre = "/Users/weilu/Research/server/apr_2018/01_week"
temp = 300
location = pre + "/ninth_freeEnergy_5_less_temp/_280-350/2d_z_qw/less_bias_force_0.1/"
location2 = location + f"pmf-{temp}.dat"
path, f = shortest_path(location2, start=(1, 10), block=[-15,-10,0.0,0.1], plot1d=True, save=False)
# 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=100)
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[102]:
In [89]:
pre = "/Users/weilu/Research/server/apr_2018/01_week"
temp = 300
location = pre + "/ninth_freeEnergy_5_less_temp/_280-350/2d_z_qw/quick/"
location2 = location + f"pmf-{temp}.dat"
path, f = shortest_path(location2, start=(1, 10), block=[-15,-10,0.0,0.1], plot1d=True, save=False)
# 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=100)
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[89]:
In [95]:
pre = "/Users/weilu/Research/server/apr_2018/01_week"
temp = 300
location = pre + "/ninth_freeEnergy_5/_280-350/2d_z_qw/force_0.1/"
location2 = location + f"pmf-{temp}.dat"
path, f = shortest_path(location2, start=(1, 10), block=[-15,-10,0.0,0.1], plot1d=True, save=False)
# 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=100)
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 [20]:
pre = "/Users/weilu/Research/server/apr_2018/01_week"
temp = 320
location = pre + "/ninth_freeEnergy_5_less_temp/_280-350/2d_z_qw/force_0.0/"
location2 = location + f"pmf-{temp}.dat"
path, f = shortest_path(location2, start=(1, 10), block=[-15,-10,0.0,0.2], plot1d=True, save=False)
# 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=100)
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[20]:
In [379]:
pre = "/Users/weilu/Research/server/apr_2018/01_week"
temp = 300
location = pre + "/ninth_freeEnergy_5_less_temp/_280-350/2d_z_qw/high_temp/"
location2 = location + f"pmf-{temp}.dat"
path, f = shortest_path(location2, start=(1, 10), block=[-15,-10,0.0,0.1], plot1d=True, save=False)
# 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=100)
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[379]:
In [321]:
pre = "/Users/weilu/Research/server/apr_2018/01_week"
temp = 290
location = pre + "/ninth_freeEnergy_5_less_temp/_280-350/2d_z_qw/force_0.0/"
location2 = location + f"pmf-{temp}.dat"
path, f = shortest_path(location2, start=(1, 10), block=[-20,-15,0.6,0.7], plot1d=True, save=False)
# plt.savefig("/Users/weilu/papers/figures/2d_z6_qw.png", dpi=300)
# plt.savefig("/Users/weilu/papers/figures/shortest_path.png", dpi=300)
location2 = location + f"evpb-{temp}.dat"
(xi,yi,zi) = plot2d(location2, zmax=100)
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[321]:
In [ ]:
block = (0.6, )
In [173]:
np.searchsorted(xi, 20)
Out[173]:
In [172]:
xi
Out[172]:
In [376]:
pre = "/Users/weilu/Research/server/mar_2018/05_week"
temp = 290
location = pre + "/ninth_freeEnergy_3/_280-350/2d_z_qw/force_0.0/"
location2 = location + f"pmf-{temp}.dat"
path, f = shortest_path(location2, start=(1, 10), block=[-20,-15,0.6,0.7], plot1d=True, save=False)
# plt.savefig("/Users/weilu/papers/figures/2d_z6_qw.png", dpi=300)
# plt.savefig("/Users/weilu/papers/figures/shortest_path.png", dpi=300)
location2 = location + f"evpb-{temp}.dat"
(xi,yi,zi) = plot2d(location2, zmax=100)
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[376]:
In [57]:
pre = "/Users/weilu/Research/server/mar_2018/05_week"
temp = 280
location = pre + "/ninth_freeEnergy/_280-350/2d_z_qw/force_0.05/"
location2 = location + f"pmf-{temp}.dat"
path, f = shortest_path(location2, start=(1, 14), plot1d=True, save=False)
# plt.savefig("/Users/weilu/papers/figures/2d_z6_qw.png", dpi=300)
# plt.savefig("/Users/weilu/papers/figures/shortest_path.png", dpi=300)
location2 = location + f"evpb-{temp}.dat"
(xi,yi,zi) = plot2d(location2, zmax=100)
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 [138]:
data = pd.read_feather("/Users/weilu/Research/server/mar_2018/ninth/force_0.06_rg_0.15_lipid_1.0_mem_1_go_0.8/rerun_1_31_Mar_182712.feather")
dic = {"T0":280, "T1":290, "T2":300, "T3":310, "T4":320, "T5":335, "T6":350, "T7":365, "T8":380, "T9":410, "T10":440, "T11":470}
a = data
a["Temp"] = a["Temp"].apply(lambda x: dic[x])
In [139]:
rerun1 = data
In [ ]:
In [145]:
rerun1.query("Temp == 300 and DisReal > 60 and Qw > 0.2 and z_h6 < -10").plot.hexbin("z_h6", "Qw", cmap="seismic", sharex=False)
Out[145]:
In [ ]:
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.query("Temp == 320"), hue='Temp', size=8, aspect=1.61)
fg.map(plt.scatter, 'BiasTo', 'Diff').add_legend()
In [6]:
a.query("Temp == 300 and DisReal > 60 and DisReal < 90").plot.hexbin("z_h3", "z_h6", cmap="seismic", sharex=False)
Out[6]:
In [37]:
a = data.query("(z_h6 > -10 and z_h1 < -10) or (z_h6 < -10 and z_h1 > -10)")
a.query("Temp == 300").plot.hexbin("z_h1", "z_h6", cmap="seismic", sharex=False)
Out[37]:
In [47]:
data = pd.read_feather("/Users/weilu/Research/server/mar_2018/sixth/rg_0.15_lipid_1.0_mem_1_go_0.8/rerun_3_31_Mar_175942.feather")
dic = {"T0":280, "T1":290, "T2":300, "T3":310, "T4":320, "T5":335, "T6":350, "T7":365, "T8":380, "T9":410, "T10":440, "T11":470}
a = data
a["Temp"] = a["Temp"].apply(lambda x: dic[x])
In [48]:
data.plot.hexbin("Lipid1", "Qw", cmap="seismic", sharex=False)
Out[48]:
In [49]:
data.query("Lipid1 > -1 and Qw > 0.3 and Temp==300").groupby(["BiasTo", "Run"])["DisReal"].describe().query("count > 100")
Out[49]:
In [41]:
data = pd.read_feather("/Users/weilu/Research/server/mar_2018/ninth/force_0.06_rg_0.15_lipid_1.0_mem_1_go_0.8/rerun_3_01_Apr_144311.feather")
dic = {"T0":280, "T1":290, "T2":300, "T3":310, "T4":320, "T5":335, "T6":350, "T7":365, "T8":380, "T9":410, "T10":440, "T11":470}
a = data
a["Temp"] = a["Temp"].apply(lambda x: dic[x])
In [42]:
rerun3 = data
In [43]:
data.plot.hexbin("Lipid1", "Qw", cmap="seismic", sharex=False)
Out[43]:
In [46]:
data.query("Lipid1 > -1 and Qw > 0.3 and Temp==300").groupby(["BiasTo", "Run"])["DisReal"].describe().query("count > 100")
Out[46]:
In [31]:
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[31]:
In [202]:
data["BiasTo"] = data["BiasTo"].apply(pd.to_numeric)
In [199]:
data["Diff"] = data["DisReal"]-data["BiasTo"].apply(pd.to_numeric)
In [206]:
rerun1.query("z_h6 < -20 and Qw > 0.25 and Qw < 0.35").plot.hexbin("DisReal", "TotalE", cmap="seismic", sharex=False)
Out[206]:
In [197]:
data.query("z_h6 < -20 and Qw > 0.25 and Qw < 0.35").plot.hexbin("DisReal", "TotalE", cmap="seismic", sharex=False)
Out[197]:
In [371]:
rerun5Real.query("z_h6 < -20 and Qw > 0.25 and Qw < 0.35").plot.hexbin("DisReal", "TotalE", cmap="seismic", sharex=False)
Out[371]:
In [372]:
rerun5Real.query("z_h6 < -20 and Qw > 0.25 and Qw < 0.35").plot.hexbin("DisReal", "Lipid1", cmap="seismic", sharex=False)
Out[372]:
In [15]:
data = pd.read_feather("/Users/weilu/Research/server/mar_2018/ninth/force_0.06_rg_0.15_lipid_1.0_mem_1_go_0.8/rerun_5_02_Apr_175521.feather")
dic = {"T0":280, "T1":290, "T2":300, "T3":310, "T4":320, "T5":335, "T6":350, "T7":365, "T8":380, "T9":410, "T10":440, "T11":470}
a = data
a["Temp"] = a["Temp"].apply(lambda x: dic[x])
In [16]:
rerun5 = data
# data["BiasTo"] = data["BiasTo"].apply(pd.to_numeric)
In [68]:
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[68]:
In [52]:
rerun5Real.query("Temp < 350").plot.hexbin("z_h6", "Qw", cmap="seismic", sharex=False)
Out[52]:
In [70]:
rerun5Real.query("Temp == 300 and z_h6 < -10").plot.hexbin("BiasTo", "Qw", cmap="seismic", sharex=False)
Out[70]:
In [54]:
rerun5Real.query("z_h6 < -15 and Qw < 0.19 and Temp < 350").plot.hexbin("z_h6", "Qw", cmap="seismic", sharex=False)
Out[54]:
In [61]:
t = rerun5Real.query("BiasTo == '100.0' and Run == 0").plot.hexbin("Step", "Temp", cmap="seismic", sharex=False)
In [58]:
t = rerun5Real.query("BiasTo == '100.0' and Run == 0").plot.hexbin("z_h6", "Qw", cmap="seismic", sharex=False)
In [57]:
t = rerun5Real.query("z_h6 < -15 and Qw < 0.19 and Temp < 350")
t.groupby(["BiasTo", "Run"])["DisReal"].describe().query("count > 100")
Out[57]:
In [280]:
data.query("Temp < 350").plot.hexbin("TotalE", "Qw", cmap="seismic", sharex=False)
Out[280]:
In [281]:
data.query("Temp < 350").plot.hexbin("DisReal", "Qw", cmap="seismic", sharex=False)
Out[281]:
In [295]:
t = data.query("Temp < 350 and DisReal > 60 and Qw > 0.18 and Lipid1 > -1")
t.groupby(["BiasTo", "Run"])["DisReal"].describe().query("count > 100")
Out[295]:
In [ ]:
t = data.query("Temp < 350 and DisReal > 60 and Qw > 0.18")
In [386]:
t = rerun3.query("Temp < 350 and DisReal > 60 and Qw > 0.18")
t.hist("Lipid1")
Out[386]:
In [387]:
t = rerun5Real.query("Temp < 350 and DisReal > 60 and Qw > 0.18")
t.hist("Lipid1")
Out[387]:
In [5]:
data = pd.read_feather("/Users/weilu/Research/server/mar_2018/ninth/force_0.06_rg_0.15_lipid_1.0_mem_1_go_0.8/rerun_7_04_Apr_231330.feather")
dic = {"T0":280, "T1":290, "T2":300, "T3":310, "T4":320, "T5":335, "T6":350, "T7":365, "T8":380, "T9":410, "T10":440, "T11":470}
a = data
a["Temp"] = a["Temp"].apply(lambda x: dic[x])
In [14]:
rerun7 = data
# data["BiasTo"] = data["BiasTo"].apply(pd.to_numeric)
In [6]:
t = data.query("Temp < 350 and DisReal > 60 and Qw > 0.18")
t.hist("Lipid1")
Out[6]:
In [9]:
data.query("Temp < 350").plot.hexbin("DisReal", "Qw", cmap="seismic", sharex=False)
Out[9]:
In [20]:
rerun7.query("Temp < 350")["Step"].count()
Out[20]:
In [17]:
t = rerun5.query("Temp < 350 and DisReal > 60 and Qw > 0.18 and Lipid1 > -1")
t["Step"].count()
Out[17]:
In [18]:
t = rerun7.query("Temp < 350 and DisReal > 60 and Qw > 0.18 and Lipid1 > -1")
t["Step"].count()
Out[18]:
In [10]:
t = data.query("Temp < 350 and DisReal > 60 and Qw > 0.18 and Lipid1 > -1")
t.plot.hexbin("Lipid1", "z_h1", cmap="seismic", sharex=False)
Out[10]:
In [283]:
data.query("Temp < 350 and DisReal > 60 and Qw > 0.18").plot.hexbin("DisReal", "Qw", cmap="seismic", sharex=False)
Out[283]:
In [277]:
data.query("Qw > 0.58").groupby("Temp")["DisReal"].describe()
Out[277]:
In [220]:
t = data.query("z_h6 < -20 and Qw > 0.25 and Qw < 0.35 and DisReal > 60")
t.groupby(["BiasTo", "Run"])["DisReal"].describe().query("count > 100")
Out[220]:
In [216]:
data.query("z_h6 < -20 and Qw > 0.25 and Qw < 0.35 and DisReal > 60").plot.hexbin("z_h4", "TotalE", cmap="seismic", sharex=False)
Out[216]:
In [196]:
data.query("z_h6 < -20 and Qw > 0.25 and Qw < 0.35").hist("DisReal", bins=50)
Out[196]:
In [193]:
data.query("z_h6 < -20 and Qw > 0.25 and Qw < 0.35").plot.hexbin("DisReal", "Qw", cmap="seismic", sharex=False)
Out[193]:
In [40]:
data.query("Temp == 300").plot.hexbin("z_h3", "z_h6", cmap="seismic", sharex=False)
Out[40]:
In [42]:
a = data.query("(z_h3 < -10) or (z_h6 < -10)")
a.query("Temp == 300").plot.hexbin("z_h3", "z_h6", cmap="seismic", sharex=False)
Out[42]:
In [66]:
data.columns
Out[66]:
In [88]:
data.query("Temp <= 300").plot.hexbin("DisReal", "Qw", cmap="seismic", sharex=False)
Out[88]:
In [87]:
data.query("Temp <= 300 and DisReal > 60").plot.hexbin("DisReal", "Qw", cmap="seismic", sharex=False)
Out[87]:
In [91]:
data.columns
Out[91]:
In [94]:
data.query("Temp == 300 and DisReal > 60").plot.hexbin("Lipid1", "Qw", cmap="seismic", sharex=False)
Out[94]:
In [96]:
data.query("Temp == 300").plot.hexbin("abs_z_average", "z_h6", cmap="seismic", sharex=False)
Out[96]:
In [126]:
data.query("Temp == 300 and Qw < 0.6 and DisReal > 60 and Lipid1 > -1").plot.hexbin("abs_z_average", "Qw", cmap="seismic", sharex=False)
Out[126]:
In [130]:
data.query("Temp == 300 and Qw < 0.6 and DisReal > 60").shape
Out[130]:
In [129]:
t = data.query("Temp == 300 and Qw < 0.6 and DisReal > 60 and Lipid1 > -1")
print(t.shape)
t.groupby(["BiasTo", "Run"])["DisReal"].describe().query("count > 500")
Out[129]:
In [128]:
t = data.query("Temp == 300 and Qw < 0.6 and DisReal > 60 and z_h6 < -10")
print(t.shape)
t.groupby(["BiasTo", "Run"])["DisReal"].describe().query("count > 500")
Out[128]:
In [125]:
data.query("Temp == 300 and Qw < 0.6 and DisReal > 60 and z_h6 < -10").plot.hexbin("abs_z_average", "Qw", cmap="seismic", sharex=False)
Out[125]:
In [124]:
data.query("Temp == 300 and Qw < 0.6 and DisReal > 60").plot.hexbin("abs_z_average", "Qw", cmap="seismic", sharex=False)
Out[124]:
In [120]:
t = data.query("Temp == 300 and Qw < 0.6 and Lipid1 < -1 and DisReal < 60")
t.groupby(["BiasTo", "Run"])["DisReal"].describe().query("count > 500")
Out[120]:
In [114]:
data.query("Temp == 300 and Qw < 0.6 and Lipid1 < -1 and DisReal < 60").plot.hexbin("z_h1", "Qw", cmap="seismic", sharex=False)
Out[114]:
In [85]:
data.query("Temp <= 300 and DisReal > 60").plot.hexbin("abs_z_average", "Qw", cmap="seismic", sharex=False)
Out[85]:
In [64]:
data.query("Temp == 300").plot.hexbin("z_h6", "Qw", cmap="seismic", sharex=False)
Out[64]:
In [34]:
a = data.query("(z_h6 > -10 and z_h1 < -10) or (z_h6 < -10 and z_h1 > -10)")
In [ ]:
In [35]:
a.query("Temp == 300").plot.hexbin("z_h1", "z_h6", cmap="seismic", sharex=False)
Out[35]:
In [59]:
rerun1.query("Temp <= 300 and z_h1 < -10")["DisReal"].count()
Out[59]:
In [60]:
rerun1.query("Temp <= 300 and z_h1 < -10").plot.hexbin("DisReal", "z_h6", cmap="seismic", sharex=False)
Out[60]:
In [300]:
rerun5.query("Temp <= 300 and z_h1 < -10").plot.hexbin("DisReal", "z_h6", cmap="seismic", sharex=False)
Out[300]:
In [7]:
data.query("Temp <= 300 and z_h1 < -10").plot.hexbin("DisReal", "z_h6", cmap="seismic", sharex=False)
Out[7]:
In [61]:
data.query("Temp <= 300")["DisReal"].count()
Out[61]:
In [62]:
data.query("Temp <= 300 and z_h1 < -10")["DisReal"].describe()
Out[62]:
In [63]:
data.query("Temp <= 300 and z_h1 < -10").plot.hexbin("DisReal", "z_h6", cmap="seismic", sharex=False)
Out[63]:
In [32]:
data = pd.read_feather("/Users/weilu/Research/server/mar_2018/05_week/unfold_strengthen_h1_h2/05_Apr_222515.feather")
In [33]:
data.query("Qw > 0.1").plot.hexbin("Steps", "Qw", by="Temp", cmap="cool", sharex=False)
Out[33]:
In [76]:
data.query("Steps < 4e7 and Qw > 0.1").plot.hexbin("Steps", "Qw", by="Temp", cmap="cool", sharex=False)
Out[76]:
In [16]:
data.query("Folder == 'force_3_' and Steps < 3e7 and Qw > 0.1").plot.hexbin("Steps", "Qw", by="Temp", cmap="cool", sharex=False)
Out[16]:
In [28]:
data["Run"] = data["Run"].apply(pd.to_numeric)
In [39]:
fg = sns.FacetGrid(data=data.query("Steps < 4e7 and Qw > 0.1 and Folder=='force_7_'"), hue='Run', size=8, aspect=1.61)
fg.map(plt.scatter, 'Steps', 'Qw').add_legend()
Out[39]:
In [29]:
fg = sns.FacetGrid(data=data.query("Steps < 4e7 and Qw > 0.1 and Folder=='force_6_' and Run ==0"), hue='Run', size=8, aspect=1.61)
fg.map(plt.scatter, 'Steps', 'Qw').add_legend()
Out[29]:
In [34]:
fg = sns.FacetGrid(data=data.query("Steps < 4e7 and Qw > 0.1"), hue='Folder', size=8, aspect=1.61)
fg.map(plt.scatter, 'Steps', 'Qw').add_legend()
Out[34]:
In [77]:
fg = sns.FacetGrid(data=data.query("Steps < 4e7 and Qw > 0.1"), hue='Folder', size=8, aspect=1.61)
fg.map(plt.scatter, 'Steps', 'Qw').add_legend()
Out[77]:
In [36]:
a = data.query("(z_h6 > -10 and z_h1 < -10) or (z_h6 < -10 and z_h1 > -10)")
In [37]:
a.query("Folder == 'force_7_'").plot.hexbin("z_h1", "z_h6", cmap="cool", sharex=False)
Out[37]:
In [38]:
a.query("Folder == 'force_8_'").plot.hexbin("z_h1", "z_h6", cmap="cool", sharex=False)
Out[38]:
In [80]:
a.query("Folder == 'force_6_'").plot.hexbin("z_h1", "z_h6", cmap="cool", sharex=False)
Out[80]:
In [15]:
data["Folder"].unique()
Out[15]:
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [ ]: