In [1]:
# import numpy as np

# # !/usr/bin/env python3
# # -*- coding: utf-8 -*-
# """
# Created on 20181219

# @author: zhangji

# Trajection of a ellipse, Jeffery equation. 
# """

# %pylab inline
# pylab.rcParams['figure.figsize'] = (25, 11)
# fontsize = 40

# import numpy as np
# import scipy as sp
# from scipy.optimize import leastsq, curve_fit
# from scipy import interpolate
# from scipy.interpolate import interp1d
# from scipy.io import loadmat, savemat
# # import scipy.misc

# import matplotlib
# from matplotlib import pyplot as plt
# from matplotlib import animation, rc
# import matplotlib.ticker as mtick
# from mpl_toolkits.axes_grid1.inset_locator import inset_axes, zoomed_inset_axes
# from mpl_toolkits.mplot3d import Axes3D, axes3d

# from sympy import symbols, simplify, series, exp
# from sympy.matrices import Matrix
# from sympy.solvers import solve

# from IPython.display import display, HTML
# from tqdm import tqdm_notebook as tqdm
# import pandas as pd
# import re
# from scanf import scanf
# import os
# import glob

# from codeStore import support_fun as spf
# from src.support_class import *
# from src import stokes_flow as sf

# rc('animation', html='html5')
# PWD = os.getcwd()
# font = {'size': 20}
# matplotlib.rc('font', **font)
# np.set_printoptions(linewidth=90, precision=5)

%load_ext autoreload
%autoreload 2

from tqdm.notebook import tqdm as tqdm_notebook
import os
import glob
import natsort 
import numpy as np
import scipy as sp
from scipy.optimize import leastsq, curve_fit
from scipy import interpolate, integrate
from scipy import spatial, signal
# from scipy.interpolate import interp1d
from scipy.io import loadmat, savemat
# import scipy.misc
import importlib
from IPython.display import display, HTML
import pandas as pd
import pickle
import re
from scanf import scanf

import matplotlib
# matplotlib.use('agg')
from matplotlib import pyplot as plt
import matplotlib.colors as colors
from matplotlib import animation, rc
import matplotlib.ticker as mtick
from mpl_toolkits.axes_grid1.inset_locator import inset_axes, zoomed_inset_axes
from mpl_toolkits.mplot3d import Axes3D, axes3d
from mpl_toolkits.axes_grid1.axes_divider import make_axes_locatable
from mpl_toolkits.mplot3d.art3d import Line3DCollection
from matplotlib import cm

from tqdm import tqdm, tqdm_notebook
from time import time
from src.support_class import *
from src import jeffery_model as jm
from codeStore import support_fun as spf
from codeStore import support_fun_table as spf_tb

# %matplotlib notebook
%matplotlib inline
rc('animation', html='html5')
fontsize = 40
PWD = os.getcwd()

In [2]:
fig = plt.figure(figsize=(2, 2))
fig.patch.set_facecolor('white')
ax0 = fig.add_subplot(1, 1, 1)



In [3]:
job_dir = 'ecoC01B05_wt0.5_psi-0a'
table_name = 'ecoC01B05_tao1_wm0.5'

In [4]:
# show phase map of theta-phi, load date
importlib.reload(spf_tb)

t_headle = '(.*?).pickle'
t_path = os.listdir(os.path.join(PWD, job_dir))
filename_list = [filename for filename in os.listdir(os.path.join(PWD, job_dir)) 
                 if re.match(t_headle, filename) is not None]
ini_theta_list = []
ini_phi_list = []
lst_eta_list = []
theta_max_fre_list = []
phi_max_fre_list = []
psi_max_fre_list = []
eta_max_fre_list = []
pickle_path_list = []
idx_list = []
for i0, tname in enumerate(tqdm_notebook(filename_list[:])):
    tpath = os.path.join(PWD, job_dir, tname)
    with open(tpath, 'rb') as handle:
        tpick = pickle.load(handle)
    ini_theta_list.append(tpick['ini_theta'])
    ini_phi_list.append(tpick['ini_phi'])
    lst_eta_list.append(tpick['Table_eta'][-1])
    pickle_path_list.append(tpath)
    idx_list.append(i0)
    
    # fft rule
    tx = tpick['Table_t']
    tmin = np.max((0, tx.max() - 1000))
    idx = tx > tmin    
    freq_pk = spf_tb.get_major_fre(tx[idx], tpick['Table_theta'][idx])
    idx = tx > (tx.max() - 1 / freq_pk * 10)
    theta_max_fre_list.append(spf_tb.get_major_fre(tx[idx], tpick['Table_theta'][idx]))
    phi_max_fre_list.append(spf_tb.get_major_fre(tx[idx], tpick['Table_phi'][idx]))
    psi_max_fre_list.append(spf_tb.get_major_fre(tx[idx], tpick['Table_psi'][idx]))
    eta_max_fre_list.append(spf_tb.get_major_fre(tx[idx], tpick['Table_eta'][idx]))

data0 = pd.DataFrame({'ini_theta': np.around(ini_theta_list, 3), 
                 'ini_phi': np.around(ini_phi_list, 3), 
                 'lst_eta': np.around(lst_eta_list, 3), 
                 'theta_max_fre': theta_max_fre_list, 
                 'phi_max_fre': phi_max_fre_list, 
                 'psi_max_fre': psi_max_fre_list, 
                 'eta_max_fre': eta_max_fre_list, 
                 'data_idx': idx_list })
data = data0.pivot_table(index=['ini_theta'], columns=['ini_phi'])
lst_eta = data.lst_eta
theta_max_fre = data.theta_max_fre
phi_max_fre = data.phi_max_fre
psi_max_fre = data.psi_max_fre
eta_max_fre = data.eta_max_fre
data_idx = data.data_idx.fillna(-1).astype(int)


/anaconda3/envs/py35/lib/python3.5/site-packages/ipykernel_launcher.py:17: TqdmDeprecationWarning: This function will be removed in tqdm==5.0.0
Please use `tqdm.notebook.tqdm` instead of `tqdm.tqdm_notebook`


In [5]:
# check if the 3D parameter space is been traversed or not 
do_check = False
if do_check:
    t_headle = '(.*?).pickle'
    t_path = os.listdir(os.path.join(PWD, job_dir))
    filename_list = [filename for filename in os.listdir(os.path.join(PWD, job_dir)) 
                     if re.match(t_headle, filename) is not None]
    ttheta = []
    tphi = []
    tpsi = []
    for i0, tname in enumerate(tqdm_notebook(filename_list[:])):
        tpath = os.path.join(PWD, job_dir, tname)
        with open(tpath, 'rb') as handle:
            tpick = pickle.load(handle)
        ttheta.append(tpick['Table_theta'])
        tphi.append(tpick['Table_phi'])
        tpsi.append(tpick['Table_psi'])

    ttheta, tphi, tpsi = np.hstack(ttheta), np.hstack(tphi), np.hstack(tpsi)
    from evtk.hl import pointsToVTK
    vtu_name = '/home/zhangji/check_th_ph_ps_%s' % job_dir
    pointsToVTK(vtu_name, 
                ttheta, tphi, tpsi, 
                data={'th_ph_ps': ttheta})
    print('save theta_phi_psi infomation to %s' % vtu_name)

In [6]:
# sort phase map of theta-phi using the name beging with pick frequience
importlib.reload(spf_tb)

# clear dir
dirpath = os.path.join(PWD, job_dir, 'th_ph_fft')
if os.path.exists(dirpath) and os.path.isdir(dirpath):
    import shutil
    shutil.rmtree(dirpath)
    print('remove folder %s' % dirpath)
os.makedirs(dirpath)
print('make folder %s' % dirpath)

for tname in tqdm_notebook(filename_list[:]):
    tpath = os.path.join(PWD, job_dir, tname)
    with open(tpath, 'rb') as handle:
        tpick = pickle.load(handle)
    Table_t = tpick['Table_t']
    Table_dt = tpick['Table_dt']
    Table_X = tpick['Table_X']
    Table_P = tpick['Table_P']
    Table_P2 = tpick['Table_P2']
    Table_theta = tpick['Table_theta']
    Table_phi = tpick['Table_phi']
    Table_psi = tpick['Table_psi']
    Table_eta = tpick['Table_eta']
    
    tmin = np.max((0, Table_t.max() - 1000))
    idx = Table_t > tmin    
    freq_pk = spf_tb.get_major_fre(Table_t[idx], Table_theta[idx])
    idx = Table_t > (Table_t.max() - 1 / freq_pk * 10)
    freq_pk = spf_tb.get_major_fre(Table_t[idx], Table_theta[idx])
    save_name = 'fre%.5f_%s.jpg' % (freq_pk, os.path.splitext(os.path.basename(tname))[0])
    fig = spf_tb.light_save_theta_phi(os.path.join(dirpath, save_name), 
                                Table_t[idx], Table_dt[idx], Table_X[idx], Table_P[idx], Table_P2[idx], 
                                Table_theta[idx], Table_phi[idx], Table_psi[idx], Table_eta[idx])
    plt.close(fig)


