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 [20]:
data = pd.read_feather("/Users/weilu/Research/server/apr_2018/first/force_0.04_rg_0.15_lipid_1.0_mem_1_go_0.8/rerun_3_14_Apr_223723.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])
rerun3 = 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[20]:
In [21]:
rerun3.query("Temp == 300").plot.hexbin("DisReal", "Qw", cmap="seismic", sharex=False)
Out[21]:
In [31]:
rerun3.query("Temp == 300 and DisReal > 60").plot.hexbin("z_h4", "Qw", cmap="seismic", sharex=False)
Out[31]:
In [33]:
rerun3.query("Temp == 300 and DisReal > 60").groupby(["BiasTo", "Run"])["DisReal"].describe().query("count > 100")
Out[33]:
In [2]:
data = pd.read_feather("/Users/weilu/Research/server/apr_2018/first/force_0.04_rg_0.15_lipid_1.0_mem_1_go_0.8/rerun_1_08_Apr_145204.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]:
In [3]:
rerun1.query("Temp == 300").plot.hexbin("DisReal", "Qw", cmap="seismic", sharex=False)
Out[3]:
In [6]:
t = rerun1.query("Temp == 300 and z_h6 < -10")
t.groupby(["BiasTo", "Run"])["Qw"].describe().query("count > 100")
Out[6]:
In [10]:
rerun1.query("Temp == 300").plot.hexbin("TotalE", "Qw", cmap="seismic", sharex=False)
Out[10]:
In [11]:
rerun1.query("Temp == 300 and DisReal > 55").plot.hexbin("TotalE", "Qw", cmap="seismic", sharex=False)
Out[11]:
In [15]:
rerun1.query("Temp == 300").groupby("BiasTo")["Qw"].mean().plot()
Out[15]:
In [16]:
rerun1.query("Temp == 300").groupby(["BiasTo", "Run"])["Qw"].describe().query("count > 100")
Out[16]:
In [17]:
rerun1.query("Temp == 300 and Qw > 0.4").plot.hexbin("TotalE", "Qw", cmap="seismic", sharex=False)
Out[17]:
In [ ]: