forked from asaintenoy/Porchet-GPR
-
Notifications
You must be signed in to change notification settings - Fork 0
/
SimuResultProcs_V0.py
executable file
·65 lines (50 loc) · 1.51 KB
/
SimuResultProcs_V0.py
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
#!/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)"
df_params=pd.DataFrame(columns=['tr','ti','ts','n','alpha','Ks'])
lst=[]
for ii in fname:
s = io.open('./OUTdtrou30_rtrou4_tr5.0/OUTdtrou30_rtrou4_tr5.0/'+ii+'/Parameters').read()
#eval(s,{'ParamMVG(tr':tr})
temp=(s[9:-4]).split('=')
temp3=','.join(temp)
temp2=temp3.split(',')
lst.append([float(temp2[1]),float(temp2[3]),float(temp2[5]),float(temp2[7]),float(temp2[9]),float(temp2[11])])
df_params=pd.DataFrame(lst,columns=['tr','ti','ts','n','alpha','Ks'])
#%% 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)