File tree Expand file tree Collapse file tree 4 files changed +11
-9
lines changed
Expand file tree Collapse file tree 4 files changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -433,7 +433,7 @@ class MaskedImageParamMixin(DataSet):
433433 """Mixin for masked image parameters."""
434434
435435 g_mask = BeginGroup (_ ("Mask" ))
436- filling_value = FloatItem (_ ("Filling value" ))
436+ filling_value = FloatItem (_ ("Filling value" ), allow_none = True )
437437 show_mask = BoolItem (_ ("Show image mask" ), default = False )
438438 alpha_masked = FloatItem (_ ("Masked area alpha" ), default = 0.7 , min = 0 , max = 1 )
439439 alpha_unmasked = FloatItem (_ ("Unmasked area alpha" ), default = 0.0 , min = 0 , max = 1 )
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ class LabelParam(DataSet):
4747 ___cont = BeginGroup (_ ("Contents" )).set_prop (
4848 "display" , icon = "label.png" , hide = GetAttrProp ("_no_contents" )
4949 )
50- contents = TextItem ("" ).set_prop ("display" , hide = GetAttrProp ("_no_contents" ))
50+ contents = TextItem ("" , "" ).set_prop ("display" , hide = GetAttrProp ("_no_contents" ))
5151 ___econt = EndGroup (_ ("Contents" )).set_prop (
5252 "display" , hide = GetAttrProp ("_no_contents" )
5353 )
Original file line number Diff line number Diff line change @@ -447,9 +447,11 @@ def update_status(self, plot: BasePlot) -> None:
447447class AspectRatioParam (DataSet ):
448448 """Dataset containing aspect ratio parameters."""
449449
450- lock = BoolItem (_ ("Lock aspect ratio" ))
451- current = FloatItem (_ ("Current value" )).set_prop ("display" , active = False )
452- ratio = FloatItem (_ ("Lock value" ), min = 1e-3 )
450+ lock = BoolItem (_ ("Lock aspect ratio" ), default = True )
451+ current = FloatItem (_ ("Current value" ), default = 1.0 ).set_prop (
452+ "display" , active = False
453+ )
454+ ratio = FloatItem (_ ("Lock value" ), min = 1e-3 , default = 1.0 )
453455
454456
455457class AspectRatioTool (CommandTool ):
Original file line number Diff line number Diff line change 8383class AutoFitParam (DataSet ):
8484 """Automatic fit parameters"""
8585
86- xmin = FloatItem ("xmin" )
87- xmax = FloatItem ("xmax" )
86+ xmin = FloatItem ("xmin" , default = 0.0 )
87+ xmax = FloatItem ("xmax" , default = 1.0 )
8888 method = ChoiceItem (
8989 _ ("Method" ),
9090 [
@@ -99,7 +99,7 @@ class AutoFitParam(DataSet):
9999 )
100100 err_norm = StringItem (
101101 "enorm" ,
102- default = 2.0 ,
102+ default = " 2.0" ,
103103 help = _ ("for simplex, powel, cg and bfgs norm used by the error function" ),
104104 )
105105 xtol = FloatItem (
@@ -117,7 +117,7 @@ class AutoFitParam(DataSet):
117117class FitParamDataSet (DataSet ):
118118 """Fit parameter dataset"""
119119
120- name = StringItem (_ ("Name" ))
120+ name = StringItem (_ ("Name" ), default = "" )
121121 value = FloatItem (_ ("Value" ), default = 0.0 )
122122 min = FloatItem (_ ("Min" ), default = - 1.0 )
123123 max = FloatItem (_ ("Max" ), default = 1.0 ).set_pos (col = 1 )
You can’t perform that action at this time.
0 commit comments