File convex_hull.py changed (mode: 100644) (index fe06906..b5c83a1) |
... |
... |
class Ghull: |
580 |
580 |
self.sample = hull.sample |
self.sample = hull.sample |
581 |
581 |
|
|
582 |
582 |
if use_MC: |
if use_MC: |
583 |
|
self.gint = Shell_MC(hull, shell, non_Gaussian_reduction) |
|
|
583 |
|
self.gint = Shell_MC(hull, self.shell, non_Gaussian_reduction) |
584 |
584 |
else: |
else: |
585 |
|
self.gint = Shell_IS(hull, shell, non_Gaussian_reduction) |
|
|
585 |
|
self.gint = Shell_IS(hull, self.shell, non_Gaussian_reduction) |
586 |
586 |
|
|
587 |
587 |
|
|
588 |
588 |
def fire(self, ns): |
def fire(self, ns): |
|
... |
... |
class Ghull: |
677 |
677 |
#č ale jinak Ghull se stavá hodně překomplikovaným. |
#č ale jinak Ghull se stavá hodně překomplikovaným. |
678 |
678 |
#č nic lepšího mně nenapadá, přemyšlel jsem dlouho. |
#č nic lepšího mně nenapadá, přemyšlel jsem dlouho. |
679 |
679 |
class Shell_MC: |
class Shell_MC: |
680 |
|
def __init__(self, shell, hull, non_Gaussian_reduction=0.98): |
|
|
680 |
|
def __init__(self, hull, shell, non_Gaussian_reduction=0.98): |
681 |
681 |
self.shell = shell |
self.shell = shell |
682 |
682 |
self.hull = hull |
self.hull = hull |
683 |
683 |
self.nvar = hull.sample.nvar |
self.nvar = hull.sample.nvar |
|
... |
... |
class Shell_MC: |
708 |
708 |
#č vrací odhad r na základě předchozích integrací |
#č vrací odhad r na základě předchozích integrací |
709 |
709 |
#č metoda je navržena tak, aby Shell_IS jú mohl zdědit. |
#č metoda je navržena tak, aby Shell_IS jú mohl zdědit. |
710 |
710 |
def get_r(self): |
def get_r(self): |
711 |
|
#č pokud návrhový bod z minula je pořad venku, |
|
712 |
|
#č tak použijeme redukci. |
|
713 |
|
#č Bacha, metoda bude vracet nuly pro obálky v Gaussovskem prostoru! |
|
714 |
|
if self.DP_is_valid: |
|
715 |
|
return self.r * self.non_Gaussian_reduction |
|
716 |
|
else: |
|
717 |
|
return self.r |
|
|
711 |
|
#č bojim sa, rerukce bude aplikována dycky |
|
712 |
|
#č Bacha, metoda bude vracet nuly pro obálky v Gaussovskem prostoru! |
|
713 |
|
return self.r * self.non_Gaussian_reduction |
718 |
714 |
|
|
719 |
715 |
# stateless |
# stateless |
720 |
716 |
def rvs(self, nsampled, seats, ns): |
def rvs(self, nsampled, seats, ns): |
|
... |
... |
class Shell_MC: |
745 |
741 |
def _process_part(self, seats, nis, callback_all=None, callback_outside=None): |
def _process_part(self, seats, nis, callback_all=None, callback_outside=None): |
746 |
742 |
# boarding |
# boarding |
747 |
743 |
nodes_G = self.rvs(self.nsampled, seats, nis) |
nodes_G = self.rvs(self.nsampled, seats, nis) |
748 |
|
nodes = self.sample.f_model.new_sample(nodes_G, space='G') |
|
|
744 |
|
nodes = self.hull.sample.f_model.new_sample(nodes_G, space='G') |
749 |
745 |
# who is back? |
# who is back? |
750 |
746 |
mask = self.hull.is_outside(nodes) |
mask = self.hull.is_outside(nodes) |
751 |
747 |
if self.r_needed and np.any(mask): |
if self.r_needed and np.any(mask): |
|
... |
... |
class Shell_MC: |
770 |
766 |
#č metoda je navržena tak, aby Shell_IS jú mohl zdědit. |
#č metoda je navržena tak, aby Shell_IS jú mohl zdědit. |
771 |
767 |
def _r_check_out(self, outside_nodes): |
def _r_check_out(self, outside_nodes): |
772 |
768 |
sum_squares = np.sum(np.square(outside_nodes.G), axis=1) |
sum_squares = np.sum(np.square(outside_nodes.G), axis=1) |
773 |
|
arg = np.nanargmax(sum_squares) |
|
|
769 |
|
arg = np.nanargmin(sum_squares) |
774 |
770 |
new_r = np.sqrt(sum_squares[arg]) |
new_r = np.sqrt(sum_squares[arg]) |
775 |
771 |
if (not self.DP_is_valid) or (new_r < self.r): |
if (not self.DP_is_valid) or (new_r < self.r): |
776 |
772 |
self.DP = outside_nodes[arg] |
self.DP = outside_nodes[arg] |
|
... |
... |
class Shell_IS(Shell_MC): |
854 |
850 |
#č Potřebujeme hustotu 1D rozdělení, implementovanou v Radial |
#č Potřebujeme hustotu 1D rozdělení, implementovanou v Radial |
855 |
851 |
#č Shell se síce dědí od Radial, ale implementuje .pdf() jako sdruženou |
#č Shell se síce dědí od Radial, ale implementuje .pdf() jako sdruženou |
856 |
852 |
#č hustotu v nD Gaussovskem prostoru |
#č hustotu v nD Gaussovskem prostoru |
857 |
|
weights = sball.Radial.pdf(self.shell, rs) * delta_r |
|
|
853 |
|
weights = sball.Radial.pdf(self.shell, rs) * delta_r * self.shell.p_shell |
858 |
854 |
|
|
859 |
855 |
return sample_G, weights |
return sample_G, weights |
860 |
856 |
|
|
|
... |
... |
class Shell_IS(Shell_MC): |
862 |
858 |
def _process_part(self, seats, nis, callback_all=None, callback_outside=None): |
def _process_part(self, seats, nis, callback_all=None, callback_outside=None): |
863 |
859 |
# boarding |
# boarding |
864 |
860 |
nodes_G, weights = self.rvs(self.nsampled, seats, nis) |
nodes_G, weights = self.rvs(self.nsampled, seats, nis) |
865 |
|
nodes = self.sample.f_model.new_sample(nodes_G, space='G') |
|
|
861 |
|
nodes = self.hull.sample.f_model.new_sample(nodes_G, space='G') |
866 |
862 |
# who is back? |
# who is back? |
867 |
863 |
mask = self.hull.is_outside(nodes) |
mask = self.hull.is_outside(nodes) |
868 |
864 |
if self.r_needed and np.any(mask): |
if self.r_needed and np.any(mask): |
|
... |
... |
class Shell_IS(Shell_MC): |
890 |
886 |
#č nejdřív true, pak false. Posilali jsme is_outside |
#č nejdřív true, pak false. Posilali jsme is_outside |
891 |
887 |
mean_pf, mean_ps = self.pp.mean |
mean_pf, mean_ps = self.pp.mean |
892 |
888 |
var_pf, var_ps = self.pp.var |
var_pf, var_ps = self.pp.var |
893 |
|
shell_pf, shell_ps = self.pp.corrected_mean(p_overall=self.shell.p_shell) |
|
|
889 |
|
shell_pf, shell_ps = self.pp.correct_means(p_overall=self.shell.p_shell) |
894 |
890 |
|
|
895 |
891 |
stats = dict() |
stats = dict() |
896 |
892 |
stats["shell_budget"] = nis |
stats["shell_budget"] = nis |
File qt_plot.py changed (mode: 100644) (index 863b378..fabb236) |
... |
... |
class HullEstimationWidget(pg.LayoutWidget): |
2856 |
2856 |
self.sb_item = samplebox_item |
self.sb_item = samplebox_item |
2857 |
2857 |
|
|
2858 |
2858 |
self.giracle = Giracles(w=samplebox_item, autoredraw=False, nrod=200) |
self.giracle = Giracles(w=samplebox_item, autoredraw=False, nrod=200) |
|
2859 |
|
#č Ghull se zkomplikoval. Musím integraci řešit zvlášť |
|
2860 |
|
# Serie for integration nodes |
|
2861 |
|
self.serint = Series(w=samplebox_item, autoredraw=False) |
2859 |
2862 |
#ё hyperplanes? Кого ты обманываешь, Alexi? |
#ё hyperplanes? Кого ты обманываешь, Alexi? |
2860 |
2863 |
#č tak. už je to equation_planes :) |
#č tak. už je to equation_planes :) |
2861 |
2864 |
self.equation_planes = InfiniteLines(w=samplebox_item, autoredraw=False) |
self.equation_planes = InfiniteLines(w=samplebox_item, autoredraw=False) |
|
... |
... |
class HullEstimationWidget(pg.LayoutWidget): |
2911 |
2914 |
action = self.toolbar.addAction("shell out!", self.get_shell_estimation) |
action = self.toolbar.addAction("shell out!", self.get_shell_estimation) |
2912 |
2915 |
btn = self.toolbar.widgetForAction(action) |
btn = self.toolbar.widgetForAction(action) |
2913 |
2916 |
btn.setAutoRaise(False) |
btn.setAutoRaise(False) |
|
2917 |
|
btn.setToolTip("Creates Ghull object") |
2914 |
2918 |
#btn.setSizePolicy(size_policy) |
#btn.setSizePolicy(size_policy) |
2915 |
2919 |
|
|
2916 |
2920 |
action = self.toolbar.addAction("integrate", self.integrate) |
action = self.toolbar.addAction("integrate", self.integrate) |
2917 |
2921 |
btn = self.toolbar.widgetForAction(action) |
btn = self.toolbar.widgetForAction(action) |
2918 |
2922 |
btn.setAutoRaise(False) |
btn.setAutoRaise(False) |
|
2923 |
|
btn.setToolTip("Only uses Ghull object created before") |
2919 |
2924 |
#btn.setSizePolicy(size_policy) |
#btn.setSizePolicy(size_policy) |
2920 |
2925 |
|
|
2921 |
2926 |
action = self.toolbar.addAction("fire!", self.fire) |
action = self.toolbar.addAction("fire!", self.fire) |
|
... |
... |
class HullEstimationWidget(pg.LayoutWidget): |
2940 |
2945 |
self.addWidget(self.toolbar, row=0, col=0) |
self.addWidget(self.toolbar, row=0, col=0) |
2941 |
2946 |
|
|
2942 |
2947 |
|
|
2943 |
|
#č použivám QToolButton jen proto, že jsou menši :) |
|
2944 |
|
# self.btn0 = QtGui.QToolButton(self) |
|
2945 |
|
# self.btn0.setText("shell out!") |
|
2946 |
|
# self.tool_layout.addWidget(self.btn0) |
|
2947 |
|
# self.btn0.clicked.connect(self.get_shell_estimation) |
|
2948 |
|
# |
|
2949 |
|
# self.btn1 = QtGui.QToolButton(self) |
|
2950 |
|
# self.btn1.setText("integrate") |
|
2951 |
|
# self.tool_layout.addWidget(self.btn1) |
|
2952 |
|
# self.btn1.clicked.connect(self.integrate) |
|
2953 |
|
# |
|
2954 |
|
# self.btn = QtGui.QToolButton(self) |
|
2955 |
|
# self.btn.setText("fire!") |
|
2956 |
|
# self.tool_layout.addWidget(self.btn) |
|
2957 |
|
# self.btn.clicked.connect(self.fire) |
|
2958 |
|
# |
|
2959 |
|
# self.btn2 = QtGui.QToolButton(self) |
|
2960 |
|
# self.btn2.setText("redraw") |
|
2961 |
|
# self.tool_layout.addWidget(self.btn2) |
|
2962 |
|
# self.btn2.clicked.connect(self.recolor) |
|
2963 |
|
# |
|
2964 |
|
# self.btn3 = QtGui.QToolButton(self) |
|
2965 |
|
# self.btn3.setText("hide") |
|
2966 |
|
# self.tool_layout.addWidget(self.btn3) |
|
2967 |
|
# self.btn3.clicked.connect(self.hide) |
|
2968 |
|
|
|
2969 |
2948 |
#оӵ остальной (люкет) уллапала |
#оӵ остальной (люкет) уллапала |
2970 |
2949 |
|
|
2971 |
2950 |
### Create ParameterTree widget |
### Create ParameterTree widget |
|
... |
... |
class HullEstimationWidget(pg.LayoutWidget): |
2984 |
2963 |
self.addWidget(self.splitter, row=1, col=0) |
self.addWidget(self.splitter, row=1, col=0) |
2985 |
2964 |
|
|
2986 |
2965 |
def hide(self): |
def hide(self): |
|
2966 |
|
self.serint.hide() |
2987 |
2967 |
self.giracle.hide() |
self.giracle.hide() |
2988 |
2968 |
self.equation_planes.hide() |
self.equation_planes.hide() |
2989 |
2969 |
|
|
2990 |
2970 |
def show(self): |
def show(self): |
|
2971 |
|
self.serint.show() |
2991 |
2972 |
self.giracle.show() |
self.giracle.show() |
2992 |
2973 |
self.equation_planes.show() |
self.equation_planes.show() |
2993 |
2974 |
|
|
2994 |
2975 |
def clear(self): |
def clear(self): |
|
2976 |
|
self.serint.clear() |
2995 |
2977 |
self.giracle.clear() |
self.giracle.clear() |
2996 |
2978 |
self.equation_planes.clear() |
self.equation_planes.clear() |
2997 |
2979 |
|
|
|
... |
... |
class HullEstimationWidget(pg.LayoutWidget): |
3026 |
3008 |
'title': "number of random directions", \ |
'title': "number of random directions", \ |
3027 |
3009 |
'tip': "Used only for random scheme in DirectHull (or CompleteHull)"}) |
'tip': "Used only for random scheme in DirectHull (or CompleteHull)"}) |
3028 |
3010 |
|
|
3029 |
|
# designs = ['None'] |
|
3030 |
|
# if 'designs' in self.sb_item.kwargs: |
|
3031 |
|
# designs.extend(self.sb_item.kwargs['designs'].keys()) |
|
3032 |
|
# params.append({'name': 'design', 'type': 'list', \ |
|
3033 |
|
# 'values': designs, 'value': 'None'}) |
|
3034 |
|
params.append({'name': 'budget', 'type': 'int', \ |
|
|
3011 |
|
params.append({'name': 'use_MC', 'title': "Use MC", 'type': 'bool', 'value': False }) |
|
3012 |
|
params.append({'name': 'nonG_reduction', 'type': 'float', \ |
|
3013 |
|
'title': "non Gaussian reduction", \ |
|
3014 |
|
'limits': (0, 1), 'value': 0.9, 'default': 0.9,\ |
|
3015 |
|
'tip': "Applied when Ghull integrates non Gaussian convex hulls"}) |
|
3016 |
|
|
|
3017 |
|
params.append({'name': 'budget', 'type': 'int', \ |
3035 |
3018 |
'limits': (1, float('inf')), 'value': 1000, 'default': 1000,\ |
'limits': (1, float('inf')), 'value': 1000, 'default': 1000,\ |
3036 |
3019 |
'tip': "Number of simulations for optimal importance sampling"}) |
'tip': "Number of simulations for optimal importance sampling"}) |
3037 |
3020 |
|
|
|
... |
... |
class HullEstimationWidget(pg.LayoutWidget): |
3055 |
3038 |
#self.param.sigValueChanging.connect(self.param_changing) |
#self.param.sigValueChanging.connect(self.param_changing) |
3056 |
3039 |
self.param = pg.parametertree.Parameter.create(name='params', type='group', children=params) |
self.param = pg.parametertree.Parameter.create(name='params', type='group', children=params) |
3057 |
3040 |
|
|
3058 |
|
def get_ghull(self): return khull.Ghull(self.get_hull()) |
|
|
3041 |
|
def get_ghull(self): |
|
3042 |
|
use_MC = self.param.getValues()['use_MC'][0] |
|
3043 |
|
nonG_reduction = self.param.getValues()['nonG_reduction'][0] |
|
3044 |
|
hull = self.get_hull() |
|
3045 |
|
self.ghull = khull.Ghull(hull, use_MC=use_MC, non_Gaussian_reduction=nonG_reduction) |
|
3046 |
|
return self.ghull |
|
3047 |
|
|
|
3048 |
|
|
3059 |
3049 |
#č jistě potřebuji něco, co zpracuje parameter_tree |
#č jistě potřebuji něco, co zpracuje parameter_tree |
3060 |
3050 |
#č a vratí platný hull pro Ghull |
#č a vratí platný hull pro Ghull |
3061 |
3051 |
def get_hull(self): |
def get_hull(self): |
|
... |
... |
class HullEstimationWidget(pg.LayoutWidget): |
3087 |
3077 |
|
|
3088 |
3078 |
#č ten hlavní modul se dočkal na překopávání |
#č ten hlavní modul se dočkal na překopávání |
3089 |
3079 |
def on_box_run(self, *args, **kwargs): |
def on_box_run(self, *args, **kwargs): |
3090 |
|
self.giracle.clear() |
|
3091 |
|
self.equation_planes.clear() |
|
|
3080 |
|
self.clear() |
3092 |
3081 |
#č je třeba zkontrolovat autorun a restartovat výpočet |
#č je třeba zkontrolovat autorun a restartovat výpočet |
3093 |
3082 |
if self.param.getValues()['Update as the box runned'][0]: |
if self.param.getValues()['Update as the box runned'][0]: |
3094 |
3083 |
self.get_shell_estimation() |
self.get_shell_estimation() |
|
... |
... |
class HullEstimationWidget(pg.LayoutWidget): |
3147 |
3136 |
print(error_msg) |
print(error_msg) |
3148 |
3137 |
self.sb_item.errors.append(e) |
self.sb_item.errors.append(e) |
3149 |
3138 |
|
|
3150 |
|
def draw_ghull(self, r, R, nodes=None): |
|
|
3139 |
|
def draw_ghull(self, r, R): |
3151 |
3140 |
# r-circle |
# r-circle |
3152 |
3141 |
if r < 0: |
if r < 0: |
3153 |
3142 |
r = 0 |
r = 0 |
|
... |
... |
class HullEstimationWidget(pg.LayoutWidget): |
3160 |
3149 |
color = self.param.getValues()['R'][0] #č tam bude barva |
color = self.param.getValues()['R'][0] #č tam bude barva |
3161 |
3150 |
self.giracle.add_circle(R, z=32, index=self.index('R'), pen=color, name='R') |
self.giracle.add_circle(R, z=32, index=self.index('R'), pen=color, name='R') |
3162 |
3151 |
|
|
3163 |
|
#č draw tečičky |
|
3164 |
|
if nodes is not None: |
|
3165 |
|
size = self.param.getValues()['node (pixel) size'][0] |
|
3166 |
|
plot_params = {'pen':None, 'symbol':'o', 'symbolSize':size, \ |
|
3167 |
|
'symbolPen':pg.mkPen(None)} |
|
3168 |
|
#brush = pg.mkBrush(color) |
|
3169 |
|
mask = nodes.is_outside |
|
3170 |
|
|
|
3171 |
|
index = 'inside' |
|
3172 |
|
color = self.param.getValues()[index][0] #č tam bude barva |
|
3173 |
|
self.giracle.add_serie(nodes[~mask], z=30, index=self.index(index),\ |
|
3174 |
|
symbolBrush=color, name=index, **plot_params) |
|
3175 |
|
|
|
3176 |
|
index = 'outside' |
|
3177 |
|
color = self.param.getValues()[index][0] #č tam bude barva |
|
3178 |
|
self.giracle.add_serie(nodes[mask], z=30, index=self.index(index),\ |
|
3179 |
|
symbolBrush=color, name=index, **plot_params) |
|
|
3152 |
|
|
3180 |
3153 |
|
|
3181 |
3154 |
|
|
3182 |
3155 |
def get_shell_estimation(self): |
def get_shell_estimation(self): |
|
... |
... |
class HullEstimationWidget(pg.LayoutWidget): |
3226 |
3199 |
print(error_msg) |
print(error_msg) |
3227 |
3200 |
self.sb_item.errors.append(e) |
self.sb_item.errors.append(e) |
3228 |
3201 |
|
|
|
3202 |
|
|
|
3203 |
|
def integration_callback(self, nodes): |
|
3204 |
|
#č draw tečičky |
|
3205 |
|
size = self.param.getValues()['node (pixel) size'][0] |
|
3206 |
|
plot_params = {'pen':None, 'symbol':'o', 'symbolSize':size, \ |
|
3207 |
|
'symbolPen':pg.mkPen(None)} |
|
3208 |
|
#brush = pg.mkBrush(color) |
|
3209 |
|
mask = nodes.is_outside |
3229 |
3210 |
|
|
|
3211 |
|
index = 'inside' |
|
3212 |
|
color = self.param.getValues()[index][0] #č tam bude barva |
|
3213 |
|
self.serint.add_serie(nodes[~mask], z=30,\ |
|
3214 |
|
symbolBrush=color, name=index, **plot_params) |
|
3215 |
|
|
|
3216 |
|
index = 'outside' |
|
3217 |
|
color = self.param.getValues()[index][0] #č tam bude barva |
|
3218 |
|
self.serint.add_serie(nodes[mask], z=30, \ |
|
3219 |
|
symbolBrush=color, name=index, **plot_params) |
|
3220 |
|
|
|
3221 |
|
# keep the GUI responsive :) |
|
3222 |
|
self.sb_item.app.processEvents() |
|
3223 |
|
|
|
3224 |
|
|
3230 |
3225 |
|
|
3231 |
3226 |
def integrate(self): |
def integrate(self): |
3232 |
|
ghull = self.get_ghull() |
|
|
3227 |
|
#č integrace se stala stateful |
|
3228 |
|
#č a musím jú taky testovat |
|
3229 |
|
if 'ghull' not in self.__dict__: |
|
3230 |
|
ghull = self.get_ghull() |
|
3231 |
|
else: |
|
3232 |
|
ghull = self.ghull |
|
3233 |
|
nsim = self.sb_item.slider.value() |
|
3234 |
|
sample = self.sb_item.sample_box.f_model[:nsim] |
|
3235 |
|
#č teď - saháme do vnitřku naších obliběných tříd |
|
3236 |
|
ghull.hull.sample = sample |
|
3237 |
|
ghull.sample = sample |
|
3238 |
|
|
3233 |
3239 |
self.draw_convex_hull(ghull.hull) |
self.draw_convex_hull(ghull.hull) |
3234 |
3240 |
|
|
|
3241 |
|
|
3235 |
3242 |
#☺ Krucinal, kdo ten OrderedDict vymyslel? |
#☺ Krucinal, kdo ten OrderedDict vymyslel? |
3236 |
3243 |
params = self.param.getValues() |
params = self.param.getValues() |
3237 |
3244 |
budget = params['budget'][0] |
budget = params['budget'][0] |
3238 |
3245 |
|
|
3239 |
|
# design = params['design'][0] |
|
3240 |
|
# if design == 'None': |
|
3241 |
|
# design = None |
|
3242 |
|
# else: |
|
3243 |
|
# design = self.sb_item.kwargs['designs'][design] |
|
|
3246 |
|
if self.param.getValues()['index'][0]: # replace previous |
|
3247 |
|
self.serint.clear() |
3244 |
3248 |
|
|
3245 |
3249 |
try: |
try: |
3246 |
|
data = ghull.integrate(budget) |
|
3247 |
|
nodes, ghull_estimation, convex_hull_estimation, global_stats = data |
|
|
3250 |
|
data = ghull.integrate(budget, callback_all=self.integration_callback) |
|
3251 |
|
ghull_estimation, convex_hull_estimation, global_stats = data |
3248 |
3252 |
|
|
3249 |
3253 |
#if hasattr(self.sb_item.sample_box, 'estimations'): |
#if hasattr(self.sb_item.sample_box, 'estimations'): |
3250 |
3254 |
#self.sb_item.sample_box.estimations.append(data) |
#self.sb_item.sample_box.estimations.append(data) |
|
... |
... |
class HullEstimationWidget(pg.LayoutWidget): |
3252 |
3256 |
self.table.setData({**global_stats, "ghull_estimation":ghull_estimation,\ |
self.table.setData({**global_stats, "ghull_estimation":ghull_estimation,\ |
3253 |
3257 |
"convex_hull_estimation": convex_hull_estimation}) |
"convex_hull_estimation": convex_hull_estimation}) |
3254 |
3258 |
|
|
3255 |
|
self.draw_ghull(global_stats['r'], global_stats['R'], nodes) |
|
|
3259 |
|
self.draw_ghull(global_stats['r'], global_stats['R']) |
3256 |
3260 |
|
|
3257 |
3261 |
|
|
3258 |
|
except BaseException as e: |
|
|
3262 |
|
except ValueError as e: #BaseException |
3259 |
3263 |
msg = "error during estimation " |
msg = "error during estimation " |
3260 |
3264 |
error_msg = self.__class__.__name__ + ": " + msg + repr(e) |
error_msg = self.__class__.__name__ + ": " + msg + repr(e) |
3261 |
3265 |
print(error_msg) |
print(error_msg) |
3262 |
3266 |
self.sb_item.errors.append(e) |
self.sb_item.errors.append(e) |
3263 |
3267 |
|
|
3264 |
|
|
|
|
3268 |
|
# draw DP |
|
3269 |
|
if ghull.hull.space != 'G': |
|
3270 |
|
size = self.param.getValues()['node (pixel) size'][0] + 3 |
|
3271 |
|
plot_params = {'pen':None, 'symbol':'t2', 'symbolSize':size, \ |
|
3272 |
|
'symbolPen':pg.mkPen(None)} |
|
3273 |
|
|
|
3274 |
|
#color = self.param.getValues()[index][0] #č tam bude barva |
|
3275 |
|
self.serint.add_serie(ghull.gint.DP, z=35, index='DP', name='DP', **plot_params) |
3265 |
3276 |
|
|
3266 |
3277 |
|
|
3267 |
3278 |
|
|