iam-git / WellMet (public) (License: MIT) (since 2021-08-31) (hash sha1)
WellMet is pure Python framework for spatial structural reliability analysis. Or, more specifically, for "failure probability estimation and detection of failure surfaces by adaptive sequential decomposition of the design domain".
List of commits:
Subject Hash Author Date (UTC)
stm_df: finish get_tri_data_frame() 454bd2725a75f5a3f3851998693c4f85630fb30b I am 2021-01-22 20:43:36
stm_df: WIP bd99b8f3b8623a65c0bf0e3c22d9e67d8bce6a2c Alex 2021-01-21 15:27:11
stm_df: WIP f61a963c04764066bdd2bb9a363c51ec1c4fb389 Alex 2021-01-18 10:01:23
dicebox.Chrt: add design support 7426717fe5b3bbf299e44a92b2aca2672b752042 Alex 2021-01-15 09:30:28
design_proof_of_concept a1c9fc6ce6739e745382bdc1bfc6183a8c2a2f16 Alex 2021-01-14 22:58:01
estimation: rework simplex estimations, add cubature and design support 01dc64d5fa9afeda8326b90a71af71ede46fd8f8 Alex 2021-01-14 21:41:12
simplex.Triangulation: WIP 44bdae7876aac717f3d34c4bc6c818fc4ec65169 Alex 2021-01-13 10:43:59
simplex.Triangulation: WIP 47fe5e817878bc6bfd43db208d256a60ee573f9c Alex 2021-01-12 15:41:32
simplex.Triangulation: WIP 57f90b4ae9608d3f2fb5bc081934fa17523998f5 Alex 2021-01-10 11:12:30
simplex.get_failure_ratio() added 65e2940cfa549236cfb09a0e7cadb576a471070f Alex 2021-01-09 09:40:12
simplex.Shull: design support added fe2c0c6b23b32ce99aaa0f824424b32694978615 Alex 2021-01-07 14:22:58
IS_stat: add IS_norm() method 6d1d11c4591143a26c92551ec3f722ea642711ae Alex 2021-01-07 05:33:21
misc: add comment 3d735585d49ac9d5f831b860cf95d3f41fd0d93e I am 2021-01-04 10:29:24
stm_df added (as is for now) 55402101bfabf4b9fe7d70fbd8f1469aea401bc7 Alex 2020-12-26 01:26:17
qt_plot.Isocurves: Isocurves-isolevels reworked 330b3387cfe46f75be6bf70f41c3f289303bdba2 I am 2020-12-23 02:36:39
qt_plot.Isocurves: infs issue fix 276a727723579be523e43b9748b7d36f6d151b0d I am 2020-12-18 00:14:14
qt_plot.Isocurves: extendEdge fix (there was an issue in P and U) 6a836879cc5d280862f4534dc824be86d34bfb4c I am 2020-12-17 23:49:44
qt_plot.Isocurves: bias fix 7c13581235e8e1bac726381b22db46057d1ac188 I am 2020-12-17 14:42:39
qt_plot: Isocurves nan check added + simplex error graph committed (as is) 3b2882661f7af4bb51e518bcd3a37dba6c67f7b2 I am 2020-12-17 03:55:44
f_models.Nataf: little clean up d2b0bba458847b7ef42cf68174311847d438bc84 I am 2020-12-17 03:19:35
Commit 454bd2725a75f5a3f3851998693c4f85630fb30b - stm_df: finish get_tri_data_frame()
Author: I am
Author date (UTC): 2021-01-22 20:43
Committer name: I am
Committer date (UTC): 2021-01-22 20:43
Parent(s): bd99b8f3b8623a65c0bf0e3c22d9e67d8bce6a2c
Signer:
Signing key:
Signing status: N
Tree: 4a70c378e975cfd1c18d684a2fa3422cee5cd7bc
File Lines added Lines deleted
stm_df.py 37 21
File stm_df.py changed (mode: 100644) (index 1ba1166..b1c9dca)
... ... def proxy(dice_box, nsim):
52 52 #č pandas není vhodný pro strukturována data #č pandas není vhodný pro strukturována data
53 53 #č (možná aj strukturování není úplně na místě), #č (možná aj strukturování není úplně na místě),
54 54 #č ale exportovat do Excelčíku se mi taky chce #č ale exportovat do Excelčíku se mi taky chce
55 def get_tri_data_frame(dice_box, sources=['box', 'user'], apply_proxy=None):
56 #č nejdřív proxy. None znamená podle přitomosti
57 if apply_proxy is None:
58 if hasattr(dice_box, 'proxy'):
59 apply_proxy = True
60 else:
61 apply_proxy = False
55 def get_tri_data_frame(dice_box, sources=['box', 'user'], apply_proxy=False):
56
57 #č přeneseme rozhodování do volajícího kódu
58 # #č nejdřív proxy. None znamená podle přitomosti
59 # if apply_proxy is None:
60 # if hasattr(dice_box, 'proxy'):
61 # apply_proxy = True
62 # else:
63 # apply_proxy = False
62 64
63 65 #č teď zdroje (zjednodušeně). Zatím netřeba nic komplikovat #č teď zdroje (zjednodušeně). Zatím netřeba nic komplikovat
64 66 #č po těch pomocných funkcích budu chtit df s nastaveným index=nsim #č po těch pomocných funkcích budu chtit df s nastaveným index=nsim
65 67 #č a sloupcem nsim (ten je spíš pro nás, lidé). proxy nemají řešit #č a sloupcem nsim (ten je spíš pro nás, lidé). proxy nemají řešit
66 if 'box' in sources:
67 df_box = get_tri_box_df(dice_box)
68
69 #č je tu fakt velkej bordel s těmi odhadama
70 #č to jistě budu muset překopávat
71 tri_box_estimator = 'TRI_overall_estimations'
72 if ('box' in sources) and (tri_box_estimator in dice_box.guessbox.estimations):
73 df_box = get_tri_box_df(dice_box, tri_box_estimator)
68 74 else: #č pak nakrmíme pd.concat'u else: #č pak nakrmíme pd.concat'u
69 75 df_box = None df_box = None
70 76
 
... ... def get_tri_data_frame(dice_box, sources=['box', 'user'], apply_proxy=None):
79 85
80 86 #č pak deduplicate #č pak deduplicate
81 87 #č (aby se převzaly odhady se stejným nsim z posledního zdroje) #č (aby se převzaly odhady se stejným nsim z posledního zdroje)
82 #group by last
88 df = df.groupby(level=0).last()
83 89
84 90 #č dale vytřídíme odhady dle nsim #č dale vytřídíme odhady dle nsim
85 91 df.sort_values('nsim', inplace=True) df.sort_values('nsim', inplace=True)
86 92
87 93 #č pokud použiváme proxy, tak je vložit, vyhodit ďupy, nahradit index #č pokud použiváme proxy, tak je vložit, vyhodit ďupy, nahradit index
88
94 if apply_proxy:
95 #č teoreticky index a nsim musejí bejt stejné
96 nsim = df.index
97 nsim_proxy = proxy(dice_box, nsim)
98 #č oboje nsim a nsim_proxy jsou pro lide, aby zahrivalo srdce
99 #č předpokladá se, že volající kód bude použivat index
100 df.insert(loc=0, column='nsim (proxy)', value=nsim_proxy)
101 df.index = nsim_proxy
102
89 103 #č když ne - tak jenom nahradíme index a vypadneme otsuď #č když ne - tak jenom nahradíme index a vypadneme otsuď
104 #č Alexi, co? vždyť ten index už nemusíme řešit, ten musí bejt v pořádku!
105
106 #č vemte ten svůj pitomej rám
107 #č a na shledanou!
108 return df
109
110
90 111
91 112
92
93 df.insert(loc=0, column='nsim', value=tuple(tri_estimation.keys()), allow_duplicates=False)
94
95
96
97
98 113
99 114 def get_tri_box_df(dice_box, tri_estimation_name='TRI_overall_estimations'): def get_tri_box_df(dice_box, tri_estimation_name='TRI_overall_estimations'):
100 115 #č chyby nechť chytá volající kód! #č chyby nechť chytá volající kód!
101 data = dice_box.guessbox.estimations[self.tri_estimation_name]
116 data = dice_box.guessbox.estimations[tri_estimation_name]
102 117 nsim, tri_data = data nsim, tri_data = data
103 118 # it can be effectively done with pandas # it can be effectively done with pandas
104 119 self.df = df = pd.DataFrame(tri_data, index=nsim) self.df = df = pd.DataFrame(tri_data, index=nsim)
 
... ... def get_tri_box_df(dice_box, tri_estimation_name='TRI_overall_estimations'):
128 143
129 144
130 145 def get_tri_user_df(dice_box): def get_tri_user_df(dice_box):
131 metrics = ('TRI_estimation', \
132 'vertex_estimation', 'weighted_vertex_estimation')
146 metrics = ['TRI_estimation', \
147 'vertex_estimation', 'weighted_vertex_estimation']
133 148
134 149 metadict = dict() metadict = dict()
135 150 for metric in metrics: for metric in metrics:
 
... ... def get_tri_user_df(dice_box):
148 163 if metric in estimation: if metric in estimation:
149 164 metadict[metric][nsim] = estimation[metric] metadict[metric][nsim] = estimation[metric]
150 165
151 tri_estimation = metadict.pop('TRI_estimation')
166 #č vytahneme 'TRI_estimation' z metrik aj ze slovníku
167 tri_estimation = metadict.pop(metrics.pop(0)) # ==
152 168 #č zda se, že zde nic nehodí chybu, aj kdyby žádné odhady nebyly #č zda se, že zde nic nehodí chybu, aj kdyby žádné odhady nebyly
153 169 nsim = tuple(tri_estimation.keys()) nsim = tuple(tri_estimation.keys())
154 170 # it can be effectively done with pandas # it can be effectively done with pandas
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/iam-git/WellMet

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/iam-git/WellMet

Clone this repository using git:
git clone git://git.rocketgit.com/user/iam-git/WellMet

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main