In [5]:
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


The autoreload extension is already loaded. To reload it, use:
  %reload_ext autoreload

In [6]:
data = np.loadtxt("/Users/weilu/Research/server/may_2018/second/simulation/test/1/DMPC_0/rnative.dat")

In [7]:
data.shape


Out[7]:
(181, 181)

In [12]:
(data[136:161,:125]< 7).sum()


Out[12]:
7

In [14]:
(data<7).sum()


Out[14]:
1683

In [10]:
plt.imshow(data[136:161]< 7)


Out[10]:
<matplotlib.image.AxesImage at 0x1a1464a2b0>

In [8]:
data[136:161]


Out[8]:
array([[ 22.601343,  23.087562,  22.3034  , ...,  19.869857,  23.350168,
         25.184931],
       [ 22.059064,  22.280626,  21.624367, ...,  22.927604,  26.507366,
         28.162818],
       [ 20.255503,  19.968372,  18.82158 , ...,  21.281774,  24.926473,
         26.387709],
       ..., 
       [ 32.53577 ,  29.735212,  26.354181, ...,  29.089478,  31.261306,
         32.51494 ],
       [ 35.036945,  32.467489,  29.128288, ...,  29.07312 ,  31.036041,
         32.679489],
       [ 34.726732,  32.489542,  29.251648, ...,  26.676076,  28.603647,
         30.576272]])

In [4]:
plt.imshow(data[81:110,:] < 8)


Out[4]:
<matplotlib.image.AxesImage at 0x1a14601fd0>

In [37]:
(data[81:110,:110] < 7).sum()


Out[37]:
248

In [36]:
(data[81:110,:81] < 7).sum()


Out[36]:
35

In [38]:
(data[81:111,:111] < 7).sum()


Out[38]:
254

In [39]:
(data[81:111,:81] < 7).sum()


Out[39]:
36

In [40]:
36/254


Out[40]:
0.14173228346456693

In [42]:
35/248


Out[42]:
0.14112903225806453

In [28]:
plt.imshow(data[81:102,:81] < 7)


Out[28]:
<matplotlib.image.AxesImage at 0x1a1dcd0d68>

In [21]:
plt.imshow(data < 7)


Out[21]:
<matplotlib.image.AxesImage at 0x1a1dad1e48>

In [7]:
plt.imshow(data)


Out[7]:
<matplotlib.image.AxesImage at 0x1a1d468d30>

In [8]:
N_terminal = data[:80,:80]

In [9]:
C_terminal = data[80:,80:]

In [19]:
np.savetxt("/Users/weilu/Research/server/may_2018/second/simulation/test/1/DMPC_0/N_terminal.dat", N_terminal, fmt='%.6f')

In [20]:
np.savetxt("/Users/weilu/Research/server/may_2018/second/simulation/test/1/DMPC_0/C_terminal.dat", C_terminal, fmt='%.6f')

In [ ]: