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_gui.qt_graph_widgets: update x range when box runned c52052a9c3f6926d03e8c39f7642aa0a8864fdc3 I am 2022-12-13 10:23:45
qt_gui.qt_graph_widgets.EstimationGraph: add outside and mixed lines df6c06e4287492855d613b1ae46edfca6a4757d3 I am 2022-12-12 06:13:55
qt_gui: replace old copypaste by cleaned up EstimationGraph 515d0d8a892984f8a7667da874972daff3318d74 I am 2022-12-12 05:36:43
qt_gui: prepare new BoxEstimationData class; rework ErrorGraph 37387100715f980771a8a37f99eec3e723759cd3 I am 2022-12-11 23:17:06
dicebox.circumtri: replace ndim by nvar to make TriEstimation pandas-friendly 0824222ae4c9c1f3fede971481816ed9ded9707a I am 2022-12-11 23:14:05
step back: introduce box_estimations, keep "estimations" for user ones dde983d57423e28083980cbae05f0a81fc8311e6 I am 2022-12-10 03:54:09
simplex.BetterCubatureIntegration: hotfix f8a607e5d60c591eb81037010717519c1fe6e993 I am 2022-12-08 00:29:57
qt_gui.qt_gui: add EstimationTableWidget bb44fc8a056ed90906c217cfc95f7cabc6ef71eb I am 2022-12-07 23:17:42
remove deprecated never used Plotly code d42ebb3535e4736a1e9fdb84c8d6dae633c83a33 I am 2022-12-07 15:03:51
dicebox.circumtri.CircumTri: enable estimations 4fe25ad47d71b1fd19fe00ad03d9b320b8c8614c I am 2022-12-07 14:30:46
dicebox: introduce new clean experimental CircumTri box aca3e971212590a59e9d07a3ff1aa952d02a848b I am 2022-12-07 04:19:55
simplex.Triangulation: keep locally pdfs and failsi, send tuple on simplex invalidation d2885ce44585e22294f9940159d6313642164f4c I am 2022-12-07 04:14:05
convex_hull.QHull: manual update() fix 5ccff702b9920c7525c88d306f2300cd43b2e76b I am 2022-12-07 04:02:39
simplex: implement BetterCubatureIntegration 88b14adc4423f0587bd51bed06e74ce6d0d60bd1 I am 2022-12-05 22:20:31
convex_hull.BrickHull: add get_hyperplane_distances() method a use it as fallback for the Qhull 48d35c953a5cbbf739e5e838709bc00fe2f047d4 I am 2022-12-05 03:30:12
convex_hull.Qhull: add get_hyperplane_distances() method, add auto_update parameter 28aada4b79b52f58c4ad43d270be997ec6359166 I am 2022-12-04 22:49:41
move diceboxes to the dedicated drawer 31c7d30ed43f04b9469df843f909814c062adf5e I am 2022-12-04 21:27:37
reader: finally, add new Store class for the estimations 673b7daa8213807d0217089b3317674595156f6d I am 2022-12-03 17:46:22
f_models.SNorm: hotfix 5f364d1770e18d18fb810760b6207c905b551762 I am 2022-12-02 21:33:48
f_models: rewrite SNorm in lazy way. Old SNorm class renamed to SNormClassic 3b6805b2a1d0bce88960bc016bbe74bb5274810b I am 2022-12-02 21:11:37
Commit c52052a9c3f6926d03e8c39f7642aa0a8864fdc3 - qt_gui.qt_graph_widgets: update x range when box runned
Author: I am
Author date (UTC): 2022-12-13 10:23
Committer name: I am
Committer date (UTC): 2022-12-13 10:23
Parent(s): df6c06e4287492855d613b1ae46edfca6a4757d3
Signer:
Signing key:
Signing status: N
Tree: fbfe0e20480909774c94160669e63b05c23888ba
File Lines added Lines deleted
wellmet/qt_gui/qt_graph_widgets.py 49 13
File wellmet/qt_gui/qt_graph_widgets.py changed (mode: 100644) (index 6621e3e..e93e160)
... ... import pandas as pd # required for estimation graph
13 13 from .. import stm_df from .. import stm_df
14 14
15 15
16 #č nastavovaní mezí není filosofií pyqtgraph
17 #č v jejich examples byly použity pouze jednou -
18 #č v ukázce možností ViewBox.
19 #č Už vím proč - sice zoomovaní příjemnější, když graf nikam neutiká,
20 #č ale až se naraží na limity, pg začně měnit proporce,
21 #č které se už nezmění zpatky jen otačením kolečka myši.
22 #č Navíc setLimits nešikovně lame autoRange
23 def set_xlimits(plot_widget, xmin_lim, xmax_lim):
24 #č není veřejná, není ale ani soukromá. vrací [x, y]
25 x, y = plot_widget.getPlotItem().getViewBox().autoRangeEnabled()
26 plot_widget.setLimits(xMin=xmin_lim, xMax=xmax_lim)
27 if not x:
28 [[xmin, __xmax], __y_range] = plot_widget.getPlotItem().viewRange()
29 #č chcu aby x pokryval i čerstvě přidáná data
30 plot_widget.setRange(xRange=(xmin, xmax_lim), padding=0)
31
32 #č ten uvnitř volá i autoRange() na přislušných osech
33 plot_widget.enableAutoRange(x=x, y=y)
34
35
36
37 def update_xrange(plot_widget, xmax):
38 #č není veřejná, není ale ani soukromá. vrací [x, y]
39 x, y = plot_widget.getPlotItem().getViewBox().autoRangeEnabled()
40 if not x:
41 [[xmin, _xmax], __y_range] = plot_widget.getPlotItem().viewRange()
42 #č chcu aby x pokryval i čerstvě přidáná data
43 plot_widget.setRange(xRange=(xmin, max(_xmax, xmax)), padding=0)
44
45 #č ten uvnitř volá i autoRange() na přislušných osech
46 plot_widget.enableAutoRange(x=x, y=y)
47
48
49
50
16 51
17 52
18 53
 