remove folder /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/ecoC01B05_wt0.5_psi-0a/th_ph_fft
make folder /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/ecoC01B05_wt0.5_psi-0a/th_ph_fft
/anaconda3/lib/python3.6/site-packages/ipykernel_launcher.py:13: TqdmDeprecationWarning: This function will be removed in tqdm==5.0.0
Please use `tqdm.notebook.tqdm` instead of `tqdm.tqdm_notebook`
  del sys.path[0]


In [7]:
importlib.reload(spf_tb)
theta, phi = 0, 0

tpick, _ = spf_tb.load_table_date_pickle(job_dir, theta, phi)
Table_t = tpick['Table_t']
Table_dt = tpick['Table_dt']
Table_X = tpick['Table_X']
Table_P = tpick['Table_P']
Table_P2 = tpick['Table_P2']
Table_theta = tpick['Table_theta']
Table_phi = tpick['Table_phi']
Table_psi = tpick['Table_psi']
Table_eta = tpick['Table_eta']
print('-ini_theta %f -ini_phi %f -ini_psi %f' % 
      (tpick['Table_theta'][0], tpick['Table_phi'][0], tpick['Table_psi'][0]))

freq_pk = spf_tb.get_major_fre(Table_t, Table_theta)
idx = Table_t > Table_t.max() - 1 / freq_pk * 10
# spf_tb.show_table_result(Table_t[idx], Table_dt[idx], Table_X[idx], Table_P[idx], Table_P2[idx], 
#                          Table_theta[idx], Table_phi[idx], Table_psi[idx], Table_eta[idx], save_every)
spf_tb.show_theta_phi(Table_t[idx], Table_dt[idx], Table_X[idx], Table_P[idx], Table_P2[idx], 
                      Table_theta[idx], Table_phi[idx], Table_psi[idx], Table_eta[idx])
spf_tb.show_theta_phi_psi_eta(Table_t[idx], Table_dt[idx], Table_X[idx], Table_P[idx], Table_P2[idx], 
                              Table_theta[idx], Table_phi[idx], Table_psi[idx], Table_eta[idx])
spf_tb.show_center_X(Table_t[idx], Table_dt[idx], Table_X[idx], Table_P[idx], Table_P2[idx], 
                     Table_theta[idx], Table_phi[idx], Table_psi[idx], Table_eta[idx], 
                     table_name=table_name)


-ini_theta 0.000000 -ini_phi 0.000000 -ini_psi 0.000000
/home/zhangji/stokes_flow_master/codeStore/support_fun_table.py:615: UserWarning: This figure includes Axes that are not compatible with tight_layout, so results might be incorrect.
  plt.tight_layout()
Out[7]:
True

In [8]:
with pd.option_context('display.max_rows', 100, 'display.max_columns', 100):
    display(data.theta_max_fre)


ini_phi 0.000 0.143 0.286 0.428 0.571 0.714 0.857 1.000 1.142 1.285 1.428 1.571 1.714 1.856 1.999 2.142 2.285 2.428 2.570 2.713 2.856 2.999 3.142 3.284 3.427 3.570 3.713 3.856 3.998 4.141 4.284 4.427 4.570 4.712 4.855 4.998 5.141 5.284 5.426 5.569 5.712 5.855 5.998 6.140 6.283
ini_theta
0.000 0.015000 0.015000 0.015000 0.015000 0.015000 0.015000 0.015000 0.015000 0.015000 0.015000 0.015000 0.015000 0.014999 0.014999 0.014999 0.014999 0.014999 0.014999 0.014999 0.014999 0.014999 0.014999 0.014999 0.014999 0.014999 0.014999 0.014999 0.014999 0.014999 0.014999 0.014999 0.014999 0.014999 0.015000 0.015000 0.015000 0.015000 0.015000 0.015000 0.015000 0.015000 0.015000 0.015000 0.015000 0.015000
0.143 0.014999 0.014999 0.014999 0.014999 0.014999 0.014998 0.014998 0.014998 0.014998 0.015000 0.014999 0.015000 0.015000 0.014999 0.014999 0.014999 0.014998 0.015000 0.015000 0.014999 0.014999 0.014999 0.014998 0.014999 0.014999 0.015000 0.014999 0.014998 0.014999 0.014998 0.014998 0.014999 0.014999 0.015000 0.015000 0.014998 0.014998 0.014999 0.015000 0.014998 0.014998 0.014999 0.014999 0.014999 0.014999
0.286 0.014999 0.014999 0.015000 0.014999 0.014999 0.014998 0.014999 0.015000 0.014999 0.014999 0.015000 0.014998 0.014999 0.014999 0.014998 0.015001 0.014998 0.018998 0.014998 0.014999 0.015000 0.015001 0.014998 0.014998 0.014999 0.014999 0.014999 0.014999 0.014998 0.014999 0.014999 0.014998 0.014999 0.015000 0.015000 0.015000 0.014999 0.015000 0.014998 0.014999 0.014999 0.014998 0.014999 0.015001 0.015000
0.428 0.014998 0.015000 0.014999 0.014999 0.014999 0.014999 0.014999 0.014999 0.014999 0.015000 0.014999 0.014998 0.015000 0.014999 0.015000 0.014999 0.014999 0.015000 0.014999 0.014999 0.014999 0.014999 0.014998 0.014999 0.015000 0.014999 0.015000 0.015000 0.014999 0.014999 0.014998 0.014999 0.014999 0.015000 0.015001 0.014998 0.014999 0.014998 0.014999 0.014999 0.014999 0.015000 0.014998 0.015000 0.014998
0.571 0.014999 0.014999 0.014999 0.014999 0.014999 0.014999 0.014999 0.014999 0.014999 0.015000 0.015000 0.014998 0.014999 0.014998 0.014999 0.015000 0.014999 0.018998 0.015000 0.014999 0.014998 0.014999 0.014999 0.015000 0.014999 0.014999 0.014999 0.014999 0.014998 0.014999 0.015000 0.014999 0.015000 0.014999 0.014999 0.014999 0.014999 0.014999 0.015000 0.014999 0.014998 0.014998 0.015000 0.015000 0.014999
0.714 0.014998 0.014999 0.014999 0.014999 0.014998 0.014999 0.014999 0.015000 0.014999 0.014999 0.014999 0.015000 0.014998 0.014999 0.014998 0.014999 0.015000 0.019000 0.014998 0.014999 0.014999 0.014999 0.014999 0.014999 0.014998 0.014999 0.014998 0.014999 0.014998 0.014998 0.015000 0.014999 0.014999 0.014999 0.014999 0.014998 0.014998 0.015000 0.014998 0.014998 0.014999 0.014999 0.014998 0.014999 0.014999
0.857 0.015000 0.014999 0.015000 0.014999 0.014999 0.015000 0.014998 0.014998 0.015000 0.015000 0.014998 0.014998 0.014999 0.014999 0.015000 0.014998 0.014999 0.014999 0.014999 0.014998 0.014999 0.014998 0.014999 0.014999 0.015000 0.015000 0.014998 0.014998 0.014999 0.019000 0.018999 0.014999 0.015001 0.015000 0.014999 0.014999 0.015000 0.014999 0.014998 0.014999 0.014998 0.018998 0.014998 0.014999 0.014998
1.000 0.014999 0.014999 0.014999 0.014998 0.015001 0.014998 0.014999 0.015000 0.015000 0.018998 0.014999 0.014998 0.015000 0.014999 0.014998 0.014999 0.015000 0.014998 0.018997 0.014998 0.014999 0.014999 0.014998 0.015000 0.014999 0.014999 0.014999 0.019000 0.014998 0.015000 0.014999 0.014999 0.014999 0.014998 0.014999 0.014999 0.014999 0.014999 0.014998 0.014999 0.014999 0.014998 0.014999 0.015000 0.014999
1.142 0.015000 0.014998 0.014999 0.015000 0.014999 0.014999 0.014998 0.014999 0.014999 0.014999 0.014998 0.018998 0.014998 0.014998 0.015000 0.014999 0.014999 0.014998 0.014999 0.015000 0.015000 0.014999 0.014999 0.014999 0.015000 0.015000 0.014998 0.014998 0.014998 0.014999 0.015000 0.015000 0.014999 0.014998 0.014998 0.014999 0.015000 0.014999 0.014999 0.014999 0.014998 0.014998 0.014999 0.014999 0.014999
1.285 0.014999 0.014999 0.014998 0.014999 0.015000 0.014999 0.014999 0.014998 0.014999 0.014999 0.014999 0.014999 0.014999 0.014999 0.014998 0.015000 0.014998 0.014999 0.014999 0.014998 0.014999 0.014998 0.014998 0.015000 0.015000 0.015000 0.014998 0.014998 0.014998 0.015000 0.014999 0.015000 0.015000 0.014999 0.015000 0.014999 0.014999 0.014999 0.014998 0.014998 0.014999 0.014999 0.014999 0.014999 0.014999
1.428 0.015000 0.014999 0.014999 0.014999 0.014999 0.014999 0.014999 0.014999 0.014999 0.014998 0.014998 0.014998 0.014998 0.014998 0.014999 0.014998 0.014999 0.014998 0.014999 0.014999 0.014999 0.014999 0.015000 0.015000 0.014999 0.014999 0.014999 0.014999 0.014998 0.014999 0.014998 0.014999 0.014999 0.015000 0.014999 0.015000 0.014998 0.014999 0.014999 0.014999 0.014999 0.018999 0.014999 0.014999 0.014999
1.571 0.014999 0.014998 0.014999 0.014998 0.014998 0.014998 0.014999 0.014999 0.014999 0.014999 0.020363 0.086570 0.020387 0.015096 0.015000 0.015000 0.014999 0.014999 0.014998 0.014999 0.014998 0.014998 0.014998 0.015000 0.014998 0.014999 0.014999 0.018998 0.018999 0.018999 0.019000 0.018999 0.018997 0.018998 0.018998 0.018998 0.018998 0.018999 0.018999 0.018998 0.018998 0.015000 0.014999 0.014999 0.014999
1.714 0.015000 0.014999 0.014998 0.015000 0.015000 0.014998 0.014999 0.019000 0.014998 0.014999 0.014999 0.014999 0.014998 0.014999 0.014998 0.014998 0.014998 0.014999 0.015000 0.014999 0.014999 0.014998 0.014999 0.014999 0.014999 0.014999 0.014998 0.014999 0.014998 0.014999 0.014998 0.014999 0.014999 0.014998 0.014999 0.014999 0.014999 0.014999 0.014999 0.014999 0.014999 0.014998 0.014999 0.014999 0.014999
1.856 0.014999 0.015000 0.014999 0.014999 0.014999 0.014998 0.014999 0.014998 0.014998 0.014999 0.014999 0.014998 0.015000 0.014999 0.014998 0.014999 0.014998 0.014998 0.014999 0.015000 0.014998 0.014998 0.014999 0.014998 0.014999 0.014999 0.014999 0.014998 0.014999 0.014999 0.014998 0.014999 0.014999 0.014998 0.014999 0.014998 0.014999 0.014999 0.015000 0.014999 0.014999 0.014999 0.015000 0.014999 0.014998
1.999 0.014999 0.015000 0.014998 0.014998 0.014999 0.015000 0.015000 0.014999 0.014998 0.014998 0.015000 0.015000 0.014998 0.015000 0.014999 0.014999 0.015000 0.014999 0.014999 0.018999 0.014999 0.014998 0.014999 0.014999 0.014999 0.014999 0.014999 0.014999 0.014999 0.014999 0.015000 0.014998 0.014999 0.014999 0.014998 0.015000 0.014999 0.014999 0.014999 0.014998 0.015000 0.015000 0.015000 0.014999 0.014999
2.142 0.014999 0.014998 0.014999 0.015000 0.015000 0.014999 0.015000 0.015000 0.014999 0.014999 0.015000 0.015000 0.014999 0.014999 0.014998 0.015000 0.014999 0.014999 0.014999 0.014999 0.014999 0.014999 0.015001 0.014998 0.015000 0.014999 0.018999 0.014998 0.014998 0.015000 0.015000 0.014999 0.015000 0.014998 0.014999 0.014999 0.014999 0.014998 0.014999 0.014998 0.014999 0.015000 0.015000 0.018998 0.014999
2.285 0.014999 0.014999 0.014999 0.014998 0.014999 0.014999 0.014999 0.014998 0.014999 0.014999 0.014998 0.014999 0.015000 0.015000 0.015000 0.014998 0.014998 0.014998 0.014998 0.014999 0.014999 0.014998 0.014999 0.014999 0.014999 0.015000 0.014998 0.015000 0.014999 0.014999 0.014998 0.015000 0.014999 0.014999 0.014999 0.014999 0.014999 0.014998 0.014998 0.014999 0.014999 0.014998 0.015000 0.014998 0.014999
2.428 0.015000 0.014999 0.014999 0.015000 0.014998 0.014999 0.014998 0.014999 0.014999 0.014999 0.015000 0.014999 0.014998 0.015000 0.014999 0.018998 0.014999 0.014998 0.014999 0.014999 0.014999 0.015000 0.014999 0.014999 0.014998 0.014999 0.014999 0.014999 0.014998 0.014998 0.014999 0.014999 0.014999 0.014998 0.014999 0.014998 0.014998 0.014999 0.014999 0.014999 0.015000 0.018999 0.014998 0.014999 0.014999
2.570 0.015000 0.014999 0.015000 0.014999 0.014999 0.014999 0.014999 0.015000 0.014999 0.014999 0.014999 0.014999 0.014999 0.019000 0.014999 0.014999 0.014999 0.014998 0.014998 0.015000 0.014999 0.014998 0.014999 0.014998 0.014998 0.014998 0.014998 0.014999 0.014999 0.014998 0.015000 0.014999 0.015000 0.014999 0.014999 0.014999 0.014999 0.014998 0.014998 0.014999 0.019000 0.014999 0.014998 0.014999 0.015000
2.713 0.014998 0.014999 0.014998 0.014999 0.014999 0.015000 0.014998 0.014998 0.015000 0.018998 0.018999 0.014999 0.014998 0.014999 0.014999 0.015000 0.014999 0.014998 0.015000 0.015000 0.014999 0.014999 0.014998 0.014999 0.014999 0.014999 0.014999 0.014999 0.014998 0.014998 0.014999 0.014998 0.014998 0.014999 0.015000 0.014999 0.014999 0.014998 0.018999 0.014999 0.014999 0.014999 0.014999 0.014998 0.014998
2.856 0.014999 0.014998 0.014999 0.014998 0.014999 0.014999 0.014998 0.014999 0.018999 0.014999 0.014998 0.015000 0.014998 0.015000 0.014999 0.014998 0.014999 0.014998 0.014999 0.015000 0.014998 0.014999 0.014999 0.014998 0.014999 0.014999 0.014999 0.014999 0.014999 0.014999 0.014998 0.015000 0.014999 0.015000 0.014999 0.014998 0.015000 0.014999 0.015000 0.018999 0.015000 0.015000 0.014999 0.014999 0.014998
2.999 0.014999 0.014999 0.014998 0.014999 0.015000 0.014998 0.014998 0.018998 0.015000 0.014998 0.015001 0.015001 0.014999 0.014998 0.014999 0.015000 0.014998 0.014998 0.014998 0.014999 0.015000 0.014999 0.015000 0.014998 0.014999 0.014999 0.014999 0.014999 0.014998 0.015000 0.014999 0.014998 0.014999 0.014999 0.014999 0.014999 0.014999 0.014998 0.014999 0.014998 0.014998 0.014999 0.015000 0.015000 0.014998
3.142 0.014998 0.014999 0.014999 0.014998 0.014999 0.014999 0.015000 0.014999 0.014998 0.014999 0.015000 0.014999 0.014998 0.014999 0.014999 0.015000 0.014999 0.014999 0.014999 0.014999 0.014999 0.014999 0.014998 0.014998 0.014999 0.014998 0.014998 0.014998 0.014999 0.015000 0.015001 0.014999 0.014998 0.015001 0.014999 0.014999 0.014999 0.014999 0.014999 0.014998 0.014999 0.014999 0.014999 0.014999 0.014999

In [9]:
# sort all frequrents
with np.printoptions(precision=10, suppress=True, threshold=1e10):
    print(np.flipud(np.sort(data.theta_max_fre.values.flatten())))


[0.0865700109 0.0203870192 0.0203632025 0.0190004598 0.0190002003 0.0189998754
 0.0189998116 0.0189996885 0.0189996321 0.0189995878 0.0189992725 0.0189991564
 0.0189991136 0.0189990464 0.0189990313 0.0189990295 0.0189990025 0.0189989915
 0.0189988954 0.0189988814 0.0189988338 0.0189987112 0.0189985856 0.0189985502
 0.0189984962 0.0189983288 0.0189982773 0.0189982682 0.0189982116 0.0189982001
 0.0189981342 0.0189981191 0.0189980768 0.0189980317 0.0189978176 0.018997803
 0.0189977503 0.0189975807 0.0189975568 0.0189975279 0.0189973962 0.018997333
 0.0150962215 0.0150010474 0.0150010198 0.0150007979 0.015000793  0.015000682
 0.0150006487 0.0150006212 0.0150005404 0.0150005316 0.0150005242 0.015000505
 0.01500047   0.0150004337 0.015000402  0.0150003727 0.0150003513 0.0150003488
 0.0150003445 0.0150003271 0.0150003269 0.0150003151 0.015000305  0.0150002981
 0.0150002945 0.0150002432 0.0150002238 0.0150002153 0.015000208  0.0150001957
 0.0150001875 0.0150001875 0.015000161  0.0150001598 0.0150001569 0.0150001415
 0.0150001375 0.0150001342 0.015000132  0.0150001225 0.0150001199 0.0150001166
 0.0150001147 0.0150001103 0.0150001071 0.0150000946 0.0150000824 0.0150000802
 0.015000077  0.0150000711 0.0150000616 0.0150000464 0.0150000427 0.0150000339
 0.0150000306 0.0150000282 0.015000018  0.015000009  0.0150000077 0.0150000061
 0.0150000023 0.0149999983 0.0149999936 0.0149999927 0.0149999875 0.0149999726
 0.0149999698 0.0149999672 0.0149999595 0.0149999547 0.0149999405 0.0149999373
 0.0149999259 0.0149999187 0.0149999186 0.0149999147 0.0149999067 0.0149999065
 0.0149999043 0.0149999008 0.0149998999 0.0149998921 0.014999891  0.0149998864
 0.0149998817 0.0149998799 0.0149998699 0.0149998695 0.0149998693 0.0149998582
 0.0149998574 0.0149998539 0.0149998412 0.0149998387 0.0149998231 0.0149998194
 0.0149998171 0.014999816  0.0149998153 0.014999812  0.0149998082 0.0149998072
 0.0149997922 0.0149997904 0.0149997735 0.0149997735 0.0149997676 0.014999762
 0.0149997541 0.0149997515 0.0149997492 0.0149997491 0.0149997466 0.0149997452
 0.0149997363 0.0149997332 0.0149997321 0.014999725  0.0149997184 0.0149996983
 0.0149996975 0.0149996942 0.0149996909 0.0149996898 0.0149996877 0.014999686
 0.0149996848 0.0149996835 0.0149996835 0.0149996835 0.0149996835 0.0149996835
 0.0149996835 0.0149996835 0.0149996835 0.0149996835 0.0149996835 0.0149996835
 0.0149996835 0.0149996835 0.0149996835 0.0149996835 0.0149996835 0.0149996835
 0.0149996835 0.0149996835 0.0149996835 0.0149996835 0.0149996835 0.0149996835
 0.0149996835 0.0149996832 0.0149996801 0.0149996748 0.0149996712 0.0149996712
 0.0149996643 0.0149996582 0.0149996545 0.0149996533 0.0149996445 0.0149996444
 0.014999644  0.0149996367 0.0149996357 0.0149996342 0.0149996324 0.0149996313
 0.0149996304 0.0149996254 0.014999616  0.0149996146 0.014999611  0.0149996109
 0.0149996098 0.014999608  0.0149996073 0.0149996067 0.014999601  0.0149995963
 0.0149995956 0.0149995926 0.0149995846 0.0149995826 0.0149995804 0.014999576
 0.0149995703 0.0149995693 0.0149995622 0.0149995582 0.0149995564 0.0149995553
 0.0149995541 0.0149995438 0.0149995434 0.014999543  0.0149995393 0.0149995388
 0.0149995269 0.014999517  0.0149995119 0.0149995112 0.0149995103 0.0149995077
 0.0149995075 0.0149995002 0.0149994975 0.0149994936 0.0149994897 0.0149994874
 0.0149994869 0.0149994845 0.0149994836 0.0149994824 0.0149994817 0.0149994807
 0.0149994789 0.0149994756 0.0149994733 0.0149994714 0.0149994679 0.014999467
 0.0149994656 0.0149994631 0.0149994588 0.0149994551 0.0149994513 0.0149994458
 0.0149994448 0.0149994389 0.0149994353 0.0149994342 0.0149994327 0.0149994327
 0.0149994274 0.0149994256 0.0149994222 0.0149994196 0.0149994159 0.014999414
 0.0149994132 0.0149994079 0.0149994079 0.0149994073 0.014999406  0.0149994033
 0.0149994002 0.0149993974 0.0149993934 0.0149993933 0.0149993911 0.014999391
 0.0149993871 0.0149993858 0.0149993837 0.0149993823 0.0149993816 0.0149993813
 0.0149993766 0.0149993753 0.0149993727 0.0149993723 0.014999372  0.0149993706
 0.014999366  0.0149993602 0.0149993587 0.0149993587 0.0149993571 0.0149993565
 0.0149993537 0.0149993482 0.0149993464 0.0149993449 0.0149993448 0.0149993437
 0.0149993433 0.0149993426 0.0149993369 0.0149993337 0.0149993329 0.01499933
 0.0149993297 0.0149993296 0.0149993283 0.0149993252 0.0149993251 0.0149993234
 0.0149993211 0.0149993183 0.014999318  0.0149993135 0.0149993129 0.0149993107
 0.0149993099 0.0149993082 0.0149993074 0.0149993066 0.0149993049 0.0149993044
 0.0149993006 0.0149992975 0.0149992971 0.0149992966 0.0149992959 0.014999291
 0.014999285  0.0149992846 0.0149992839 0.0149992827 0.014999274  0.0149992722
 0.0149992666 0.0149992655 0.0149992642 0.0149992617 0.0149992602 0.014999259
 0.0149992587 0.0149992571 0.0149992568 0.0149992526 0.0149992516 0.014999251
 0.0149992393 0.0149992348 0.0149992346 0.0149992309 0.0149992281 0.0149992273
 0.0149992255 0.014999222  0.0149992202 0.0149992194 0.0149992177 0.0149992151
 0.0149992123 0.0149992117 0.0149992086 0.0149992072 0.0149992039 0.0149992026
 0.0149992012 0.0149992001 0.0149991991 0.0149991955 0.014999187  0.0149991855
 0.0149991843 0.0149991821 0.0149991809 0.0149991789 0.0149991772 0.0149991695
 0.0149991684 0.0149991663 0.0149991651 0.0149991639 0.0149991607 0.0149991577
 0.014999154  0.0149991518 0.0149991509 0.0149991506 0.0149991486 0.0149991443
 0.0149991433 0.0149991423 0.014999142  0.0149991387 0.0149991376 0.0149991361
 0.0149991336 0.0149991234 0.0149991232 0.014999123  0.0149991226 0.0149991223
 0.0149991147 0.0149991112 0.0149991063 0.0149991036 0.0149991008 0.0149991006
 0.0149990985 0.0149990973 0.0149990936 0.0149990929 0.0149990928 0.0149990922
 0.0149990915 0.0149990906 0.0149990887 0.0149990876 0.014999087  0.0149990869
 0.0149990862 0.0149990839 0.0149990831 0.0149990816 0.0149990786 0.0149990731
 0.0149990715 0.0149990682 0.014999068  0.0149990678 0.0149990664 0.0149990631
 0.0149990587 0.0149990571 0.0149990557 0.0149990548 0.0149990542 0.0149990523
 0.014999049  0.0149990484 0.0149990479 0.0149990443 0.0149990439 0.0149990405
 0.0149990402 0.0149990398 0.0149990398 0.0149990392 0.0149990362 0.0149990333
 0.0149990312 0.0149990306 0.0149990266 0.0149990245 0.0149990205 0.0149990152
 0.0149990152 0.0149990117 0.0149990107 0.0149990061 0.014999004  0.0149990021
 0.0149990013 0.014999     0.0149989995 0.0149989988 0.0149989952 0.0149989932
 0.0149989923 0.0149989884 0.0149989831 0.0149989826 0.0149989823 0.0149989814
 0.014998977  0.0149989756 0.0149989746 0.0149989731 0.0149989709 0.0149989669
 0.0149989666 0.0149989659 0.0149989635 0.0149989601 0.0149989585 0.0149989573
 0.0149989547 0.0149989533 0.0149989492 0.0149989478 0.0149989475 0.0149989427
 0.0149989425 0.0149989397 0.0149989396 0.0149989382 0.014998936  0.0149989347
 0.0149989329 0.0149989326 0.014998932  0.0149989316 0.0149989315 0.0149989311
 0.0149989286 0.0149989278 0.0149989272 0.0149989246 0.0149989219 0.0149989178
 0.0149989165 0.0149989164 0.0149989143 0.0149989118 0.0149989112 0.0149989101
 0.0149989097 0.0149989057 0.0149989036 0.0149989036 0.0149988988 0.0149988942
 0.0149988923 0.0149988909 0.0149988887 0.0149988882 0.0149988879 0.0149988874
 0.0149988862 0.014998884  0.0149988827 0.0149988806 0.0149988801 0.0149988728
 0.014998872  0.0149988698 0.0149988692 0.0149988689 0.0149988685 0.014998865
 0.0149988648 0.0149988643 0.0149988586 0.0149988568 0.0149988542 0.0149988528
 0.014998852  0.0149988518 0.014998847  0.0149988467 0.0149988465 0.0149988438
 0.014998842  0.0149988417 0.0149988408 0.0149988402 0.0149988392 0.0149988391
 0.0149988366 0.0149988265 0.0149988265 0.0149988265 0.0149988265 0.0149988265
 0.0149988265 0.0149988265 0.0149988265 0.0149988265 0.0149988265 0.0149988265
 0.0149988265 0.0149988265 0.0149988265 0.0149988265 0.0149988265 0.0149988265
 0.0149988265 0.0149988265 0.0149988265 0.0149988265 0.0149988222 0.0149988221
 0.0149988218 0.0149988214 0.0149988202 0.0149988199 0.0149988199 0.0149988199
 0.0149988186 0.0149988171 0.0149988111 0.0149988108 0.0149988066 0.0149988046
 0.0149988028 0.0149988002 0.0149987964 0.0149987939 0.0149987937 0.0149987906
 0.0149987868 0.0149987847 0.0149987808 0.01499878   0.0149987797 0.0149987791
 0.0149987771 0.0149987767 0.0149987759 0.0149987756 0.0149987715 0.0149987705
 0.0149987699 0.0149987694 0.0149987661 0.0149987582 0.0149987576 0.0149987576
 0.0149987574 0.0149987536 0.0149987523 0.0149987499 0.0149987493 0.0149987489
 0.0149987487 0.0149987484 0.0149987482 0.0149987442 0.0149987436 0.0149987428
 0.0149987409 0.014998734  0.0149987337 0.0149987315 0.0149987301 0.0149987297
 0.0149987283 0.0149987277 0.0149987271 0.0149987262 0.014998725  0.0149987247
 0.0149987213 0.014998721  0.0149987192 0.0149987182 0.014998718  0.0149987166
 0.0149987143 0.014998714  0.0149987134 0.0149987092 0.014998707  0.0149987007
 0.0149986995 0.0149986992 0.014998694  0.0149986937 0.0149986926 0.0149986912
 0.0149986896 0.0149986884 0.0149986878 0.0149986873 0.0149986862 0.0149986845
 0.0149986819 0.0149986676 0.0149986652 0.0149986581 0.0149986572 0.0149986567
 0.0149986545 0.0149986533 0.0149986532 0.0149986505 0.0149986464 0.0149986443
 0.0149986432 0.014998643  0.0149986422 0.0149986415 0.0149986411 0.0149986399
 0.0149986387 0.0149986382 0.0149986381 0.0149986379 0.0149986375 0.0149986364
 0.0149986358 0.014998635  0.0149986317 0.0149986314 0.0149986307 0.01499863
 0.0149986272 0.0149986223 0.0149986218 0.0149986187 0.0149986175 0.0149986172
 0.014998613  0.0149986116 0.0149986095 0.0149986087 0.0149986059 0.0149986035
 0.0149986018 0.0149986012 0.0149985974 0.0149985947 0.0149985932 0.014998588
 0.0149985872 0.0149985854 0.0149985761 0.0149985747 0.0149985725 0.0149985613
 0.0149985593 0.0149985572 0.0149985571 0.0149985567 0.0149985537 0.0149985535
 0.0149985526 0.0149985474 0.0149985467 0.0149985456 0.0149985449 0.0149985437
 0.0149985408 0.014998539  0.0149985369 0.014998535  0.0149985343 0.0149985326
 0.0149985315 0.0149985306 0.0149985287 0.0149985279 0.0149985269 0.0149985264
 0.014998525  0.0149985232 0.0149985222 0.0149985189 0.0149985187 0.0149985178
 0.0149985173 0.0149985152 0.0149985149 0.0149985125 0.0149985124 0.014998512
 0.0149985104 0.0149985085 0.0149985069 0.0149985068 0.0149985019 0.0149985013
 0.0149985006 0.0149985004 0.0149984986 0.0149984975 0.0149984973 0.0149984944
 0.0149984911 0.0149984875 0.0149984835 0.0149984831 0.014998482  0.014998481
 0.0149984751 0.0149984719 0.0149984717 0.0149984712 0.0149984664 0.0149984621
 0.0149984593 0.0149984573 0.0149984569 0.0149984538 0.0149984529 0.0149984528
 0.0149984514 0.0149984486 0.0149984469 0.0149984381 0.014998438  0.0149984376
 0.0149984376 0.0149984367 0.0149984362 0.014998434  0.0149984332 0.0149984324
 0.0149984303 0.0149984301 0.0149984297 0.0149984248 0.0149984213 0.0149984158
 0.014998415  0.0149984129 0.0149984105 0.0149984066 0.0149984057 0.0149984052
 0.0149984018 0.0149984014 0.0149983955 0.0149983953 0.0149983942 0.0149983902
 0.0149983884 0.0149983881 0.014998388  0.0149983849 0.0149983843 0.0149983831
 0.0149983807 0.0149983803 0.0149983793 0.0149983775 0.0149983716 0.0149983698
 0.0149983683 0.0149983675 0.0149983675 0.0149983663 0.0149983655 0.0149983638
 0.014998361  0.0149983565 0.0149983544 0.0149983522 0.0149983515 0.0149983506
 0.0149983493 0.0149983472 0.0149983447 0.0149983428 0.0149983426 0.0149983419
 0.0149983394 0.0149983389 0.0149983382 0.0149983375 0.0149983358 0.014998334
 0.0149983313 0.0149983305 0.0149983265 0.0149983231 0.0149983216 0.0149983111
 0.0149983076 0.0149983054 0.0149982974 0.0149982971 0.0149982954 0.0149982933
 0.0149982925 0.0149982907 0.0149982905 0.0149982899 0.0149982889 0.0149982866
 0.0149982827 0.0149982791 0.0149982687 0.0149982675 0.0149982665 0.0149982646
 0.0149982609 0.0149982607 0.0149982576 0.0149982563 0.0149982505 0.0149982488
 0.0149982471 0.0149982444 0.0149982444 0.0149982443 0.0149982442 0.0149982407
 0.014998235  0.014998234  0.0149982325 0.0149982251 0.0149982233 0.0149982217
 0.0149982167 0.0149982121 0.0149982099 0.0149982072 0.0149982066 0.0149982062
 0.014998199  0.0149981979 0.0149981977 0.0149981967 0.0149981947 0.0149981898
 0.014998187  0.0149981869 0.0149981798 0.0149981787 0.014998177  0.0149981712
 0.014998167  0.0149981664 0.0149981655 0.014998165  0.0149981589 0.0149981586
 0.0149981544 0.0149981497 0.0149981429 0.0149981429 0.0149981403 0.0149981384
 0.0149981351 0.0149981239 0.0149981229 0.0149981225 0.0149981216 0.0149981187
 0.0149981174 0.0149981111 0.0149981075 0.0149981053 0.0149981017 0.0149981003
 0.014998094  0.0149980933 0.0149980904 0.0149980884 0.0149980878 0.014998085
 0.014998081  0.0149980805 0.0149980756 0.0149980752 0.0149980677 0.0149980575
 0.01499805   0.0149980445 0.0149980413 0.0149980402 0.0149980333 0.0149980325
 0.0149980261 0.0149980202 0.0149980193 0.0149980174 0.0149980116 0.0149980084
 0.0149980002 0.0149979898 0.0149979894 0.0149979887 0.0149979824 0.0149979782
 0.0149979755 0.01499796   0.0149979579 0.0149979575 0.0149979459 0.0149979444
 0.0149979443 0.0149979421 0.0149979408 0.0149979346 0.0149979231 0.0149979188
 0.0149979136 0.0149979132 0.0149979116 0.0149979103 0.0149979028 0.0149979012
 0.0149978983 0.0149978978 0.0149978965 0.014997882  0.0149978813 0.014997881
 0.014997876  0.0149978721 0.0149978694 0.0149978665 0.0149978655 0.014997856
 0.0149978297 0.0149978209 0.0149978167 0.0149978105 0.0149978015 0.014997794
 0.0149977911 0.014997789  0.0149977725 0.0149977533 0.0149977518 0.0149977499
 0.0149977483 0.0149977119 0.0149977051 0.014997704  0.0149977024 0.0149976927
 0.0149976778 0.0149976775 0.0149976147]

In [10]:
spf_tb.show_traj_phase_map_fre(theta_max_fre)
# spf_tb.show_traj_phase_map_fre(phi_max_fre)
# spf_tb.show_traj_phase_map_fre(psi_max_fre)
# spf_tb.show_traj_phase_map_fre(eta_max_fre)


Out[10]:
True

In [8]:
# put images with same frequence into a subdirect
importlib.reload(spf_tb)
def t_show_idx(iidx):
    theta = type_fre.index.values[iidx[0][0]]
    phi = type_fre.columns.values[iidx[1][0]]
    print(theta, phi)
    tipical_th_ph_list.append((theta, phi))
    spf_tb.show_pickle_results(job_dir, theta, phi, table_name)
    return True

def t_show_idx_list(iidx, nshow=5, Table_t_range1=np.array((0, np.inf)), Table_t_range2=np.array((0, np.inf))):
    nshow = int(np.min((nshow, iidx[0].size)))
    tidx = np.random.choice(iidx[0].size, nshow, replace=False)
    theta = type_fre.index.values[iidx[0][tidx]]
    phi = type_fre.columns.values[iidx[1][tidx]]
    theta_phi_list = np.vstack((theta, phi)).T
#     spf_tb.show_table_theta_phi_list(theta_phi_list, job_dir, Table_t_range=Table_t_range1, figsize=np.array((20, 20)), dpi=100)
    spf_tb.show_table_result_list(theta_phi_list, job_dir, Table_t_range=Table_t_range2, figsize=np.array((16, 9)), dpi=100)
    return True

tfre = theta_max_fre.copy()
check_fre_list = [0.0150, 0.0190]
atol_fre_list =  [0.0002, 0.0002]
Table_t_range1 = np.array((0, 1000))
Table_t_range2 = np.array((4500, np.inf))
nshow = np.inf

tipical_th_ph_list = []
type_fre = tfre.copy()
type_fre.iloc[:, :] = len(check_fre_list) 
for i0, (check_fre, atol_fre) in enumerate(zip(check_fre_list, atol_fre_list)):
    use_idx = np.isclose(tfre, check_fre, rtol=0, atol=atol_fre)
    type_fre.iloc[use_idx] = i0
    iidx = np.where(use_idx)
#     t_show_idx(iidx)
    t_show_idx_list(iidx, nshow=nshow, Table_t_range1=Table_t_range1, Table_t_range2=Table_t_range2)

# plot one of the remaind cases
if np.any(type_fre.values == len(check_fre_list)):
    iidx = np.where(type_fre.values == len(check_fre_list))
#     t_show_idx(iidx)
    t_show_idx_list(iidx, nshow=nshow, Table_t_range1=Table_t_range1, Table_t_range2=Table_t_range2)

# spf_tb.show_traj_phase_map_type(type_fre)
# spf_tb.save_separate_angleList_fft(job_dir, tfre, check_fre_list, atol_fre_list)



In [6]:
Table_t_range = np.array((4500, np.inf))
figsize = np.array((16, 9))
dpi = 100

label_list = np.arange(len(tipical_th_ph_list))
spf_tb.show_table_theta_phi_psi_fft_list(tipical_th_ph_list, job_dir, label_list=label_list, figsize=figsize, dpi=dpi)
spf_tb.show_table_result_list(tipical_th_ph_list, job_dir, label_list=label_list, Table_t_range=Table_t_range,
                              figsize=figsize, dpi=dpi)


0.0 0.0
0.286 2.428
1.571 1.428
Out[6]:
True

In [ ]:
# create phase map
importlib.reload(spf_tb)
def tget_ax0():
    n_xticks = 32
    xticks = np.arange(n_xticks)
    fig = plt.figure(figsize=(20, 20))
    fig.patch.set_facecolor('white')
    axs = []
    axs.append(fig.add_subplot(221, polar=True))
    axs.append(fig.add_subplot(222, polar=True))
    axs.append(fig.add_subplot(223, polar=True))
    axs.append(fig.add_subplot(224, polar=True))
    for ax0 in axs:
        ax0.set_xticks(xticks / n_xticks * 2 * np.pi)
        ax0.set_xticklabels(['$\dfrac{%d}{%d}2\pi$' % (i0, n_xticks) for i0 in xticks])
        ax0.set_yticklabels([])
        ax0.set_ylim(0, np.pi)
    plt.tight_layout()
    return fig, axs

check_fre_list = [1.000, 0.0220, 1.0000, 0.0540]
atol_list =      [0.004, 0.0005, 0.0005, 0.0005]
color_list =     ['b',   'g',    'r',    'c',   'm', 'y', 'k']
psi_lim_fct = 20
resampling_fct = 10

data0['use_max_fre'] = data0.theta_max_fre
case_path_list = spf_tb.separate_fre_path(check_fre_list, atol_list, data0, pickle_path_list)
for idx, psi_lim1 in enumerate(np.linspace(0, 2 * np.pi, psi_lim_fct * 16, 
                                           endpoint=False)[::psi_lim_fct]):
    fig, (ax0, ax1, ax2, ax3) = tget_ax0()
    ax_list = [ax0, ax0, ax1, ax2, ax3]
    psi_lim = (psi_lim1, psi_lim1 + 2 * np.pi / (psi_lim_fct * 16))
    desc = '$\psi\in[%.3f\pi, %.3f\pi)$' % ((psi_lim[0] / np.pi), (psi_lim[1] / np.pi))
    fig.suptitle(desc, fontsize=fontsize*0.8)
    for check_fre, case_path, color, axi in zip(check_fre_list, case_path_list, color_list, ax_list):
        thandle = '%f' % check_fre
        spf_tb.draw_phase_map_theta(case_path, color, psi_lim, axs=(axi, ax_list[-1]), thandle=thandle, 
                                    resampling=True, resampling_fct=resampling_fct)
    tdir = os.path.join(PWD, job_dir, 'phase_mape_fre')
    if not os.path.exists(tdir):
        os.makedirs(tdir)
    figname = os.path.join(tdir, '%04d.png' % (idx))
    fig.savefig(os.path.join(tdir, figname))
    print('save to %s' % figname)
    plt.close(fig)


/home/zhangji/stokes_flow_master/codeStore/support_fun_table.py:12: UserWarning: matplotlib.pyplot as already been imported, this call will have no effect.
  matplotlib.use('agg')
0th frequence range: (0.996000, 1.004000)
1th frequence range: (0.021500, 0.022500)
2th frequence range: (0.999500, 1.000500)
3th frequence range: (0.053500, 0.054500)
tmax_fre=0.048002, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th1.639_ph0.401_ps0.000_D20190714_T225427.pickle
tmax_fre=0.052003, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th0.683_ph2.941_ps0.000_D20190715_T023809.pickle
tmax_fre=0.035997, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th1.639_ph1.738_ps0.000_D20190715_T020546.pickle
tmax_fre=0.052011, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th1.366_ph3.075_ps0.000_D20190715_T024550.pickle
tmax_fre=0.051998, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th1.229_ph3.208_ps0.000_D20190715_T025014.pickle
tmax_fre=0.036003, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th1.503_ph2.005_ps0.000_D20190715_T020546.pickle
tmax_fre=0.052012, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th2.322_ph3.476_ps0.000_D20190715_T031731.pickle
tmax_fre=0.052001, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th0.683_ph3.075_ps0.000_D20190715_T024550.pickle
tmax_fre=0.052001, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th2.322_ph3.208_ps0.000_D20190715_T025013.pickle
tmax_fre=0.051998, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th1.093_ph3.208_ps0.000_D20190715_T025013.pickle
tmax_fre=0.050005, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th1.639_ph0.000_ps0.000_D20190714_T225427.pickle
tmax_fre=0.052002, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th1.366_ph3.208_ps0.000_D20190715_T025014.pickle
tmax_fre=0.052001, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th0.820_ph3.075_ps0.000_D20190715_T024550.pickle
tmax_fre=0.051997, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th2.459_ph3.342_ps0.000_D20190715_T031151.pickle
tmax_fre=0.052005, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th1.093_ph2.941_ps0.000_D20190715_T023808.pickle
tmax_fre=0.050003, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th3.005_ph0.134_ps0.000_D20190714_T225427.pickle
tmax_fre=0.052011, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th2.185_ph3.342_ps0.000_D20190715_T031150.pickle
tmax_fre=0.052004, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th1.639_ph3.208_ps0.000_D20190715_T025013.pickle
tmax_fre=0.039005, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th1.639_ph4.011_ps0.000_D20190715_T032724.pickle
tmax_fre=0.049996, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th1.366_ph6.150_ps0.000_D20190715_T045619.pickle
tmax_fre=0.035999, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th1.639_ph1.069_ps0.000_D20190715_T005116.pickle
tmax_fre=0.052003, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th0.956_ph2.941_ps0.000_D20190715_T023809.pickle
tmax_fre=0.035999, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th1.639_ph1.604_ps0.000_D20190715_T020546.pickle
tmax_fre=0.035001, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th1.503_ph4.679_ps0.000_D20190715_T040314.pickle
tmax_fre=0.052007, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th1.503_ph3.075_ps0.000_D20190715_T024550.pickle
tmax_fre=0.035004, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th1.503_ph1.471_ps0.000_D20190715_T013943.pickle
tmax_fre=0.050013, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th1.229_ph6.150_ps0.000_D20190715_T045619.pickle
tmax_fre=0.037003, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th1.639_ph5.080_ps0.000_D20190715_T040605.pickle
tmax_fre=0.051999, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th0.137_ph3.075_ps0.000_D20190715_T024550.pickle
tmax_fre=0.049997, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th2.732_ph0.134_ps0.000_D20190714_T225427.pickle
tmax_fre=0.050005, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th0.956_ph0.000_ps0.000_D20190714_T225427.pickle
tmax_fre=0.048009, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th1.912_ph0.401_ps0.000_D20190714_T225427.pickle
tmax_fre=0.052011, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th2.459_ph3.208_ps0.000_D20190715_T025014.pickle
tmax_fre=0.035998, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th1.503_ph4.412_ps0.000_D20190715_T035348.pickle
tmax_fre=0.052006, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th2.868_ph3.476_ps0.000_D20190715_T031732.pickle
tmax_fre=0.037005, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th1.639_ph4.144_ps0.000_D20190715_T032725.pickle
tmax_fre=0.052001, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th1.912_ph3.208_ps0.000_D20190715_T025014.pickle
tmax_fre=0.051999, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th0.546_ph2.941_ps0.000_D20190715_T023808.pickle
tmax_fre=0.035998, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th1.503_ph1.203_ps0.000_D20190715_T011130.pickle
tmax_fre=0.036000, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th1.639_ph4.412_ps0.000_D20190715_T035348.pickle
tmax_fre=0.052007, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th3.005_ph3.208_ps0.000_D20190715_T025013.pickle
tmax_fre=0.052017, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th0.956_ph3.208_ps0.000_D20190715_T025013.pickle
tmax_fre=0.051997, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th2.732_ph3.342_ps0.000_D20190715_T031150.pickle
tmax_fre=0.036002, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th1.503_ph5.214_ps0.000_D20190715_T040610.pickle
tmax_fre=0.052003, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th0.956_ph3.075_ps0.000_D20190715_T024550.pickle
tmax_fre=0.035001, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th1.503_ph1.604_ps0.000_D20190715_T020546.pickle
tmax_fre=0.051999, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th3.005_ph3.476_ps0.000_D20190715_T031732.pickle
tmax_fre=0.052012, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th0.546_ph2.807_ps0.000_D20190715_T023653.pickle
tmax_fre=0.052001, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th0.820_ph2.941_ps0.000_D20190715_T023809.pickle
tmax_fre=0.052000, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th2.868_ph3.342_ps0.000_D20190715_T031151.pickle
tmax_fre=0.036002, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th1.639_ph4.813_ps0.000_D20190715_T040330.pickle
tmax_fre=0.036003, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th1.639_ph1.203_ps0.000_D20190715_T011131.pickle
tmax_fre=0.036007, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th1.503_ph2.139_ps0.000_D20190715_T021010.pickle
tmax_fre=0.051997, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th2.049_ph3.342_ps0.000_D20190715_T031151.pickle
tmax_fre=0.050010, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th1.912_ph0.000_ps0.000_D20190714_T225427.pickle
tmax_fre=0.036006, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th1.639_ph4.946_ps0.000_D20190715_T040521.pickle
tmax_fre=0.036000, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th1.639_ph4.545_ps0.000_D20190715_T040119.pickle
tmax_fre=0.051997, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th0.273_ph3.075_ps0.000_D20190715_T024550.pickle
tmax_fre=0.051997, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th0.273_ph2.941_ps0.000_D20190715_T023808.pickle
tmax_fre=0.036003, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th1.503_ph5.080_ps0.000_D20190715_T040604.pickle
tmax_fre=0.052000, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th1.912_ph3.342_ps0.000_D20190715_T031150.pickle
tmax_fre=0.036005, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th1.639_ph4.679_ps0.000_D20190715_T040314.pickle
tmax_fre=0.051997, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th0.410_ph2.807_ps0.000_D20190715_T142926.pickle
tmax_fre=0.035000, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th1.503_ph1.738_ps0.000_D20190715_T020547.pickle
tmax_fre=0.051999, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th0.410_ph2.941_ps0.000_D20190715_T023809.pickle
tmax_fre=0.051997, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th0.137_ph2.807_ps0.000_D20190715_T023653.pickle
tmax_fre=0.052001, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th1.776_ph3.342_ps0.000_D20190715_T031151.pickle
tmax_fre=0.036997, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th1.503_ph5.347_ps0.000_D20190715_T042036.pickle
tmax_fre=0.049998, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th0.820_ph6.016_ps0.000_D20190715_T045020.pickle
tmax_fre=0.051997, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th2.868_ph3.208_ps0.000_D20190715_T025013.pickle
tmax_fre=0.036998, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th1.503_ph4.278_ps0.000_D20190715_T033910.pickle
tmax_fre=0.045999, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th3.142_ph3.476_ps0.000_D20190715_T031731.pickle
tmax_fre=0.053009, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th3.142_ph0.267_ps0.000_D20190714_T225427.pickle
tmax_fre=0.051996, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th1.503_ph5.481_ps0.000_D20190715_T043702.pickle
tmax_fre=0.035999, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th1.639_ph1.471_ps0.000_D20190715_T013943.pickle
tmax_fre=0.052000, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th1.366_ph3.342_ps0.000_D20190715_T031151.pickle
tmax_fre=0.052004, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th1.503_ph3.208_ps0.000_D20190715_T025014.pickle
tmax_fre=0.052000, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th2.185_ph3.476_ps0.000_D20190715_T031731.pickle
tmax_fre=0.052003, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th1.776_ph3.208_ps0.000_D20190715_T025014.pickle
tmax_fre=0.051999, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th1.776_ph3.476_ps0.000_D20190715_T031732.pickle
tmax_fre=0.049998, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th1.639_ph0.267_ps0.000_D20190714_T225427.pickle
tmax_fre=0.052006, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th1.639_ph3.075_ps0.000_D20190715_T024550.pickle
tmax_fre=0.049996, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th0.956_ph6.283_ps0.000_D20190715_T045619.pickle
tmax_fre=0.036003, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th1.639_ph1.872_ps0.000_D20190715_T020547.pickle
tmax_fre=0.052001, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th3.005_ph3.342_ps0.000_D20190715_T031151.pickle
tmax_fre=0.038000, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th1.503_ph2.273_ps0.000_D20190715_T021007.pickle
tmax_fre=0.050002, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th1.776_ph0.267_ps0.000_D20190714_T225427.pickle
tmax_fre=0.050000, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th1.912_ph6.283_ps0.000_D20190715_T045619.pickle
tmax_fre=0.052012, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th0.546_ph3.075_ps0.000_D20190715_T024550.pickle
tmax_fre=0.051999, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th1.503_ph3.342_ps0.000_D20190715_T031150.pickle
tmax_fre=0.035999, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th1.503_ph4.545_ps0.000_D20190715_T040118.pickle
tmax_fre=0.051997, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th2.459_ph3.476_ps0.000_D20190715_T031731.pickle
tmax_fre=0.052011, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th2.049_ph3.476_ps0.000_D20190715_T031732.pickle
tmax_fre=0.034998, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th1.503_ph4.813_ps0.000_D20190715_T040331.pickle
tmax_fre=0.049999, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th3.142_ph3.208_ps0.000_D20190715_T025014.pickle
tmax_fre=0.048007, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th1.093_ph6.016_ps0.000_D20190715_T045021.pickle
tmax_fre=0.046996, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th0.683_ph2.807_ps0.000_D20190715_T023653.pickle
tmax_fre=0.035999, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th1.639_ph1.337_ps0.000_D20190715_T011429.pickle
tmax_fre=0.049997, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th0.683_ph6.016_ps0.000_D20190715_T142926.pickle
tmax_fre=0.049999, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th1.639_ph6.283_ps0.000_D20190715_T045619.pickle
tmax_fre=0.051998, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th1.639_ph3.342_ps0.000_D20190715_T031150.pickle
tmax_fre=0.051997, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th1.229_ph3.075_ps0.000_D20190715_T024550.pickle
tmax_fre=0.035006, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th1.503_ph1.872_ps0.000_D20190715_T020547.pickle
tmax_fre=0.052006, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th2.595_ph3.342_ps0.000_D20190715_T031150.pickle
tmax_fre=0.052003, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th1.776_ph3.075_ps0.000_D20190715_T024550.pickle
tmax_fre=0.052009, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th1.912_ph3.476_ps0.000_D20190715_T031731.pickle
tmax_fre=0.052002, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th0.410_ph2.807_ps0.000_D20190715_T023652.pickle
tmax_fre=0.036997, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th1.503_ph1.069_ps0.000_D20190715_T005116.pickle
tmax_fre=0.051997, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th2.185_ph3.208_ps0.000_D20190715_T025013.pickle
tmax_fre=0.045997, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th0.683_ph6.016_ps0.000_D20190715_T045020.pickle
tmax_fre=0.052011, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th2.595_ph3.476_ps0.000_D20190715_T031731.pickle
tmax_fre=0.036003, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th1.503_ph1.337_ps0.000_D20190715_T011428.pickle
tmax_fre=0.051999, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th2.322_ph3.342_ps0.000_D20190715_T031151.pickle
tmax_fre=0.037008, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th1.639_ph0.936_ps0.000_D20190715_T005118.pickle
tmax_fre=0.047998, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th1.912_ph0.267_ps0.000_D20190714_T225427.pickle
tmax_fre=0.037000, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th1.639_ph2.005_ps0.000_D20190715_T020546.pickle
tmax_fre=0.051997, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th2.049_ph3.208_ps0.000_D20190715_T025014.pickle
tmax_fre=0.052018, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th1.093_ph3.075_ps0.000_D20190715_T024550.pickle
tmax_fre=0.035000, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th1.503_ph4.946_ps0.000_D20190715_T040522.pickle
tmax_fre=0.051997, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th2.732_ph3.476_ps0.000_D20190715_T031731.pickle
tmax_fre=0.052007, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th3.142_ph0.134_ps0.000_D20190714_T225427.pickle
tmax_fre=0.052005, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th0.137_ph2.941_ps0.000_D20190715_T023808.pickle
tmax_fre=0.036007, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th1.639_ph4.278_ps0.000_D20190715_T033910.pickle
tmax_fre=0.052002, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th0.410_ph3.075_ps0.000_D20190715_T024550.pickle
tmax_fre=0.052000, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th2.595_ph3.208_ps0.000_D20190715_T025013.pickle
tmax_fre=0.049997, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th1.366_ph0.134_ps0.000_D20190714_T225427.pickle
tmax_fre=0.052009, n_match=0 /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/th0.273_ph2.807_ps0.000_D20190715_T023653.pickle



save to /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/phase_mape_fre/0000.png



save to /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/phase_mape_fre/0001.png



save to /home/zhangji/stokes_flow_master/head_Force/do_calculate_table/hlxC01_a_psi-0e/phase_mape_fre/0002.png


In [ ]:

calculate the phase map of stable trajectory using the KMeans method.


In [186]:
# show phase map of theta-phi, part 1
importlib.reload(spf_tb)
job_dir = 'ecoC01B05_T0.01_psi-0a'
table_name = 'ecoC01B05_T0.01'

t_headle = '(.*?).pickle'
t_path = os.listdir(os.path.join(PWD, job_dir))
filename_list = [filename for filename in os.listdir(os.path.join(PWD, job_dir)) 
                 if re.match(t_headle, filename) is not None]
ini_theta_list = []
ini_phi_list = []
lst_eta_list = []
pickle_path_list = []
idx_list = []
theta_primary_fre_list = []
phi_primary_fre_list = []
psi_primary_fre_list = []
for i0, tname in enumerate(tqdm_notebook(filename_list[:])):
    tpath = os.path.join(PWD, job_dir, tname)
    with open(tpath, 'rb') as handle:
        tpick = pickle.load(handle)
    ini_theta_list.append(tpick['ini_theta'])
    ini_phi_list.append(tpick['ini_phi'])
    lst_eta_list.append(tpick['Table_eta'][-1])
    pickle_path_list.append(tpath)
    idx_list.append(i0)
    
    # fft rule
    tx = tpick['Table_t']
    tmin = np.max((0, tx.max() - 1000))
    idx = tx > tmin
    # the last frequence is the major frequence. 
    use_fft_number = 3
    t1 = -use_fft_number - 1
    theta_primary_fre_list.append(spf_tb.get_primary_fft_fre(tx[idx], tpick['Table_theta'][idx])[t1:-1])
    phi_primary_fre_list.append(spf_tb.get_primary_fft_fre(tx[idx], tpick['Table_phi'][idx])[t1:-1])
    psi_primary_fre_list.append(spf_tb.get_primary_fft_fre(tx[idx], tpick['Table_psi'][idx])[t1:-1])


/home/zhangji/anaconda3/lib/python3.5/site-packages/ipykernel/__main__.py:17: TqdmDeprecationWarning: This function will be removed in tqdm==5.0.0
Please use `tqdm.notebook.tqdm` instead of `tqdm.tqdm_notebook`


In [216]:
# show phase map of theta-phi, part 2
def show_phase_map(tuse):
    fig = plt.figure(figsize=(20, 12), dpi=300)
    fig.patch.set_facecolor('white')
    ax0 = fig.add_subplot(111, polar=True)
    n_xticks = 32
    xticks = np.arange(n_xticks)
    ax0.set_xticks(xticks / n_xticks * 2 * np.pi)
    ax0.set_xticklabels(['$\dfrac{%d}{%d}2\pi$' % (i0, n_xticks) for i0 in xticks])
    ax0.set_yticklabels([])
    ax0.set_ylim(0, np.pi)
    tdata = tuse.values
    im = ax0.pcolor(tuse.columns.values, tuse.index.values, tdata, 
                    cmap=plt.get_cmap('Set2', np.nanmax(tdata)+1), 
                    vmin=np.nanmin(tdata)-.5, vmax=np.nanmax(tdata)+.5)
    ticks = np.arange(np.nanmin(tdata), np.nanmax(tdata)+1)
    fig.colorbar(im, ax=ax0, orientation='vertical', ticks=ticks).ax.tick_params(labelsize=fontsize)

In [257]:
np.around(np.pi, 3)


Out[257]:
3.142

In [239]:
from sklearn.cluster import KMeans
from sklearn.mixture import GaussianMixture

use_data = np.hstack((np.vstack(theta_primary_fre_list)[:, 1:], 
                      np.vstack(phi_primary_fre_list)[:, 1:]))
#KMeans
km = KMeans(n_clusters=6, n_init=10, max_iter=1000, tol=1e-9, precompute_distances=True, n_jobs=-1, random_state=0)
km.fit(use_data)
km.predict(use_data)
tlabels = km.labels_

# # personal process
# tlabels[tlabels == 4] = 3

tdata1 = pd.DataFrame({'ini_theta': np.around(ini_theta_list, 3), 
                      'ini_phi': np.around(ini_phi_list, 3), 
                      'lst_eta': np.around(lst_eta_list, 3), 
                      'use_fre': tlabels, 
                      'data_idx': idx_list })
tdata1 = tdata1.pivot_table(index=['ini_theta'], columns=['ini_phi'])
show_phase_map(tdata1.use_fre)



In [250]:
np.array(ini_theta_list)[tlabels==show_tlabel]


Out[250]:
array([0.81955, 0.40977, 2.18546, 0.81955, 0.68295, 0.54636, 0.81955, 1.77568, 2.59523,
       2.59523, 1.5025 , 2.86841, 0.13659, 2.04887, 2.04887, 1.5025 , 1.77568, 2.59523,
       0.95614, 0.40977, 0.81955, 0.40977, 2.04887, 1.77568, 1.63909, 0.13659, 1.77568,
       1.36591, 1.63909, 1.36591, 1.77568, 2.32205, 3.005  , 2.32205, 0.54636, 2.32205,
       1.36591, 3.14159, 2.18546, 3.005  , 0.81955, 2.73182, 2.04887, 1.09273, 3.14159,
       2.86841, 0.27318, 1.77568, 2.18546, 0.27318, 3.14159, 2.73182, 1.5025 , 0.54636,
       1.36591, 1.5025 , 2.45864, 1.63909, 3.005  , 0.95614, 1.36591, 2.59523, 1.77568,
       0.81955, 1.63909, 2.18546, 2.04887, 0.54636, 0.40977, 0.13659, 1.63909, 2.18546,
       2.18546, 0.40977, 1.22932, 2.73182, 1.77568, 2.32205, 3.14159, 1.09273, 0.27318,
       2.59523, 1.36591, 1.36591, 3.005  , 2.18546, 2.59523, 2.45864, 0.40977, 1.09273,
       2.59523, 1.77568, 2.45864, 1.5025 , 0.27318, 1.63909, 2.04887, 0.95614, 2.45864,
       0.68295, 1.36591, 1.36591, 2.59523, 1.22932, 2.32205, 2.59523, 2.45864, 2.86841,
       0.54636, 2.45864, 2.86841, 2.32205, 1.77568, 1.22932, 1.22932, 2.73182, 2.86841,
       0.54636, 0.54636, 2.86841, 2.86841, 1.22932, 1.5025 , 2.73182, 1.36591, 1.5025 ,
       1.36591, 2.59523, 1.63909, 0.40977, 0.81955, 1.77568, 0.68295, 0.27318, 1.77568,
       0.68295, 1.36591, 0.40977, 0.95614, 1.36591, 0.54636, 2.32205, 0.27318, 2.45864,
       1.36591, 0.81955, 0.68295, 1.22932, 3.14159, 2.04887, 1.09273, 0.13659, 0.95614,
       3.005  , 2.18546, 2.32205, 0.40977, 0.95614, 2.73182, 0.13659, 1.5025 , 2.45864,
       0.13659, 2.04887, 0.68295, 2.18546, 1.77568, 0.40977, 0.54636, 0.13659, 1.5025 ,
       0.95614, 0.95614, 1.36591, 0.40977, 0.81955, 0.95614, 1.77568, 2.86841, 0.68295,
       0.27318, 0.68295, 2.32205, 0.27318, 0.13659, 0.54636, 0.27318, 1.36591, 1.91227,
       2.73182, 2.18546, 2.59523, 3.14159, 3.14159, 2.32205, 2.04887, 0.40977, 2.59523,
       3.14159, 1.5025 , 2.59523, 3.005  , 0.54636, 2.18546, 0.13659, 0.68295, 2.86841,
       3.005  , 2.73182, 2.73182, 3.005  , 0.95614, 1.5025 , 2.32205, 1.77568, 3.14159,
       2.45864, 0.81955, 0.68295, 3.005  , 1.91227, 2.86841, 0.54636, 1.36591, 1.91227,
       1.63909, 0.54636, 0.95614, 2.73182, 0.68295, 1.36591, 2.18546, 3.14159])

In [251]:
importlib.reload(spf_tb)
show_tlabel = 0

for theta, phi in zip(np.array(ini_theta_list)[tlabels==show_tlabel][:10], 
                         np.array(ini_phi_list)[tlabels==show_tlabel][:10]): 
    spf_tb.show_pickle_results(job_dir, theta, phi, table_name, fast_mode=1)


-ini_theta 0.819546 -ini_phi 1.604218 -ini_psi 0.000000
-ini_theta 0.409773 -ini_phi 0.133685 -ini_psi 0.000000
-ini_theta 2.185456 -ini_phi 0.534739 -ini_psi 0.000000
-ini_theta 0.819546 -ini_phi 2.540011 -ini_psi 0.000000
-ini_theta 0.682955 -ini_phi 0.133685 -ini_psi 0.000000
-ini_theta 0.546364 -ini_phi 0.534739 -ini_psi 0.000000
-ini_theta 0.819546 -ini_phi 0.133685 -ini_psi 0.000000
-ini_theta 1.775683 -ini_phi 0.935794 -ini_psi 0.000000
-ini_theta 2.595229 -ini_phi 0.267370 -ini_psi 0.000000
-ini_theta 2.595229 -ini_phi 0.133685 -ini_psi 0.000000

In [241]:
importlib.reload(spf_tb)

for show_tlabel in np.arange(tlabels.max()+1): 
    theta = np.array(ini_theta_list)[tlabels==show_tlabel][0]
    phi = np.array(ini_phi_list)[tlabels==show_tlabel][0]
    spf_tb.show_pickle_results(job_dir, theta, phi, table_name, fast_mode=2)


-ini_theta 0.819546 -ini_phi 1.604218 -ini_psi 0.000000
-ini_theta 3.005002 -ini_phi 0.401054 -ini_psi 0.000000
-ini_theta 1.639092 -ini_phi 0.267370 -ini_psi 0.000000
-ini_theta 3.141592 -ini_phi 0.334212 -ini_psi 0.000000
-ini_theta 2.595229 -ini_phi 2.807381 -ini_psi 0.000000
-ini_theta 2.458638 -ini_phi 3.074750 -ini_psi 0.000000

In [ ]:
tlabels=