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 [8]:
pre = "/Users/weilu/Research/server/apr_2018/02_week"
temp = 260
location = pre + "/sixth_expectedEnergy/_280-350/2d_z_qw/force_0.2/"
location2 = location + f"pmf-{temp}.dat"
path, f = shortest_path(location2, start=(4, 14), end=(28,24), save=False, xlabel="z_H6", ylabel="Qw")
# 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, zmin=-500, zmax=-300)
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[8]:
In [12]:
pre = "/Users/weilu/Research/server/apr_2018/02_week"
temp = 260
location = pre + "/sixth_expectedEnergy/_280-350/2d_z_qw/force_0.2/"
location2 = location + f"pmf-{temp}.dat"
path, f = shortest_path(location2, start=(4, 14), end=(28,24), save=False, xlabel="z_H6", ylabel="Qw")
# 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, zmin=-30, zmax=0, z=4)
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[12]:
In [17]:
pre = "/Users/weilu/Research/server/apr_2018/02_week"
temp = 260
location = pre + "/sixth_expectedEnergy/_280-350/2d_z_qw/force_0.2/"
location2 = location + f"pmf-{temp}.dat"
path, f = shortest_path(location2, start=(4, 14), end=(28,24), save=False, xlabel="z_H6", ylabel="Qw")
# 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, zmin=-45, zmax=-10, z=5)
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[17]:
In [23]:
pre = "/Users/weilu/Research/server/apr_2018/02_week"
temp = 260
location = pre + "/sixth_expectedEnergy/_280-350/2d_z_qw/force_0.2/"
location2 = location + f"pmf-{temp}.dat"
path, f = shortest_path(location2, start=(4, 14), end=(28,24), save=False, xlabel="z_H6", ylabel="Qw")
# 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, zmin=-5, zmax=20, z=6)
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[23]:
In [3]:
data = pd.read_feather("/Users/weilu/Research/server/apr_2018/second/force_0.02_rg_0.1_lipid_1.0_mem_1_go_0.8/rerun_1_10_Apr_225016.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])
rerun1 = 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 [9]:
rerun1.query("Temp == 300").plot.hexbin("DisReal", "Qw", cmap="seismic", sharex=False)
Out[9]:
In [20]:
rerun1.query("Temp == 300 and z_h6 < -10").plot.hexbin("DisReal", "Qw", cmap="seismic", sharex=False)
Out[20]:
In [10]:
rerun1.query("Temp == 300 and DisReal < 55").plot.hexbin("DisReal", "Qw", cmap="seismic", sharex=False)
Out[10]:
In [ ]:
rerun1.query("Temp == 300 and DisReal < 55").plot.hexbin("DisReal", "Qw", cmap="seismic", sharex=False)
In [22]:
t = rerun1.query("Temp == 300 and DisReal < 55 and z_h6 < -10")
t.groupby(["BiasTo", "Run"])["Qw"].describe().query("count > 300")
Out[22]:
In [11]:
rerun1.query("Temp == 300 and DisReal < 55").plot.hexbin("z_h6", "z_h3", cmap="seismic", sharex=False)
Out[11]:
In [6]:
rerun1.query("Temp == 300").plot.hexbin("DisReal", "Qw", cmap="seismic", sharex=False)
Out[6]:
In [4]:
rerun1.query("Temp == 300 and z_h5 < -20 and DisReal < 50").plot.hexbin("DisReal", "z_h5", cmap="seismic", sharex=False)
t = rerun1.query("Temp == 300 and z_h5 < -20 and DisReal < 50")
t.groupby(["BiasTo", "Run"])["DisReal"].describe().query("count > 300")
Out[4]:
In [75]:
pre = "/Users/weilu/Research/server/apr_2018/01_week"
temp = 280
location = pre + "/second_freeEnergy_1/_280-350/2d_z_qw/force_0.0/"
location2 = location + f"pmf-{temp}.dat"
# , block=[-15,-10,0.5,0.9]
path, f = shortest_path(location2, start=(3, 10), 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=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 [29]:
t = rerun1.query("Temp < 350 and DisReal < 60 and z_h6 < -10 and Qw < 0.4 and Qw > 0.2")
t.groupby(["BiasTo", "Run"])["DisReal"].describe()
Out[29]:
In [41]:
pre = "/Users/weilu/Research/server/apr_2018/01_week"
temp = 290
location = pre + "/first_freeEnergy_1/_280-350/2d_z_qw/force_0.1/"
location2 = location + f"pmf-{temp}.dat"
# , block=[-15,-10,0.5,0.9]
path, f = shortest_path(location2, start=(3, 10), 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=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 [36]:
pre = "/Users/weilu/Research/server/apr_2018/01_week"
temp = 290
location = pre + "/first_freeEnergy_1/_280-350/2d_z_qw/remove_34_46_force_0.1/"
location2 = location + f"pmf-{temp}.dat"
# , block=[-15,-10,0.5,0.9]
path, f = shortest_path(location2, start=(3, 10), 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[36]:
In [28]:
pre = "/Users/weilu/Research/server/apr_2018/01_week"
temp = 300
location = pre + "/first_freeEnergy_1/_280-350/2d_z_qw/remove_34/"
location2 = location + f"pmf-{temp}.dat"
path, f = shortest_path(location2, start=(3, 10), 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[28]:
In [13]:
pre = "/Users/weilu/Research/server/apr_2018/01_week"
temp = 300
location = pre + "/first_freeEnergy_1/_280-350/2d_z_qw/quick/"
location2 = location + f"pmf-{temp}.dat"
path, f = shortest_path(location2, start=(3, 10), 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[13]:
In [151]:
pre = "/Users/weilu/Research/server/apr_2018/01_week"
temp = 320
location = pre + "/tenth_freeEnergy_5/_280-350/2d_z_qw/remove_52_and_30/"
location2 = location + f"pmf-{temp}.dat"
path, f = shortest_path(location2, start=(1, 10), block=[-15,-10,0.5,0.9], 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[151]:
In [147]:
pre = "/Users/weilu/Research/server/apr_2018/01_week"
temp = 310
location = pre + "/tenth_freeEnergy_5/_280-350/2d_z_qw/quick/"
location2 = location + f"pmf-{temp}.dat"
path, f = shortest_path(location2, start=(1, 10), block=[-15,-10,0.5,0.9], 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[147]:
In [126]:
pre = "/Users/weilu/Research/server/apr_2018/01_week"
temp = 270
location = pre + "/tenth_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=[-15,-10,0.5,0.9], 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[126]:
In [55]:
pre = "/Users/weilu/Research/server/apr_2018/01_week"
temp = 280
location = pre + "/tenth_freeEnergy_3_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.5,0.9], 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[55]:
In [42]:
In [43]:
In [44]:
data = pd.read_feather("/Users/weilu/Research/server/apr_2018/second/force_0.04_rg_0.15_lipid_1.0_mem_1_go_0.8/rerun_1_09_Apr_154731.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])
rerun1 = 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[44]:
In [5]:
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[5]:
In [50]:
rerun1.query("Temp == 280").plot.hexbin("DisReal", "Qw", cmap="seismic", sharex=False)
Out[50]:
In [65]:
rerun1.query("Temp == 300").plot.hexbin("DisReal", "z_h6", cmap="seismic", sharex=False)
Out[65]:
In [66]:
rerun1.query("Temp == 300 and z_h5 < -20 and DisReal < 50").plot.hexbin("DisReal", "z_h5", cmap="seismic", sharex=False)
t = rerun1.query("Temp == 300 and z_h5 < -20 and DisReal < 50")
t.groupby(["BiasTo", "Run"])["DisReal"].describe().query("count > 300")
Out[66]:
In [68]:
Out[68]:
In [ ]:
rerun1.query("Temp == 280").plot.hexbin("DisReal", "z_h5", cmap="seismic", sharex=False)
In [6]:
rerun1.query("Temp == 300").plot.hexbin("DisReal", "Qw", cmap="seismic", sharex=False)
Out[6]:
In [31]:
rerun3.query("Temp == 300").plot.hexbin("DisReal", "Qw", cmap="seismic", sharex=False)
Out[31]:
In [108]:
rerun5.query("Temp == 300").plot.hexbin("DisReal", "Qw", cmap="seismic", sharex=False)
Out[108]:
In [9]:
rerun1.query("Temp == 300 and DisReal > 60 and z_h6 > -10").plot.hexbin("z_h6", "Qw", cmap="seismic", sharex=False)
rerun1.query("Temp == 300 and DisReal > 60 and z_h6 > -10").shape
Out[9]:
In [158]:
rerun3.query("Temp == 300 and DisReal > 60 and z_h6 > -10").plot.hexbin("z_h6", "Qw", cmap="seismic", sharex=False)
rerun3.query("Temp == 300 and DisReal > 60 and z_h6 > -10").shape
Out[158]:
In [157]:
rerun5.query("Temp == 300 and DisReal > 60 and z_h6 > -10").plot.hexbin("z_h6", "Qw", cmap="seismic", sharex=False)
rerun5.query("Temp == 300 and DisReal > 60 and z_h6 > -10").shape
Out[157]:
In [161]:
rerun5.query("Temp == 300 and DisReal > 60 and z_h6 > -10 and Lipid1 > -5").plot.hexbin("z_h6", "Qw", cmap="seismic", sharex=False)
rerun5.query("Temp == 300 and DisReal > 60 and z_h6 > -10 and Lipid1 > -5").shape
Out[161]:
In [162]:
rerun5.query("Temp == 300 and DisReal > 60 and z_h6 > -10 and Lipid1 < -5").plot.hexbin("z_h6", "Lipid1", cmap="seismic", sharex=False)
rerun5.query("Temp == 300 and DisReal > 60 and z_h6 > -10 and Lipid1 < -5").shape
Out[162]:
In [165]:
rerun5.query("Temp == 300 and DisReal > 60 and z_h6 > -10 and Lipid1 < -5").groupby(["BiasTo", "Run"])["DisReal"].describe().query("count > 100")
Out[165]:
In [133]:
rerun3.query("Temp == 300 and DisReal < 60 and z_h6 < -10").groupby(["BiasTo", "Run"])["DisReal"].describe()
Out[133]:
In [129]:
rerun3.query("Temp == 300 and DisReal < 60 and z_h6 < -10").shape
Out[129]:
In [17]:
rerun1.query("Temp == 300 and DisReal > 60 and z_h6 < -10").plot.hexbin("DisReal", "Qw", cmap="seismic", sharex=False)
Out[17]:
In [76]:
rerun3.query("Temp == 300 and DisReal > 60").plot.hexbin("DisReal", "Qw", cmap="seismic", sharex=False)
Out[76]:
In [116]:
rerun5.query("Temp == 300 and DisReal > 60").plot.hexbin("DisReal", "Qw", cmap="seismic", sharex=False)
Out[116]:
In [117]:
rerun5.query("Temp == 300 and DisReal > 60").plot.hexbin("z_h6", "Qw", cmap="seismic", sharex=False)
Out[117]:
In [118]:
rerun5.query("Temp == 300 and DisReal > 60 and z_h6 > -10").plot.hexbin("z_h6", "Qw", cmap="seismic", sharex=False)
Out[118]:
In [ ]:
In [78]:
rerun3.query("Temp == 300 and DisReal > 60 and Qw < 0.18").plot.hexbin("DisReal", "Qw", cmap="seismic", sharex=False)
Out[78]:
In [89]:
t = rerun3.query("Temp == 300 and DisReal > 60 and Qw < 0.18")
t.plot.hexbin("z_h6", "Qw", cmap="seismic", sharex=False)
Out[89]:
In [97]:
t = rerun3.query("Temp == 300 and DisReal > 60 and Qw < 0.18")
t.plot.hexbin("z_h6", "TotalE", cmap="seismic", sharex=False)
Out[97]:
In [98]:
t = rerun3.query("Temp == 300 and DisReal > 60 and Qw < 0.18").query("z_h6 < -10")
t.plot.hexbin("z_h6", "DisReal", cmap="seismic", sharex=False)
Out[98]:
In [99]:
t.groupby(["BiasTo", "Run"])["DisReal"].describe().query("count > 100")
Out[99]:
In [104]:
t = rerun3.query("Temp == 300 and DisReal > 60 and Qw < 0.18").query("z_h6 > -10")
t.plot.hexbin("z_h6", "DisReal", cmap="seismic", sharex=False)
Out[104]:
In [105]:
t.groupby(["BiasTo", "Run"])["DisReal"].describe().query("count > 100")
Out[105]:
In [32]:
rerun1.query("(z_h6 < -10 or DisReal > 60) and Temp == 300").plot.hexbin("DisReal", "z_h6", cmap="seismic", sharex=False)
Out[32]:
In [21]:
rerun3.query("(z_h6 < -10 or DisReal > 60) and Temp == 300").plot.hexbin("DisReal", "z_h6", cmap="seismic", sharex=False)
Out[21]:
In [33]:
rerun3.query("Temp == 300").plot.hexbin("Qw", "z_h6", cmap="seismic", sharex=False)
Out[33]:
In [7]:
data.query("Temp == 300").hist("Lipid1", bins=50)
Out[7]:
In [27]:
rerun3.query("Temp == 300 and DisReal < 60").hist("Lipid1", bins=50)
Out[27]:
In [122]:
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 [123]:
rerun7 = data
# data["BiasTo"] = data["BiasTo"].apply(pd.to_numeric)
In [124]:
data.query("Temp == 300").plot.hexbin("DisReal", "Qw", cmap="seismic", sharex=False)
Out[124]:
In [154]:
data.query("Temp == 300 and DisReal > 60").shape
Out[154]:
In [125]:
data.query("Temp == 300").plot.hexbin("TotalE", "Qw", cmap="seismic", sharex=False)
Out[125]:
In [139]:
data.query("Temp == 300 and Qw > 0.6").plot.hexbin("TotalE", "DisReal", cmap="seismic", sharex=False)
Out[139]:
In [134]:
data.query("Temp == 300 and Qw > 0.6")["TotalE"].hist(bins=50)
data.query("Temp == 300 and Qw > 0.6")["TotalE"].mean()
Out[134]:
In [148]:
data.query("Temp == 300 and z_h6 < -10 and Qw > 0.3").plot.hexbin("DisReal", "Qw", cmap="seismic", sharex=False)
Out[148]:
In [164]:
data.query("Temp == 300 and Qw < 0.6")["z_h6"].hist(bins=50)
Out[164]:
In [203]:
data.query("Temp == 300 and Qw > 0.3 and z_h6 < -10 and DisReal > 60")["TotalE"].hist(bins=50)
print(data.query("Temp == 300 and Qw > 0.3 and z_h6 < -10 and DisReal > 60")["TotalE"].mean())
data.query("Temp == 300 and Qw > 0.3 and z_h6 < -10 and DisReal > 60").shape
Out[203]:
In [204]:
data.query("Temp == 300 and z_h6 > -10 and Qw > 0.3 and DisReal > 60")["TotalE"].hist(bins=50)
print(data.query("Temp == 300 and z_h6 > -10 and Qw > 0.3 and DisReal > 60").shape)
data.query("Temp == 300 and z_h6 > -10 and Qw > 0.3 and DisReal > 60")["TotalE"].mean()
Out[204]:
In [195]:
t = data.query("Temp == 300 and z_h6 > -10 and Qw > 0.3 and DisReal > 60")
t.groupby(["BiasTo", "Run"])["Qw"].describe().query("count > 100")
Out[195]:
In [190]:
data.query("Temp == 300 and z_h6 > -10 and Qw < 0.6 and DisReal < 60")["TotalE"].hist(bins=50)
data.query("Temp == 300 and z_h6 > -10 and Qw < 0.6 and DisReal < 60")["TotalE"].mean()
Out[190]:
In [206]:
t = data.query("Temp == 300 and z_h6 > -10 and Qw < 0.6 and DisReal < 60")
t.groupby(["BiasTo", "Run"])["TotalE"].describe().query("count > 100")
Out[206]:
In [205]:
t = data.query("Temp == 300 and z_h6 > -10 and Qw < 0.6 and DisReal < 60")
t.groupby(["BiasTo", "Run"])["Qw"].describe().query("count > 100")
Out[205]:
In [197]:
data.query("Temp == 300 and z_h6 > -10 and Qw > 0.3 and DisReal < 60")["Qw"].hist(bins=50)
data.query("Temp == 300 and z_h6 > -10 and Qw > 0.3 and DisReal < 60")["Qw"].mean()
Out[197]:
In [ ]:
t = data.query("Temp == 300 and z_h6 < -10 and Qw > 0.3")
t.groupby(["BiasTo", "Run"])["Qw"].describe().query("count > 100")
In [149]:
t = data.query("Temp == 300 and z_h6 < -10 and Qw > 0.3")
t.groupby(["BiasTo", "Run"])["Qw"].describe().query("count > 100")
Out[149]:
In [145]:
data.query("Temp == 300 and z_h6 < -10 and Qw > 0.3").plot.hexbin("z_h4", "Qw", cmap="seismic", sharex=False)
Out[145]:
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 [69]:
data = pd.read_feather("/Users/weilu/Research/server/apr_2018/01_week/unfold_strengthen_h1_h2/07_Apr_135640.feather")
In [74]:
data["Run"] = data["Run"].apply(pd.to_numeric)
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 [71]:
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[71]:
In [72]:
a = data.query("(z_h6 > -10 and z_h1 < -10) or (z_h6 < -10 and z_h1 > -10)")
In [75]:
a.query("Folder == 'force_8_'").plot.hexbin("z_h1", "z_h6", cmap="cool", sharex=False)
Out[75]:
In [15]:
data["Folder"].unique()
Out[15]:
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [ ]: