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)
mplot: raster candidates, polishing 63d6d00dfe7affc8ed3d05161fd4a5b50db62207 I am 2022-01-17 16:34:05
mplot: more figures 3a7f54e09cd78a2fc2ff50d7cf5c142f04ffdc28 I am 2022-01-09 00:42:33
testcases: add proxy_prod 2D testcase edb11ab54bcf677757974f133d2d66816b701ade I am 2022-01-09 00:41:27
stm_df: fix proxy, pandas nějak nám šťourá v našich boolean maticích 1d9f360edfc03932a08dff8aad97f189b155e708 I am 2022-01-09 00:39:24
mplot.maxes: a little bit more to labels d989a2d1b69b116a14f7ff81776f5f75d80cfea0 I am 2022-01-06 17:48:57
mplot.figs: add double and triple triangulations plots 091361cc326239b552078c489f9f164ccda4f54b I am 2022-01-06 16:17:50
mplot.maxes: aspoň nějak nastavit popísky os 50e8e467c24d73d9522166183275deab547243f8 I am 2022-01-06 16:16:36
mplot.maxes: add labels to candidates plot f8aa0f271a8d30cb7d79206290409f862c406a51 I am 2022-01-06 12:14:48
mplot.maxes: add candidates sampling (rejection-like) plot 5a15e10a9a462dd409e0627528bcb8910df77c7e I am 2022-01-06 09:40:38
mplot.maxes: add candidates plot 11e156edc351ca84fde742edf7ea1d85c3b0bc38 I am 2022-01-06 08:15:43
mplot.maxes: polish tri plots a little bit 9a4e0a18061e2d9f48c0c32c200bd1a408ceb77f I am 2022-01-05 13:15:00
mplot.mart: add plot_points() function 2c799e22d9f45b825a7f8a795ce6b9fe5fbd9c76 I am 2022-01-05 13:14:12
mplot.maxes: add convergence diagrams 813b1e8e9dd9d1e51951c51234910cdf2281cde8 I am 2022-01-05 09:07:18
mplot.mgraph: hračky s legendou 198cc40947d48b2a3cde990254def7d57c1535a6 I am 2022-01-05 09:04:23
mplot: apply default settings to figures 765d830e0230b3d85f079eb26c6eddfdb624b859 I am 2022-01-05 09:03:15
simplex: try garbage collection 45148d2665eea195c05de5852b15485d83cb7223 I am 2022-01-05 06:10:46
testcases: add Gaussian Z_min testcase 50bc3f27365e60db67f100c89ebc49b52e948645 I am 2022-01-04 13:55:59
whitebox: add Gaussian Z_min whitebox e989c87895d681920056558a0b9473b93c3b299b I am 2022-01-04 13:54:37
schemes: přídat pár komentářů k schematům e8f1665d43cfb70e89716f591852538df0e27d8c I am 2022-01-04 09:00:36
mplot.maxes: tri_nodes_plot is almost ready. Zbyvá to udělat hezky 251a0f4b7909a5468453cfb518c2bbb4064cce51 I am 2022-01-04 06:42:36
Commit 63d6d00dfe7affc8ed3d05161fd4a5b50db62207 - mplot: raster candidates, polishing
Author: I am
Author date (UTC): 2022-01-17 16:34
Committer name: I am
Committer date (UTC): 2022-01-17 16:34
Parent(s): 3a7f54e09cd78a2fc2ff50d7cf5c142f04ffdc28
Signer:
Signing key:
Signing status: N
Tree: a410b232134f2afac6fe0425c8471358aab4b287
File Lines added Lines deleted
mplot/maxes.py 23 18
mplot/mfigs.py 5 1
File mplot/maxes.py changed (mode: 100644) (index c42155e..c408b44)
... ... import numpy as np
16 16 from . import mart from . import mart
17 17 from . import mgraph from . import mgraph
18 18
19 from matplotlib import colors as mcolors
20
19 21
20 22 # it is mostly for qt_plot, it offers availiable options to user # it is mostly for qt_plot, it offers availiable options to user
21 23 __all__ = [ __all__ = [
 
... ... __all__ = [
34 36 ] ]
35 37
36 38
37 def _setup_labels(ax):
39 def _setup_labels(ax, data_offset=0.5):
38 40 if ax.space in ('P', 'aP', 'U', 'aU'): if ax.space in ('P', 'aP', 'U', 'aU'):
39 41 ax.set_xlabel("$x_1$") ax.set_xlabel("$x_1$")
40 42 ax.set_ylabel("$x_2$") ax.set_ylabel("$x_2$")
41 43 else: else:
42 text = ax.text(1, -0.5, '$x_1$', ha='center',va='top', transform=ax.get_yaxis_transform())
44 text = ax.text(1, -data_offset, '$x_1$', ha='center',va='top', transform=ax.get_yaxis_transform())
43 45 text.set_in_layout(False) text.set_in_layout(False)
44 text = ax.text(-0.5, 1, '$x_2~$', ha='right',va='center', transform=ax.get_xaxis_transform())
46 text = ax.text(-data_offset, 1, '$x_2~$', ha='right',va='center', transform=ax.get_xaxis_transform())
45 47 text.set_in_layout(False) text.set_in_layout(False)
46 48
47 49
 
... ... def candidates_sampling_plot(ax, linewidths=[0.7, 0.5, 0.4, 0.3, 0.2, 0.1]):
63 65
64 66 if event in ('mix', 'outside'): if event in ('mix', 'outside'):
65 67 mart.plot_sample(ax, kwargs['nodes'], ls='', marker='.',\ mart.plot_sample(ax, kwargs['nodes'], ls='', marker='.',\
66 mec="#00007E", mfc="#00007E", ms=1.5, alpha=0.5)
68 mec="#00007E", mfc="#00007E", ms=1.5, alpha=0.5,\
69 rasterized=True)
67 70
68 71 data = stm.fast_simplex_estimation(ax.sample_box, model_space=ax.space,\ data = stm.fast_simplex_estimation(ax.sample_box, model_space=ax.space,\
69 72 sampling_space=ax.space, \ sampling_space=ax.space, \
 
... ... def candidates_sampling_plot(ax, linewidths=[0.7, 0.5, 0.4, 0.3, 0.2, 0.1]):
82 85 pass pass
83 86
84 87 def candidates_plot(ax): def candidates_plot(ax):
85 tri_plot(ax, tri_space=None, linewidths=[0.7, 0.5, 0.4, 0.3])
86 mart.scatter_candidates(ax, s=1.5, marker='.', cmap='plasma_r')#, alpha=0.5)
87 mart.plot_the_best_candidate(ax, "^", color='#430051')
88 tri_plot(ax, tri_space=None, linewidths=[0.7, 0.5, 0.4, 0.3], data_offset=0.4)
89 blue_colors = ["#BDBDFF", "#9999FF", "#00007E", "#000057"]
90 blue_cmap = mcolors.LinearSegmentedColormap.from_list("bluecmap", blue_colors)
91 mart.scatter_candidates(ax, s=1.5, marker='.', cmap=blue_cmap, rasterized=True)
92 mart.plot_the_best_candidate(ax, "^", color='#000057')
88 93 mart.plot_points(ax, ms=5, zorder=1005000) mart.plot_points(ax, ms=5, zorder=1005000)
89 94
90 if ax.space in ('G', 'GK'):
91 ax.xaxis.set_label_coords(1, 0.47)
92 ax.set_xlabel("$x_1$")
93 ax.text(0.47, 1, '$x_2$', ha='right',va='top', transform=ax.transAxes)
94 else:
95 ax.set_xlabel("$x_1$")
96 ax.set_ylabel("$x_2$")
95 # if ax.space in ('G', 'GK'):
96 # ax.xaxis.set_label_coords(1, 0.47)
97 # ax.set_xlabel("$x_1$")
98 # ax.text(0.47, 1, '$x_2$', ha='right',va='top', transform=ax.transAxes)
99 # else:
100 # ax.set_xlabel("$x_1$")
101 # ax.set_ylabel("$x_2$")
97 102
98 103 def convergence_diagram(ax, sources=['box', 'user'], apply_proxy=False): def convergence_diagram(ax, sources=['box', 'user'], apply_proxy=False):
99 104 #č pokorně jedeme použiť guessbox #č pokorně jedeme použiť guessbox
 
... ... def tri_nodes_plot(ax, tri_space=None, tn_scheme=None,\
154 159 assert 100500 < 0 #оӵ мар лэсьтӥське татын? assert 100500 < 0 #оӵ мар лэсьтӥське татын?
155 160
156 161 mart.plot_sample(ax, kwargs['nodes'], ls='', marker='.',\ mart.plot_sample(ax, kwargs['nodes'], ls='', marker='.',\
157 mec=color, mfc=color, ms=1, alpha=0.5)
162 mec=color, mfc=color, ms=1, alpha=0.5, rasterized=True)
158 163
159 164
160 165
 
... ... def tri_GK_nodes_plot(ax, **kwargs):
194 199 #č ten [plot] zásadně vytvaří své struktury, nepouzívá oné ze skříňky, #č ten [plot] zásadně vytvaří své struktury, nepouzívá oné ze skříňky,
195 200 #č protože já vím, že v těch obrázcích, ve kterých chcu ho použit, #č protože já vím, že v těch obrázcích, ve kterých chcu ho použit,
196 201 #č můde být třeba použit řez a skříňka tedy potřebné struktury může nemít #č můde být třeba použit řez a skříňka tedy potřebné struktury může nemít
197 def tri_plot(ax, tri_space=None, linewidths=[0.7, 0.5, 0.4, 0.3, 0.2, 0.1]):
202 def tri_plot(ax, tri_space=None, linewidths=[0.7, 0.5, 0.4, 0.3, 0.2, 0.1], data_offset=0.5):
198 203 from .. import simplex as six from .. import simplex as six
199 204 if tri_space is None: if tri_space is None:
200 205 tri_space = ax.space tri_space = ax.space
 
... ... def tri_plot(ax, tri_space=None, linewidths=[0.7, 0.5, 0.4, 0.3, 0.2, 0.1]):
218 223 mart.plot_boundaries(ax, lw=0.7, zorder=1050) mart.plot_boundaries(ax, lw=0.7, zorder=1050)
219 224 except: except:
220 225 pass pass
221 _setup_labels(ax)
226 _setup_labels(ax, data_offset)
222 227
223 228
224 229
 
... ... def candidates_drawing(ax):
283 288 #č která inicializaci deleguje funkci cm.get_cmap() ve (svém) modulu cm. #č která inicializaci deleguje funkci cm.get_cmap() ve (svém) modulu cm.
284 289 # cmap='viridis_r' #cmap='plasma', # cmap='viridis_r' #cmap='plasma',
285 290 mart.scatter_candidates(ax, s=5, marker='.', cmap='plasma_r',\ mart.scatter_candidates(ax, s=5, marker='.', cmap='plasma_r',\
286 alpha=None, linewidths=None, edgecolors=None, plotnonfinite=False)
291 alpha=None, linewidths=None, edgecolors=None, plotnonfinite=False, rasterized=True)
287 292 mart.plot_the_best_candidate(ax, "^", color='#3D0D5B') mart.plot_the_best_candidate(ax, "^", color='#3D0D5B')
288 293
289 294
File mplot/mfigs.py changed (mode: 100644) (index 4ca0107..9bfe346)
... ... def double_plot(fig, sample_box, space):
101 101
102 102 def triple_plot(fig, sample_box, space): def triple_plot(fig, sample_box, space):
103 103 fig.set_figwidth(19/2.54) fig.set_figwidth(19/2.54)
104 ax = fig.add_subplot(131)
104 ax1 = ax = fig.add_subplot(131)
105 105 ax.sample_box = sample_box[0:100] ax.sample_box = sample_box[0:100]
106 106 ax.space = space ax.space = space
107 107 try: try:
 
... ... def triple_plot(fig, sample_box, space):
111 111 tn_scheme = quadpy.tn.grundmann_moeller(sample_box.nvar, 5) tn_scheme = quadpy.tn.grundmann_moeller(sample_box.nvar, 5)
112 112 maxes.tri_nodes_plot(ax, tri_space=None, tn_scheme=tn_scheme) maxes.tri_nodes_plot(ax, tri_space=None, tn_scheme=tn_scheme)
113 113 ax.set_title(space_labels[space], pad=10) ax.set_title(space_labels[space], pad=10)
114
114 115 ax = fig.add_subplot(132) ax = fig.add_subplot(132)
115 116 ax.sample_box = sample_box[0:200] ax.sample_box = sample_box[0:200]
116 117 ax.space = space ax.space = space
117 118 maxes.tri_plot(ax) maxes.tri_plot(ax)
119 ax.sharey(ax1)
118 120 ax.set_title(space_labels[space], pad=10) ax.set_title(space_labels[space], pad=10)
121
119 122 ax = fig.add_subplot(133) ax = fig.add_subplot(133)
120 123 ax.sample_box = sample_box ax.sample_box = sample_box
121 124 ax.space = space ax.space = space
122 125 maxes.convex_hull_plot(ax) maxes.convex_hull_plot(ax)
126 ax.sharey(ax1)
123 127 ax.set_title(space_labels[space], pad=10) ax.set_title(space_labels[space], pad=10)
124 128
125 129 def qhull_under_density(fig, sample_box, space): def qhull_under_density(fig, sample_box, space):
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