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)
qt_plot.SimpleSimplexEstimationGraph: proxy support is ready 58e1c80eb227cc174aac2e8ecae7e741ce951060 I am 2020-11-05 04:47:24
qt_plot.SimpleSimplexEstimationGraph: export to excel is enabled 8590bf8910466f3fa4cac3d013add2688151e96c I am 2020-11-05 01:34:38
qt_plot.SimpleSimplexEstimationGraph: WIP, aspoň teď něco kreslí... a5ea95acfd15369943cd8bc132281322ccf7c1f1 I am 2020-11-05 00:16:19
qt_plot.SimpleSimplexEstimationGraph: WIP f31cd7aad0e351ef7dafcf9d1326d3221c8a9833 I am 2020-11-04 05:37:16
qt_plot.SimpleSimplexEstimationGraph: no more that unbearable colors! 4f4211e8d0c242f5aa06bbab42d8b360078cee38 I am 2020-11-04 04:29:34
qt_plot: add progress dialog ba5f738745100fbbb4b657910fed610e61039ee0 I am 2020-11-04 03:34:21
qt_plot:TriEstimationGraph: WIP 58d98e0775b55bda449c4c7b7e7eac1a2f573097 I am 2020-11-04 02:32:37
plot: messages fix 336481a61c2d8ac302437b65f641c7d39767c7ea I am 2020-11-04 02:32:08
plot: no more that annoying error message 3929e09841abea504e152935bb6009a57eb8f7a9 I am 2020-11-04 01:24:50
qt_plot.SimpleSimplexEstimationGraph: context menu reworked 28eed9a1b3dad2e3d4441383640e83312c7fac9c I am 2020-11-04 01:13:14
qt_plot: start in box's tri_space by default 909b86f0cb63713bbc02028e93cfbbea1f53071c I am 2020-11-03 19:40:34
qt_plot: ConvexHull2D added bc95406166c081db1df39c60099b908bf24aa16e I am 2020-11-03 19:33:28
dicebox.Chrt.assess_candidates: hračky s hustotama 0fa8f1fe51cebbca7010f3c8cda13525dfbb8fd6 I am 2020-11-03 03:38:52
dicebox: get_pf_estimations() fix 6eda04f0abf77b2586b599dd72c82e438464be4d I am 2020-11-03 02:21:37
dicebox: Erjee class added ef1a9e5b9c0de5d842e2580d3fe7c669d68d95f5 I am 2020-11-03 01:16:04
dicebox.Chrt: .get_pf_estimation() added 7b6685587ad2d7922ae12520c9aede226febe219 I am 2020-10-27 16:05:32
simplex.Shull: нельзя так просто взять и написать IS интегровалку 128ee86c97c82e555fb8b94a90eaa071f873737a I am 2020-10-27 16:03:07
simplex.Shull: move sball sampling distribution to the conter of convex_hull 5703fa4c8e4e70965040e9381cf888220ac543dc I am 2020-10-26 21:03:34
gl_plot: show first 3 dims of nD problems eedca2d89211340a8c2f1131b35c83c65f8f3bc7 Alex 2020-10-26 18:38:21
dicebox.Chrt: explore .convex_hull for gl_plot f2b7777c01638a72b8ca3b38aa3d75bfd55bbdc0 Alex 2020-10-26 18:37:17
Commit 58e1c80eb227cc174aac2e8ecae7e741ce951060 - qt_plot.SimpleSimplexEstimationGraph: proxy support is ready
Author: I am
Author date (UTC): 2020-11-05 04:47
Committer name: I am
Committer date (UTC): 2020-11-05 04:47
Parent(s): 8590bf8910466f3fa4cac3d013add2688151e96c
Signer:
Signing key:
Signing status: N
Tree: dd85e51a5bc71095f39693d92ad1a22f580e86ac
File Lines added Lines deleted
qt_plot.py 70 45
File qt_plot.py changed (mode: 100644) (index a9da129..507ec82)
... ... def get_estimation_data(estimations, metric):
861 861 # pokud nemá - je třeba jej prostě opravit # pokud nemá - je třeba jej prostě opravit
862 862 nsim = estimation['nsim'] nsim = estimation['nsim']
863 863 try: try:
864 if estimation[metric] > 0:
865 metric_dict[nsim] = estimation[metric]
864 metric_dict[nsim] = estimation[metric]
866 865 except KeyError as e: except KeyError as e:
867 866 pass #print(self.__class__.__name__ + ":", repr(e)) pass #print(self.__class__.__name__ + ":", repr(e))
868 867
 
... ... class SimpleSimplexEstimationGraph(pg.PlotWidget):
965 964 x = y = () # zde jen vytvoříme kostru, nakrmime daty v .redraw() x = y = () # zde jen vytvoříme kostru, nakrmime daty v .redraw()
966 965
967 966 #xkcd_green = (167, 255, 181) # xkcd:light seafoam green #a7ffb5 #xkcd_green = (167, 255, 181) # xkcd:light seafoam green #a7ffb5
968 green = (0, 255, 38, 64)
967 green = (0, 255, 38, 96)
969 968 #xkcd_red = (253, 193, 197) # xkcd: pale rose (#fdc1c5) #xkcd_red = (253, 193, 197) # xkcd: pale rose (#fdc1c5)
970 red = (253, 0, 17, 64)
969 red = (253, 0, 17, 96)
971 970 #xkcd_cream = (255, 243, 154) # let's try xkcd: dark cream (#fff39a) #xkcd_cream = (255, 243, 154) # let's try xkcd: dark cream (#fff39a)
972 cream = (255, 221, 0, 64)
973 grey = (196, 196, 196, 64)
971 cream = (255, 221, 0, 96)
972 grey = (196, 196, 196, 96)
974 973
975 974 self.pen_f = self.plot(x, y, brush=red)#, name="failure domain estimation") self.pen_f = self.plot(x, y, brush=red)#, name="failure domain estimation")
976 975 self.pen_f.setZValue(-100) self.pen_f.setZValue(-100)
 
... ... class SimpleSimplexEstimationGraph(pg.PlotWidget):
993 992 self.fill_outside.setZValue(-100) self.fill_outside.setZValue(-100)
994 993 self.addItem(self.fill_outside) self.addItem(self.fill_outside)
995 994
996
995 self.one_ruler = self.addLine(y=1, pen='k')
996 self.zero_ruler = self.addLine(y=0, pen='k')
997 997
998 pen = pg.mkPen(color='c', width=2)
999 self.pen_vertex = self.plot(x, y, pen=pen, name="simple pf estimation")
1000 pen = pg.mkPen(color=(170, 170, 255), width=2)
1001 self.pen_weighted_vertex = self.plot(x, y, pen=pen, name="weighted pf estimation")
998
1002 999 try: try:
1003 1000 exact_name = self.dice_box.pf_exact_method exact_name = self.dice_box.pf_exact_method
1004 pen = pg.mkPen(color='b', width=2) # blue
1001 pen = pg.mkPen(color='b', width=1.5) # blue
1005 1002 self.pen_exact = self.addLine(y=self.dice_box.pf_exact, pen=pen, name=exact_name) self.pen_exact = self.addLine(y=self.dice_box.pf_exact, pen=pen, name=exact_name)
1006 1003 except: except:
1007 1004 pass pass
1008 1005
1009 self.one_ruler = self.addLine(y=1, pen='k')
1010 self.zero_ruler = self.addLine(y=0, pen='k')
1006 pen = pg.mkPen(color='m', width=2)
1007 self.pen_vertex = self.plot(x, y, pen=pen, name="simple pf estimation")
1008 pen = pg.mkPen(color='r', width=2) #(118, 187, 255)
1009 self.pen_weighted_vertex = self.plot(x, y, pen=pen, name="weighted pf estimation")
1011 1010
1012 1011
1013 1012
 
... ... class SimpleSimplexEstimationGraph(pg.PlotWidget):
1021 1020 except: except:
1022 1021 pass pass
1023 1022 self.setLogMode(y=True) self.setLogMode(y=True)
1024 self.pen_f.setPen(pg.mkPen(color=(255, 0, 0), width=3)) #, style=QtCore.Qt.DashLine)
1023 #self.pen_f.setPen(pg.mkPen(color=(255, 0, 0), width=3)) #, style=QtCore.Qt.DashLine)
1024 self.pen_f.setPen(None)
1025 1025 self.pen_f.setFillLevel(None) self.pen_f.setFillLevel(None)
1026 1026 self.pen_success.setFillLevel(0) self.pen_success.setFillLevel(0)
1027 1027
 
... ... class SimpleSimplexEstimationGraph(pg.PlotWidget):
1049 1049 else: else:
1050 1050 return data return data
1051 1051
1052 def proxy(self, nsim):
1053 if self.proxy_chk.isChecked():
1054 proxy = self.dice_box.proxy
1055 index = np.array(nsim)-1
1056 #č indexy musíme o jedničku změnšit
1057 #č výsledek nikoliv. Takže v cajku.
1058 return np.cumsum(~proxy)[index]
1059 else:
1060 return nsim
1061
1062
1052 1063
1053 1064 def redraw(self): def redraw(self):
1054 1065 xmin = np.inf xmin = np.inf
 
... ... class SimpleSimplexEstimationGraph(pg.PlotWidget):
1075 1086 except KeyError as e: except KeyError as e:
1076 1087 pass #print(self.__class__.__name__ + ":", repr(e)) pass #print(self.__class__.__name__ + ":", repr(e))
1077 1088
1089 #č neotravuj uživatele chybovejma hlaškama
1090 if tri_estimation:
1091 # it can be effectively done with pandas
1092 self.df = df = pd.DataFrame(tuple(tri_estimation.values()))
1093 # -1 = 'out', 0=success, 1=failure, 2=mix
1094 df.rename(columns={-1:'out', 0:'success', 1:'failure', 2:'mix'}, inplace=True)
1095 df.insert(loc=0, column='nsim', value=tuple(tri_estimation.keys()), allow_duplicates=False)
1096 df.sort_values('nsim', inplace=True)
1097 nsim = df.nsim.to_numpy()
1078 1098
1079 # it can be effectively done with pandas
1080 self.df = df = pd.DataFrame(tuple(tri_estimation.values()))
1081 # -1 = 'out', 0=success, 1=failure, 2=mix
1082 df.rename(columns={-1:'out', 0:'success', 1:'failure', 2:'mix'}, inplace=True)
1083 df.insert(loc=0, column='x', value=tuple(tri_estimation.keys()), allow_duplicates=False)
1084 df.sort_values('x', inplace=True)
1085 x = df.x.to_numpy()
1099 if self.proxy_chk.isChecked():
1100 x = self.proxy(nsim)
1101 df.insert(loc=0, column='nsim (proxy)', value=x)
1102 else:
1103 x = nsim
1104
1105 self.pen_f.setData(x, self.zerosafe(df.failure))
1106 self.pen_outmix.setData(x, self.zerosafe(df.failure+df.mix))
1107 self.pen_success.setData(x, self.zerosafe(df.failure+df.mix+df.out))
1086 1108
1087 if self.log_y_chk.isChecked():
1088 # Update the data
1089 # když se někde objeví nula se zapnutým LogModem - qtpygraph hned spadne a není možne ten pad zachytit
1090 def nonzero(data): return np.where(data > 0, data, 1)
1091 self.pen_f.setData(x, nonzero(df.failure))
1092 self.pen_outmix.setData(x, nonzero(df.failure+df.mix))
1093 self.pen_success.setData(x, nonzero(df.failure+df.mix+df.out))
1094 else:
1095 # Update the data
1096 self.pen_f.setData(x, df.failure)
1097 self.pen_outmix.setData(x, df.failure+df.mix)
1098 self.pen_success.setData(x, df.failure+df.mix+df.out)
1109 nsim, y = get_estimation_data(self.dice_box.estimations, 'vertex_estimation')
1110 df['vertex_estimation'] = y #č spolehám na konzistenci odhadů (ne úplně)
1111 self.pen_vertex.setData(self.proxy(nsim), self.zerosafe(y))
1099 1112
1100 self.pen_vertex.setData(*get_estimation_data(self.dice_box.estimations, 'vertex_estimation'))
1101 self.pen_weighted_vertex.setData(*get_estimation_data(self.dice_box.estimations, 'weighted_vertex_estimation'))
1102
1113 nsim, y = get_estimation_data(self.dice_box.estimations, 'weighted_vertex_estimation')
1114 df['weighted_vertex_estimation'] = y #č spolehám na konzistenci odhadů (ne úplně)
1115 self.pen_weighted_vertex.setData(self.proxy(nsim), self.zerosafe(y))
1103 1116
1117
1104 1118 except BaseException as e: except BaseException as e:
1105 1119 print(self.__class__.__name__ + ":", repr(e)) print(self.__class__.__name__ + ":", repr(e))
1106 1120
 
... ... class TriEstimationGraph(SimpleSimplexEstimationGraph):
1116 1130 def redraw(self): def redraw(self):
1117 1131 try: # тут всё что угодно может пойти не так try: # тут всё что угодно может пойти не так
1118 1132 data = self.dice_box.guessbox.estimations[self.tri_estimation_name] data = self.dice_box.guessbox.estimations[self.tri_estimation_name]
1119 x = data[0]
1133 nsim, tri_data = data
1120 1134 # it can be effectively done with pandas # it can be effectively done with pandas
1121 self.df = df = pd.DataFrame(data[1])
1135 self.df = df = pd.DataFrame(tri_data)
1122 1136 # -1 = 'out', 0=success, 1=failure, 2=mix # -1 = 'out', 0=success, 1=failure, 2=mix
1123 1137 df.rename(columns={-1:'out', 0:'success', 1:'failure', 2:'mix'}, inplace=True) df.rename(columns={-1:'out', 0:'success', 1:'failure', 2:'mix'}, inplace=True)
1124
1125 # Update the data
1126 1138
1139 df.insert(loc=0, column='nsim', value=nsim)
1140 if self.proxy_chk.isChecked():
1141 x = self.proxy(nsim)
1142 df.insert(loc=0, column='nsim (proxy)', value=x)
1143 else:
1144 x = nsim
1145
1146
1147 # Update the data
1127 1148 self.pen_f.setData(x, self.zerosafe(df.failure)) self.pen_f.setData(x, self.zerosafe(df.failure))
1128 1149 self.pen_outmix.setData(x, self.zerosafe(df.failure+df.mix)) self.pen_outmix.setData(x, self.zerosafe(df.failure+df.mix))
1129 1150 self.pen_success.setData(x, self.zerosafe(df.failure+df.mix+df.out)) self.pen_success.setData(x, self.zerosafe(df.failure+df.mix+df.out))
1130 1151
1131 1152 if 'vertex_estimation' in self.dice_box.guessbox.estimations: if 'vertex_estimation' in self.dice_box.guessbox.estimations:
1132 1153 data = self.dice_box.guessbox.estimations['vertex_estimation'] data = self.dice_box.guessbox.estimations['vertex_estimation']
1133 x, y = (*data,)
1154 nsim, y = data
1134 1155 # Update the data # Update the data
1135 self.pen_vertex.setData(x, self.zerosafe(np.array(y)))
1156 #č spolehám na konzistenci blackboxu, ne však úplně
1157 self.pen_vertex.setData(self.proxy(nsim), self.zerosafe(np.array(y)))
1158 df['vertex_estimation'] = y
1136 1159
1137 1160 if 'weighted_vertex_estimation' in self.dice_box.guessbox.estimations: if 'weighted_vertex_estimation' in self.dice_box.guessbox.estimations:
1138 1161 data = self.dice_box.guessbox.estimations['weighted_vertex_estimation'] data = self.dice_box.guessbox.estimations['weighted_vertex_estimation']
1139 x, y = (*data,)
1162 nsim, y = data
1140 1163 # Update the data # Update the data
1141 self.pen_weighted_vertex.setData(x, self.zerosafe(np.array(y)))
1164 #č spolehám na konzistenci blackboxu, ne však úplně
1165 self.pen_weighted_vertex.setData(self.proxy(nsim), self.zerosafe(np.array(y)))
1166 df['weighted_vertex_estimation'] = y
1142 1167
1143 1168
1144 1169
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