class TestParameters(DataSet): _bg = BeginGroup("R/W Commands") readcmd = FileOpenItem("Read command", "exe", "") writecmd = FileOpenItem("Write command", "exe", "") _eg = EndGroup("R/W Commands") _bg = BeginGroup("Channels") ch1n = IntItem("Channel #1", default=3, min=1, max=4) ach1n = EvalStringItem("K1", default="1").set_pos(col=1) ch2n = IntItem("Channel #2", default=4, min=1, max=4) ach2n = EvalStringItem("K2", default="1").set_pos(col=1) _eg = EndGroup("Channels") _bg = BeginGroup("Pulse") period = FloatItem("Period", min=0.5, default=1.0, help="Time between two sequential clock pulse") duration = FloatItem("Duration", min=0.5, max=period, default=0.7, help="Duaration of the clock pulse") syncch = IntItem("#Sync channel", default=1, min=1, max=2, help="The sync DAC channel") _eg = EndGroup("Pulse") _bg = BeginGroup("Save raw channels data") raw_savedir = DirectoryItem("Directory", os.getcwd() + "\\tmp") raw_fileprefix = StringItem("File Name", default="raw_") _eg = EndGroup("Save raw channels data")
class DefaultParameters(DataSet): """ Settings Instructions 'comment': <br>Plain text or <b>rich text</b> are both supported. """ data_dir = DirectoryItem("Directory",'D:\\Users\\thomas\\Data\\CloudStation\\Projects\\IMUs\\Jansenberger\\data') _bg = BeginGroup("Time View") acc_limit = FloatItem("Limit [Accelerometer]", default=0.5, min=0, max=3, step=0.01, slider=True) gyr_limit = FloatItem("Limit [Gyroscope]", default=300, min=100, max=1000, step=1, slider=True) init_channel = ChoiceItem("Initial Channel", [(16, "acc"), (32, "gyr")], radio=True) _eg = EndGroup("Time View") _bcolor = BeginGroup("Traffic Light") color_top = ColorItem("Top", default="red") color_middle = ColorItem("Middle", default="#ffaa00") color_bottom = ColorItem("Bottom", default="#00aa00") upper_thresh = FloatItem("Upper Threshold", default=0.7, min=0, max=2, step=0.01, slider=True) lower_thresh = FloatItem("Lower Threshold", default=0.3, min=0.1, max=1, step=0.01, slider=True) _ecolor = EndGroup("Colors") opening_view = ChoiceItem("Initial View", [(16, 'Time-View'), (32, "xy-View"), (64, 'TrafficLight-View')], radio=True)
class Controlwidget(DataSet): Directory = DirectoryItem("Directory", default=os.path.abspath("../data/")) _bt = BeginGroup("Frequency and time").set_pos(col=0) Frequency = FloatItem("Frequency", default=142.175, unit="GHz").set_prop("display", format="%3.1f") IntegrationTime = FloatItem("Integration time", default=5., unit="s").set_prop("display", format="%3.1f") BlankTime = IntItem("Blank time", default=5, unit="ms") _et = EndGroup("Frequency and time") _bs = BeginGroup("Sweep").set_pos(col=1) Sweep = ChoiceItem("Sweep", ["Off", "On"], default=False) FrequencyStep = FloatItem("Frequency step", default=.2, unit="GHz").set_prop("display", format="%3.1f") Offset = FloatItem("Offset", default=6., unit="GHz").set_prop("display", format="%3.1f") SweepStep = FloatItem("Sweep step", default=10., unit="GHz").set_prop("display", format="%3.1f") _es = EndGroup("Sweep") _bo = BeginGroup("Other").set_pos(col=2) Chopper = ChoiceItem("Chopper", ["Cold", "Hot", "Antenna", "Reference"], default=0) Antenna = IntItem("Antenna offset", default=1000, unit="") NSpec = IntItem("Spectra per file", default=7000, unit="") Format = ChoiceItem("File format", ["e", "a"], default=0) _eo = EndGroup("Other")
class GroupSelection(DataSet): """ Group selection test <b>Group selection example:</b> """ g1 = BeginGroup("group 1") enable1 = BoolItem( "Enable parameter set #1", help="If disabled, the following parameters will be ignored", default=False).set_prop("display", store=prop1) param1_1 = FloatItem("Param 1.1", default=0, min=0).set_prop("display", active=prop1) param1_2 = FloatItem("Param 1.2", default=.93).set_prop("display", active=prop1) _g1 = EndGroup("group 1") g2 = BeginGroup("group 2") enable2 = BoolItem( "Enable parameter set #2", help="If disabled, the following parameters will be ignored", default=True).set_prop("display", store=prop2) param2_1 = FloatItem("Param 2.1", default=0, min=0).set_prop("display", active=prop2) param2_2 = FloatItem("Param 2.2", default=.93).set_prop("display", active=prop2) _g2 = EndGroup("group 2")
class TestParameters(DataSet): def cb_example(self, item, value): print("\nitem: ", item, "\nvalue:", value) if self.results is None: self.results = '' self.results += str(value) + '\n' print("results:", self.results) def update_x1plusx2(self, item, value): print("\nitem: ", item, "\nvalue:", value) if self.x1 is not None and self.x2 is not None: self.x1plusx2 = self.x1 + self.x2 else: self.x1plusx2 = None string = StringItem("String", default="foobar").set_prop("display", callback=cb_example) x1 = FloatItem("x1").set_prop("display", callback=update_x1plusx2) x2 = FloatItem("x2").set_prop("display", callback=update_x1plusx2) x1plusx2 = FloatItem("x1+x2").set_prop("display", active=False) color = ColorItem("Color", default="red").set_prop("display", callback=cb_example) choice = ChoiceItem("Single choice", [(16, "first choice"), (32, "second choice"), (64, "third choice")], default=64).set_pos(col=1, colspan=2).set_prop( "display", callback=cb_example) results = TextItem("Results")
class AxisParam(DataSet): """Store the parameters to caracterise a measurement axis""" unit = StringItem("Physical unit", default='') length = IntItem("Number of point", default=0, help="Number of measured point along the axis") start = FloatItem("Physical start value", default=0) increment = FloatItem("Physical increment", default=1, help="Physical size of a pixel") scale = None # lazy object, created on demand def get_length(self): """Return the length of the scale""" return int(self.length) def get_physical_length(self): """Return the physical length of the scale see self.unit for the unit """ return self.length * self.increment def get_scale(self): """Return a vector with all the physical axis values based on start, length and increment parameters.""" if self.scale is None: # create lazy object self.update_scale() return self.scale def update_scale(self): """Update/create a vector with all the physical axis values based on start, resolution and increment parameters.""" self.scale = self.start + arange(self.length) * self.increment def copy(self): """Return a copy of the object""" return deepcopy(self) def __len__(self): return self.get_length() def __getitem__(self, key): if 'physical length' == key: return self.get_physical_length() elif 'length' == key: return self.get_length() elif 'scale' == key: return self.get_scale() else: try: return getattr(self, key) except AttributeError: raise KeyError, _("They are no such attributes %s.") % key def __setitem__(self, key, value): if key in ('scale', 'physical length'): raise TypeError, _("Not mutable item.") setattr(self, key, value)
class AutoFitParam(DataSet): xmin = FloatItem("xmin") xmax = FloatItem("xmax") method = ChoiceItem( _("Method"), [ ("simplex", "Simplex"), ("powel", "Powel"), ("bfgs", "BFGS"), ("l_bfgs_b", "L-BFGS-B"), ("cg", _("Conjugate Gradient")), ("lq", _("Least squares")), ], default="lq", ) err_norm = StringItem( "enorm", default=2.0, help=_("for simplex, powel, cg and bfgs norm used " "by the error function"), ) xtol = FloatItem("xtol", default=0.0001, help=_("for simplex, powel, least squares")) ftol = FloatItem("ftol", default=0.0001, help=_("for simplex, powel, least squares")) gtol = FloatItem("gtol", default=0.0001, help=_("for cg, bfgs")) norm = StringItem("norm", default="inf", help=_("for cg, bfgs. inf is max, -inf is min"))
class TestParameters(DataSet): """ DataSet test The following text is the DataSet 'comment': <br>Plain text or <b>rich text<sup>2</sup></b> are both supported, as well as special characters (α, β, γ, δ, ...) """ files = SubDataSetItem("files") string = StringItem("String") text = TextItem("Text") _bg = BeginGroup("A sub group") float_slider = FloatItem("Float (with slider)", default=0.5, min=0, max=1, step=0.01, slider=True) fl1 = FloatItem("Current", default=10., min=1, max=30, unit="mA", help="Threshold current") fl2 = FloatItem("Float (col=1)", default=1., min=1, max=1, help="Help on float item").set_pos(col=1) fl3 = FloatItem("Not checked float").set_prop('data', check_value=False) bool1 = BoolItem("Boolean option without label") bool2 = BoolItem("Boolean option with label", "Label").set_pos(col=1, colspan=2) color = ColorItem("Color", default="red") choice = ChoiceItem("Single choice", [(16, "first choice"), (32, "second choice"), (64, "third choice")]).set_pos(col=1, colspan=2) _eg = EndGroup("A sub group") floatarray = FloatArrayItem("Float array", default=np.ones((50, 5), float), format=" %.2e ").set_pos(col=1) g0 = BeginTabGroup("group") mchoice1 = MultipleChoiceItem( "MC type 1", ["first choice", "second choice", "third choice"]).vertical(2) mchoice2 = ImageChoiceItem("MC type 2", [("rect", "first choice", "gif.png" ), ("ell", "second choice", "txt.png" ), ("qcq", "third choice", "file.png" )] ).set_pos(col=1) \ .set_prop("display", icon="file.png") mchoice3 = MultipleChoiceItem("MC type 3", [str(i) for i in range(10)]).horizontal(2) eg0 = EndTabGroup("group") integer_slider = IntItem("Integer (with slider)", default=5, min=0, max=100, slider=True) integer = IntItem("Integer", default=5, min=3, max=6).set_pos(col=1)
class Test(DataSet): _prop = GetAttrProp("choice") choice = ChoiceItem('Choice', choices).set_prop("display", store=_prop) x1 = FloatItem('x1') x2 = FloatItem('x2').set_prop("display", active=FuncProp(_prop, lambda x: x == 'B')) x3 = FloatItem('x3').set_prop("display", active=FuncProp(_prop, lambda x: x == 'C'))
class FitParamDataSet(DataSet): name = StringItem(_("Name")) value = FloatItem(_("Value"), default=0.0) min = FloatItem(_("Min"), default=-1.0) max = FloatItem(_("Max"), default=1.0).set_pos(col=1) steps = IntItem(_("Steps"), default=5000) format = StringItem(_("Format"), default="%.3f").set_pos(col=1) logscale = BoolItem(_("Logarithmic"), _("Scale")) unit = StringItem(_("Unit"), default="").set_pos(col=1)
class TestParameters2(TestParameters): bool1 = BoolItem("Boolean option (bis)") g1 = BeginGroup("Group") a = FloatItem("Level 1") gg1 = BeginGroup("sub-group") b = FloatItem("Level 2a") c = FloatItem("Level 2b") _gg1 = EndGroup("sub-group end") _g1 = EndGroup("sub-group")
class NumericalInput(DataSet): """ Numerical Parameters Move Num. Steps slider to update the graphic """ mesh_x_size = IntItem("NX", default=40, min=2, max=401, slider=True) wave_speed = FloatItem("Wave Speed", default=1) step_size = FloatItem("Step Size", default=5e-3) num_of_steps = IntItem("Num. Steps", default=1, min=1, max=200, slider=True)
class SampleParameters(DataSet): #Sample parameters index_medium = FloatItem(_("Medium index"), default=1.33, min=1.) index_chamber = FloatItem(_("Chamber index closing the chamber"), default=1.52, min=1.) index_sample = FloatItem(_("Sample index"), default=1., min=1.) max_displacement = FloatItem(_("Max Displacement"), default=20, min=1., unit='pixels')
class TrackingParameters(DataSet): # particle contrast particlecontrast = ChoiceItem(_("Particle Contrast"), [(0, 'Positive'), (1, 'Negative')]).set_prop("display", callback=None) # whether to remove background bcgRemove = ChoiceItem(_("Background remove"), [(True, 'Yes'), (False, 'No')], default=True).set_prop("display", callback=None) # set threshold for xy detection # threshold = FloatItem(("Threshold"), # default=10., slider=False, min=0., # max=255, step=1,).set_prop("display", callback=None) # # choose threshold method # bool_ThresholdMethod = ChoiceItem(_("Threshold Method"), [(-2, 'No threshold/max value'), # (-1, 'Manual'), (0, 'Huang'), (2, 'Intermodes'), # (3, 'ReniEntropy'), (4, 'Triangle'), (5, 'Otsu'), (6, 'Yen'), # (7, 'Moments'), (8, 'IsoData'), (9, 'Peak Detection')], # default=0).set_prop("display", callback=None) # #Threshold method # #-1=manual # #0=Huang # #1=Intermodes # #2=MaxEntropy # #3=ReniEntropy # #4=Triangle # #5=Otsu # #6=Yen # #7=Moments # #8=IsoData # #9=Peak Detection # #erosion and dilatation iterations # it_eros = IntItem(_("Iter. erosion"), # default=1, slider=False, unit='pixels', # min=0).set_prop("display", callback=None) # it_dil = IntItem(_("Iter. dilatation"), # default=4, slider=False, unit='pixels', # min=0).set_prop("display", callback=None) central_rec_dist = FloatItem(_("Central Rec. dist."), default=-1.7, min=-100, max=100, unit='cm').set_prop("display", callback=None) range_rec_dist = FloatItem(_("Range Rec. dist."), default=1, min=-100, max=100, unit='cm').set_prop("display", callback=None) ratio_DOF = FloatItem(_("Ratio of DOF"), default=1, min=0.1).set_prop("display", callback=None) samplePlaneStepUM = FloatItem(_("Step size along z"), default=0, unit='um').set_prop("display", active=False) stackHeightUM = FloatItem(_("Stack Height"), default=0, unit='um').set_prop("display", active=False)
class AnotherDataSet(DataSet): """ Example 2 <b>Simple dataset example</b> """ param0 = ChoiceItem("Choice", ['deazdazk', 'aeazee', '87575757']) param1 = FloatItem("Foobar 1", default=0, min=0) a_group = BeginGroup("A group") param2 = FloatItem("Foobar 2", default=.93) param3 = FloatItem("Foobar 3", default=123) _a_group = EndGroup("A group")
class OptimizationInput(DataSet): stress_ratio = FloatItem('Stress Ratio', default=3) copper_initial = FloatItem('Copper Initial Cross-section', min=0.1, max=1.0, default=0.5) steel_initial = FloatItem('Steel Initial Cross-section', min=0.1, max=1.0, default=0.5)
class InfoData(DataSet): feed = IntItem("Feed:", default=cfeeds.default) section = IntItem("Section:", default=csections.default).set_pos(col=1, colspan=1) polar = StringItem("Polarization:", default=cpolars.default).set_pos(col=2, colspan=1) freq = FloatItem("Frequency (MHz):", default="0.0").set_pos(col=3, colspan=1) band = FloatItem("Band (MHz):", default="0.0").set_pos(col=4, colspan=1) otype = StringItem("Type:", default="") flagname = StringItem("Flag file:", default="").set_pos(col=1, colspan=1)
class minmax(DataSet): Xmin = FloatItem("X min", default=1., unit="").set_prop("display", format="%3.1f").set_pos(col=0) Xmax = FloatItem("X max", default=1., unit="").set_prop("display", format="%3.1f").set_pos(col=1) Ymin = FloatItem("Y min", default=1., unit="").set_prop("display", format="%3.1f").set_pos(col=3) Ymax = FloatItem("Y max", default=1., unit="").set_prop("display", format="%3.1f").set_pos(col=4)
class ExampleDataSet(ActivableDataSet): """ Example <b>Activable dataset example</b> """ enable = BoolItem( "Enable parameter set", help="If disabled, the following parameters will be ignored", default=False) param0 = ChoiceItem("Param 0", ['choice #1', 'choice #2', 'choice #3']) param1 = FloatItem("Param 1", default=0, min=0) param2 = FloatItem("Param 2", default=.93) color = ColorItem("Color", default="red")
class Controlset(DataSet): Directory = DirectoryItem("Directory", default=os.path.abspath("../../data/")) _bt = BeginGroup("Configuration").set_pos(col=0) Frequency = FloatItem("Frequency", default=21.1, unit="GHz").set_prop("display", format="%3.1f") IntegrationTime = FloatItem("Integration time", default=5., unit="s").set_prop("display", format="%3.1f") BlankTime = IntItem("Blank time", default=5, unit="ms") Antenna = IntItem("Antenna offset", default=1000, unit="") NSpec = IntItem("Spectra per file", default=7000, unit="") _et = EndGroup("Configuration")
class ExampleMultiGroupDataSet(DataSet): param0 = ChoiceItem("Choice", ['deazdazk', 'aeazee', '87575757']) param1 = FloatItem("Foobar 1", default=0, min=0) t_group = BeginTabGroup("T group") a_group = BeginGroup("A group") param2 = FloatItem("Foobar 2", default=.93) dir1 = DirectoryItem("Directory 1") file1 = FileOpenItem("File 1") _a_group = EndGroup("A group") b_group = BeginGroup("B group") param3 = FloatItem("Foobar 3", default=123) _b_group = EndGroup("B group") c_group = BeginGroup("C group") param4 = FloatItem("Foobar 4", default=250) _c_group = EndGroup("C group") _t_group = EndTabGroup("T group")
class first_tab(ActivableDataSet): # stock market analysis runuploaddata = ValueProp(False) enable = BoolItem( "Enable parameter set", help="If disabled, the following parameters will be ignored", default=False) default_exps_file = os.path.join(gc.data_root_folder, gc.default_exps_file) experiments_to_analyze = FileOpenItem("Stocks to analyze", formats=["csv"], basedir=gc.data_root_folder, default=default_exps_file) # Sleep sleep_help = "the application will sleep for the indicated amount of hours before starting with the processing" sleep_hours = FloatItem("Delay start (hours)", help=sleep_help, slider=True, min=0, max=48, default=0) ### #Begin of groups ### sg1 = BeginGroup("Uploading Chart Data") # xxx item1_upload_data = BoolItem("Upload Data").set_prop("display", store=runuploaddata) _sg1 = EndGroup("Uploading Chart Data")
class ModifyParam(DataSet): """ Modification Parameter Setting Linear: New Array = a * Original Array + b <br> Moving Average: Decide point number(to get average, or regard it as sinc filter) """ text = StringItem("New Name", default="Modify_" + name) a = FloatItem("a :", default=1.0) b = FloatItem("b :", default=0.0) _en = GetAttrProp("enable") enable = BoolItem( "Enable Moving Average", help="If disabled, the following parameters will be ignored", default=False).set_prop("display", store=_en) points = IntItem("Window", default=5, min=1).set_prop("display", active=FuncProp(_en, lambda x: x))
class OtherDataSet(DataSet): title = StringItem("Title", default="Title") icon = ChoiceItem( "Icon", ( ("python.png", "Python"), ("guidata.svg", "guidata"), ("settings.png", "Settings"), ), ) opacity = FloatItem("Opacity", default=1.0, min=0.1, max=1)
class Parameters(DataSet): ex_mw = StringItem("Excitting Microwave", default="TCPIP::10.122.7.103::INSTR") lo_mw = StringItem("LO Microwave", default="TCPIP::10.122.7.102::INSTR") me_mw = StringItem("Measurement Microwave", default="TCPIP::10.122.7.101::INSTR") awg = StringItem("AWG", default="TCPIP::10.122.7.100::INSTR") #me_power = FloatItem("Measuerment Power (dBm)", # default=10, min=-135, max=25, step=0.01, slider=True) f_range_s = FloatItem("Frequency start (GHz)", default=9.0, min=1, max=20, step=0.01) f_range_e = FloatItem("Frequency stop (GHz)", default=9.04, min=1, max=20, step=0.01).set_pos(col=1) f_range_n = IntItem("Frequency Num", default=41, min=1, max=100000).set_pos(col=2) p_range_s = FloatItem("Power start (dBm)", default=-30, min=-130, max=25, step=0.01) p_range_e = FloatItem("Power stop (dBm)", default=10.0, min=-130, max=25, step=0.01).set_pos(col=1) p_range_n = IntItem("Power Num", default=41, min=1, max=100000).set_pos(col=2) npoints = IntItem("Number of points", default=1000, min=100, max=100000)
class AutoFitParam(DataSet): xmin = FloatItem("xmin") xmax = FloatItem("xmax") method = ChoiceItem(_("Method"), [ ("simplex", "Simplex"), ("powel", "Powel"), ("bfgs", "BFGS"), ("l_bfgs_b", "L-BFGS-B"), ("cg", _("Conjugate Gradient")), ("ncg", _("Newton Conjugate Gradient")), ("lq", _("Least squares")), ], default="lq") maxfun = IntItem( "maxfun", default=20000, help= _("Maximum of function evaluation. for simplex, powel, least squares, cg, bfgs, l_bfgs_b" )) maxiter = IntItem( "maxiter", default=20000, help= _("Maximum of iterations. for simplex, powel, least squares, cg, bfgs, l_bfgs_b" )) err_norm = StringItem("enorm", default='2.0', help=_("for simplex, powel, cg and bfgs norm used " "by the error function")) xtol = FloatItem("xtol", default=0.0001, help=_("for simplex, powel, least squares")) ftol = FloatItem("ftol", default=0.0001, help=_("for simplex, powel, least squares")) gtol = FloatItem("gtol", default=0.0001, help=_("for cg, bfgs")) norm = StringItem("norm", default="inf", help=_("for cg, bfgs. inf is max, -inf is min"))
class TestParameters(DataSet): """ DataSet test The following text is the DataSet 'comment': <br>Plain text or <b>rich text<sup>2</sup></b> are both supported, as well as special characters (α, β, γ, δ, ...) """ dir = DirectoryItem("Directory", TEMPDIR) fname = FileOpenItem("Open file", ("csv", "eta"), FILE_CSV.name) fnames = FilesOpenItem("Open files", "csv", FILE_CSV.name) fname_s = FileSaveItem("Save file", "eta", FILE_ETA.name) string = StringItem("String") text = TextItem("Text") float_slider = FloatItem("Float (with slider)", default=0.5, min=0, max=1, step=0.01, slider=True) integer = IntItem("Integer", default=5, min=3, max=16, slider=True).set_pos(col=1) dtime = DateTimeItem("Date/time", default=datetime.datetime(2010, 10, 10)) date = DateItem("Date", default=datetime.date(2010, 10, 10)).set_pos(col=1) bool1 = BoolItem("Boolean option without label") bool2 = BoolItem("Boolean option with label", "Label") _bg = BeginGroup("A sub group") color = ColorItem("Color", default="red") choice = ChoiceItem("Single choice 1", [('16', "first choice"), ('32', "second choice"), ('64', "third choice")]) mchoice2 = ImageChoiceItem("Single choice 2", [("rect", "first choice", "gif.png"), ("ell", "second choice", "txt.png"), ("qcq", "third choice", "file.png")]) _eg = EndGroup("A sub group") floatarray = FloatArrayItem("Float array", default=np.ones((50, 5), float), format=" %.2e ").set_pos(col=1) mchoice3 = MultipleChoiceItem("MC type 1", [str(i) for i in range(12)]).horizontal(4) mchoice1 = MultipleChoiceItem( "MC type 2", ["first choice", "second choice", "third choice" ]).vertical(1).set_pos(col=1)
class Info(DataSet): """Input Info About Data Please input infomation about the given data: Data File: Data File to be Converted SkipRows: Skip how many rows before reading data Fs: Fs of the data Lens: Length of the data Unit: Unit of the data ExpName: Experiment Name ExpCount: The counter of the experiment ChanelNum: The Start of Chanel Number """ Fname = FileOpenItem("Data File: ") SkipRows = IntItem('SkipRows:', min=0, default=0) Fs = FloatItem('Fs: ', min=0, default=250) Lens = IntItem('Lens:', min=0, default=0) Unit = StringItem('Unit:', default='m/ss') ExpName = StringItem('ExpName', default='Test') ExpCount = IntItem('ExpCount:', min=1, default=1) ChanelNum = IntItem('ChanelNum:', min=1, default=1)
class HKset(DataSet): _bc = BeginGroup("Cryostat").set_pos(col=0) Cold_Load = FloatItem("Cold Load", default=1., unit="K").set_prop("display", format="%4.2f") Hot_Load = FloatItem("Hot Load", default=1., unit="K").set_prop("display", format="%4.2f") HEMT = FloatItem("HEMT", default=1., unit="K").set_prop("display", format="%4.2f") _ec = EndGroup("Cryostat") _bfa = BeginGroup("CTS Filters").set_pos(col=1) T3_A = FloatItem("CTS1 A", default=1., unit="K").set_prop("display", format="%4.2f") T3_B = FloatItem("CTS1 B", default=1., unit="K").set_prop("display", format="%4.2f") T2_A = FloatItem("CTS2 A", default=1., unit="K").set_prop("display", format="%4.2f") T2_B = FloatItem("CTS2 B", default=1., unit="K").set_prop("display", format="%4.2f") _efa = EndGroup("CTS Filters") _bfb = BeginGroup("Other").set_pos(col=2) T6_A = FloatItem("T6 A", default=1., unit="K").set_prop("display", format="%4.2f") T6_B = FloatItem("T6 B", default=1., unit="K").set_prop("display", format="%4.2f") T7_A = FloatItem("T7 A", default=1., unit="K").set_prop("display", format="%4.2f") T7_B = FloatItem("T7 B", default=1., unit="K").set_prop("display", format="%4.2f") _efb = EndGroup("Other") choice = [(-2, "short circuit"), (-1, "no sensor"), (0, "Pirani"), (1, "Pirani/Cathode")] _bp = BeginGroup("Pressure").set_pos(col=3) P1_Dewar = FloatItem("P1 Dewar", default=0., unit="mbar").set_prop("display", format="%4.2f") P1_Ident = ChoiceItem("P1 Ident.", choice, default=-1) P2_Pump = FloatItem("P2 Pump", default=0., unit="mbar").set_prop("display", format="%4.2f") P2_Ident = ChoiceItem("P2 Ident.", choice, default=-1) _ep = EndGroup("Pressure")
class Parameters(DataSet): float1 = FloatItem("float #1", min=1, max=250, help="height in cm") float2 = FloatItem("float #2", min=1, max=250, help="width in cm") number = IntItem("number", min=3, max=20)