... ... class GRaph(pg.PlotWidget):
35 70 self.clear() self.clear()
36 71 self.setBackground('w') self.setBackground('w')
37 72 #č y limita v podstatě znemožní Log y graf #č y limita v podstatě znemožní Log y graf
38 self.setLimits(xMin=-0.45)#, yMin=-0.45)
39 73 #size=self.w.px_size*1.5 #size=self.w.px_size*1.5
40 74 pos = () #np.empty((nsim, 4)) pos = () #np.empty((nsim, 4))
41 75 size = self.stream.px_size * 2 size = self.stream.px_size * 2
 
... ... class BoxEstimationData(QtCore.QObject):
214 248
215 249
216 250 class ErrorGraph(pg.PlotWidget): class ErrorGraph(pg.PlotWidget):
251
252 update_xrange = update_xrange
253
217 254 def __init__(self, pf_exact, box_data, parent=None, *args, **kwargs): def __init__(self, pf_exact, box_data, parent=None, *args, **kwargs):
218 255 super().__init__(parent, *args, **kwargs) super().__init__(parent, *args, **kwargs)
219 256
 
... ... class ErrorGraph(pg.PlotWidget):
260 297 def setup(self, *args, **kwargs): def setup(self, *args, **kwargs):
261 298 self.clear() self.clear()
262 299 self.setBackground('w') self.setBackground('w')
263 self.setLimits(xMin=-0.45)
264 300 x = y = () # zde jen vytvoříme kostru, nakrmime daty v .redraw() x = y = () # zde jen vytvoříme kostru, nakrmime daty v .redraw()
265 301
266 302 # We will use logMode by default # We will use logMode by default
 
... ... class ErrorGraph(pg.PlotWidget):
288 324 wv = (df['weighted_vertex_estimation'] - self.pf_exact).abs() wv = (df['weighted_vertex_estimation'] - self.pf_exact).abs()
289 325 self.pen_weighted_vertex.setData(wv.index.to_numpy(), wv.to_numpy()) self.pen_weighted_vertex.setData(wv.index.to_numpy(), wv.to_numpy())
290 326
291
292
293
327 xmax = df.index.max()
328 self.update_xrange(xmax*1.02)
294 329
295 330
296 331
297 332
298 333
299 334 class EstimationGraph(pg.PlotWidget): class EstimationGraph(pg.PlotWidget):
335
336 update_xrange = update_xrange
337
300 338 def __init__(self, pf_exact, box_data, parent=None, *args, **kwargs): def __init__(self, pf_exact, box_data, parent=None, *args, **kwargs):
301 339 super().__init__(parent, *args, **kwargs) super().__init__(parent, *args, **kwargs)
302 340
 
... ... class EstimationGraph(pg.PlotWidget):
362 400 def setup(self, *args, **kwargs): def setup(self, *args, **kwargs):
363 401 self.clear() self.clear()
364 402 self.setBackground('w') self.setBackground('w')
365 self.setLimits(xMin=-0.45)
403
366 404 x = y = () # zde jen vytvoříme kostru, nakrmime daty v .redraw() x = y = () # zde jen vytvoříme kostru, nakrmime daty v .redraw()
367 405
368 406 #xkcd_green = (167, 255, 181) # xkcd:light seafoam green #a7ffb5 #xkcd_green = (167, 255, 181) # xkcd:light seafoam green #a7ffb5
 
... ... class EstimationGraph(pg.PlotWidget):
450 488
451 489
452 490 def redraw(self, df): def redraw(self, df):
453
454 491 if len(df) < 2: #č nevím proč hazí chyby. Asi kvůli zadané širce. if len(df) < 2: #č nevím proč hazí chyby. Asi kvůli zadané širce.
455 492 return return
456 493
 
... ... class EstimationGraph(pg.PlotWidget):
466 503
467 504 self._set_data(self.pen_outside, df.outside) self._set_data(self.pen_outside, df.outside)
468 505 self._set_data(self.pen_mixed, df.mix) self._set_data(self.pen_mixed, df.mix)
506
507
508 xmax = df.index.max()
509 self.update_xrange(xmax*1.02)
469 510
470
471
472
473
474
475
511
476 512
477 513
478 514 # #
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