In [1]:
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 [2]:
data = pd.read_feather("/Users/weilu/Research/server/apr_2018/fifth/force_0.02_rg_0.1_lipid_1.0_mem_1_go_0.8/rerun_1_27_Apr_150935.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[2]:
<seaborn.axisgrid.FacetGrid at 0x1a417794e0>

In [9]:
rerun1.query("Temp == 300").plot.hexbin("DisReal", "Qw", cmap="seismic", sharex=False)


Out[9]:
<matplotlib.axes._subplots.AxesSubplot at 0x10f760e80>

In [10]:
rerun1.query("Temp == 300").plot.hexbin("DisReal", "AMH-Go", cmap="seismic", sharex=False)


Out[10]:
<matplotlib.axes._subplots.AxesSubplot at 0x111ec3128>

In [ ]:


In [6]:
0.1*(58.274-78)**2/2


Out[6]:
19.4557538

In [7]:
0.1*(64.9-78)**2/2


Out[7]:
8.580499999999992

In [8]:
0.1*(58.274-78)


Out[8]:
-1.9726

In [13]:
' '.join(["1", "2"])


Out[13]:
'1 2'

In [15]:
for i in range(45, 56):
    print(i)


45
46
47
48
49
50
51
52
53
54
55

In [18]:
' '.join([str(i) for i in range(133, 165)])


Out[18]:
'133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164'

In [ ]: