-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathSimuResultProcs_V0.py
More file actions
executable file
·79 lines (62 loc) · 2.01 KB
/
Copy pathSimuResultProcs_V0.py
File metadata and controls
executable file
·79 lines (62 loc) · 2.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed May 13 22:49:07 2020
@author: el
"""
import sys
import os
import xml.etree.ElementTree as ET
import numpy as np
import pandas as pd
import matplotlib as mpl
import matplotlib.pyplot as plt
import seaborn as sns
import datetime as dt
import os
import itertools
import io
pd.set_option('max_columns', 7)
#%% pathounet
data_path='/home/el/Codes/Porchet-GPR/OUTdtrou30_rtrou4_tr5.0/OUTdtrou30_rtrou4_tr5.0/'
X_path='/home/el/Codes/Porchet-GPR/'
hehe=os.getcwd()
if(hehe==X_path):
print('HEHEHE on est bon')
else:
os.chdir(X_path)
#%% Reading the folder names
fname=next(os.walk(data_path))[1]
#%% pour chaque sous folder, on lit le fichier Params
#s = "Param(a=1, b=2)"
lst=[]
for ii in fname:
s = io.open('./OUTdtrou30_rtrou4_tr5.0/OUTdtrou30_rtrou4_tr5.0/'+ii+'/Parameters').read()
temp=(s[9:-4]).split('=')
temp3=','.join(temp)
temp2=temp3.split(',')
try:
ss = io.open('./OUTdtrou30_rtrou4_tr5.0/OUTdtrou30_rtrou4_tr5.0/'+ii+'/TWT').read()
temp=(ss[1:-4]).split('\n')
temp3=' '.join(temp)
#temp2=temp3.split(',')
bibi=0
except:
bibi=1
lst.append([float(temp2[1]),float(temp2[3]),float(temp2[5]),float(temp2[7]),float(temp2[9]),float(temp2[11]),bibi])
df_params=pd.DataFrame(lst,columns=['tr','ti','ts','n','alpha','Ks','Converged'])
#%%
ss = io.open('./OUTdtrou30_rtrou4_tr5.0/OUTdtrou30_rtrou4_tr5.0/ts0.4_ti0.09_tr0.03_n9.75_alpha0.09999999999999999_Ks0.21000000000000002/TWT').read()
#%% seqborn
# plt.close('all')
# f1, ax1= plt.subplots(1,1,figsize=(25,15))
# sns.set(style="whitegrid")
#g = sns.PairGrid(df_params, diag_sharey=False)
#g.map_upper(sns.scatterplot)
#g.map_lower(sns.scatterplot)
#g.map_lower(sns.kdeplot, colors="C0")
#g.map_diag(sns.distplot,kde=False)
plt.close('all')
#f1, ax1= plt.subplots(1,1,figsize=(25,15))
sns.set(style="ticks")
sns.pairplot(df_params.loc[:,['n','alpha','Ks','ts','ti','Converged']], hue="Converged", markers=["s", "D"])