コード例 #1
0
    def doUI(self):
        self.setModal(True)

        nolimit = [-float('inf'),float('inf')]

        self.input_name  = textInput( self,'',[0              , 0, self.nl, self.ls],'Parameter name' )
        self.input_units = textInput( self,'',[self.nl        , 0, self.ul, self.ls],'Parameter units')
        self.input_value = floatInput(self,nolimit,8,'',[self.nl+self.ul, 0, self.vl, self.ls],'Parameter value')
        self.button_add  = queryButton("Add",self,'',[0,self.ls],self.add_parameter)

        self.label_name  = simpleText(self,"Parameter name" , [0              , self.ls*3, self.nl, self.ls])
        self.label_units = simpleText(self,"Parameter units", [self.nl        , self.ls*3, self.ul, self.ls])
        self.label_value = simpleText(self,"Parameter value", [self.nl+self.ul, self.ls*3, self.vl, self.ls])

        self.list_parameters = simpleList(self          ,[0      , self.ls*4, self.nl+self.ul+self.vl, self.ls*4], [])
        self.list_parameters.setFont(gui.QFont("Lucida Console",8))

        self.button_remove = queryButton('Remove selected'  , self, '', [0                         , self.ls*8],self.remove_selected)
        self.button_clear  = queryButton('Clear all'        , self, '', [self.nl-167               , self.ls*8],self.remove_all     )
        self.button_write  = queryButton('Write parameters' , self, '', [self.nl+self.ul+self.vl-92, self.ls*8],self.write_parameters )

        self.setFixedSize(self.nl+self.ul+self.vl,self.ls*9)
        self.setWindowTitle("Parameter box")

        self.show()
コード例 #2
0
    def doUI(self):
        self.setModal(True)

        self.input_user    = textInput(self,'',[0      , 0, self.ul, self.ls],'user')
        self.input_comment = textInput(self,'',[self.ul, 0, self.cl, self.ls],'comment body')
        self.button_add    = queryButton("Add",self,'',[0,self.ls],self.add_comment)

        self.label_user    = simpleText(self,"User"   ,[0      , self.ls*3, self.ul        , self.ls  ])
        self.label_comment = simpleText(self,"Comment",[self.ul, self.ls*3, self.cl        , self.ls  ])

        self.list_comments = simpleList(self          ,[0      , self.ls*4, self.ul+self.cl, self.ls*4], [])
        self.list_comments.setFont(gui.QFont("Lucida Console",8))

        self.button_remove = queryButton('Remove selected', self, '', [0                 , self.ls*8],self.remove_selected)
        self.button_clear  = queryButton('Clear all'      , self, '', [self.ul-39        , self.ls*8],self.remove_all     )
        self.button_write  = queryButton('Write comments' , self, '', [self.ul+self.cl-84, self.ls*8],self.write_comments )

        self.setFixedSize(self.ul+self.cl,self.ls*9)
        self.setWindowTitle("Comment box")

        self.show()
コード例 #3
0
ファイル: details.py プロジェクト: afylab/Data-Vault-Explorer
    def doUI(self):
        self.label_name = simpleText(self, "Name",
                                     [0, self.ls * 0, self.ll, self.ls])
        self.label_filenum = simpleText(self, "File number",
                                        [0, self.ls * 1, self.ll, self.ls])
        self.label_location = simpleText(self, "Location",
                                         [0, self.ls * 2, self.ll, self.ls])
        self.label_comments = simpleText(self, "Comment count",
                                         [0, self.ls * 3, self.ll, self.ls])
        self.label_parameters = simpleText(self, "Parameter count",
                                           [0, self.ls * 4, self.ll, self.ls])
        self.label_created = simpleText(self, "Date created",
                                        [0, self.ls * 5, self.ll, self.ls])
        self.value_name = simpleText(self, "",
                                     [self.ll, self.ls * 0, self.vl, self.ls])
        self.value_filenum = simpleText(
            self, "", [self.ll, self.ls * 1, self.vl, self.ls])
        self.value_location = simpleText(
            self, "", [self.ll, self.ls * 2, self.vl, self.ls])
        self.value_comments = simpleText(
            self, "", [self.ll, self.ls * 3, self.vl, self.ls])
        self.value_parameters = simpleText(
            self, "", [self.ll, self.ls * 4, self.vl, self.ls])
        self.value_created = simpleText(
            self, "", [self.ll, self.ls * 5, self.vl, self.ls])

        self.label_independents = simpleText(
            self, "Independents",
            [self.ll + self.vl + self.ls, self.ls * 0, self.ll, self.ls])
        self.label_dependents = simpleText(
            self, "Dependents",
            [self.ll + self.vl + self.ls, self.ls * 4, self.ll, self.ls])
        self.list_independents = simpleList(self, [
            self.ll * 2 + self.vl + self.ls, self.ls * 0, self.vl, self.ls * 3
        ], [])
        self.list_dependents = simpleList(self, [
            self.ll * 2 + self.vl + self.ls, self.ls * 4, self.vl, self.ls * 3
        ], [])

        self.button_export = queryButton("Export to CSV", self, '',
                                         [0, self.height - (self.ls + 25)],
                                         self.export)
コード例 #4
0
ファイル: details.py プロジェクト: afylab/Data-Vault-Explorer
    def doUI(self):
        self.label_name       = simpleText(self,"Name"           ,[0,self.ls*0,self.ll,self.ls])
        self.label_filenum    = simpleText(self,"File number"    ,[0,self.ls*1,self.ll,self.ls])
        self.label_location   = simpleText(self,"Location"       ,[0,self.ls*2,self.ll,self.ls])
        self.label_comments   = simpleText(self,"Comment count"  ,[0,self.ls*3,self.ll,self.ls])
        self.label_parameters = simpleText(self,"Parameter count",[0,self.ls*4,self.ll,self.ls])
        self.label_created    = simpleText(self,"Date created"   ,[0,self.ls*5,self.ll,self.ls])
        self.value_name       = simpleText(self,"",[self.ll,self.ls*0,self.vl,self.ls])
        self.value_filenum    = simpleText(self,"",[self.ll,self.ls*1,self.vl,self.ls])
        self.value_location   = simpleText(self,"",[self.ll,self.ls*2,self.vl,self.ls])
        self.value_comments   = simpleText(self,"",[self.ll,self.ls*3,self.vl,self.ls])
        self.value_parameters = simpleText(self,"",[self.ll,self.ls*4,self.vl,self.ls])
        self.value_created    = simpleText(self,"",[self.ll,self.ls*5,self.vl,self.ls])

        self.label_independents = simpleText(self,"Independents",[self.ll+self.vl+self.ls,self.ls*0,self.ll,self.ls])
        self.label_dependents   = simpleText(self,"Dependents"  ,[self.ll+self.vl+self.ls,self.ls*4,self.ll,self.ls])
        self.list_independents  = simpleList(self,[self.ll*2+self.vl+self.ls,self.ls*0,self.vl,self.ls*3],[])
        self.list_dependents    = simpleList(self,[self.ll*2+self.vl+self.ls,self.ls*4,self.vl,self.ls*3],[])

        self.button_export = queryButton("Export to CSV",self,'',[0,self.height - (self.ls + 25)],self.export)
コード例 #5
0
    def __init__(
        self,
        xlabel,
        ylabel,
        xnum,
        ynum,
        xrng,
        yrng,
        parent=None,
        geometry=None,
        name="",
        ls=23,
        pl=320,
        bl=12,
        ll=128,
        ih=96,
    ):
        super(colorplotShell, self).__init__(parent)
        self.parent = parent

        # print('\nXLABEL,YLABEL')
        # print(xlabel,ylabel)

        self.xnum = xnum
        self.ynum = ynum
        self.x_ref = numpy.linspace(xrng[0], xrng[1], xnum)
        self.y_ref = numpy.linspace(yrng[0], yrng[1], ynum)

        self.x_min = str(xrng[0])[:6]
        self.x_med = str((xrng[0] + xrng[1]) / 2.0)[:6]
        self.x_max = str(xrng[1])[:6]
        self.y_min = str(yrng[0])[:6]
        self.y_med = str((yrng[0] + yrng[1]) / 2.0)[:6]
        self.y_max = str(yrng[1])[:6]

        self.colorplot = colorplotInstance(xlabel, ylabel, xnum, ynum, self, [ls * 3, 0, pl, pl], [ls * 2, 0, ls, pl])

        self.ls = ls  # line spacing
        self.pl = pl  # plot sidelength
        self.bl = bl  # bar length & spacing
        self.ll = ll  # label length

        # y labels
        # self.label_top = verticalLabel(self,self.y_max,[8,32],[ls*3+pl,0       ,8,32])
        # self.label_mid = verticalLabel(self,self.y_med,[8,32],[ls*3+pl,pl//2-16,8,32])
        # self.label_bot = verticalLabel(self,self.y_min,[8,32],[ls*3+pl,pl-32   ,8,32])
        self.label_top = simpleLabel(
            self,
            self.y_max,
            [ls * 3 + pl + 2, 11, ll // 2, ls],
            "Y setting (%s) maximum value (%s)" % (ylabel, self.y_max),
        )
        self.label_mid = simpleLabel(
            self,
            self.y_med,
            [ls * 3 + pl + 2, int(pl // 2 - ls // 2) + 3, ll // 2, ls],
            "Y setting (%s) median value (%s)" % (ylabel, self.y_med),
        )
        self.label_bot = simpleLabel(
            self,
            self.y_min,
            [ls * 3 + pl + 2, pl - (1 * ls + 3), ll // 2, ls],
            "Y setting (%s) minimum value (%s)" % (ylabel, self.y_min),
        )
        self.label_y_axis = simpleLabel(
            self,
            str(ylabel),
            [ls * 3 + pl + 2, pl - (2 * ls + 3) + ls // 2, ll, ls],
            "Y setting (what's being swept along the y axis",
        )

        # x labels
        self.label_left = simpleLabel(
            self, self.x_min, [ls * 3 + 12, pl, ll // 2, ls], "X setting (%s) minimum value (%s)" % (xlabel, self.x_min)
        )
        self.label_center = simpleLabel(
            self,
            self.x_med,
            [ls * 3 + 18 + (pl - ll // 2) // 2, pl, ll // 2, ls],
            "X setting (%s) median value (%s)" % (xlabel, self.x_med),
        )
        self.label_right = simpleLabel(
            self,
            self.x_max,
            [ls * 3 + 24 + (pl - ll // 2), pl, ll // 2, ls],
            "X setting (%s) maximum value (%s)" % (xlabel, self.x_max),
        )
        self.label_x_axis = simpleLabel(
            self, str(xlabel), [ls * 3 + 12, pl + ls // 2, ll, ls], "X setting (what's being swept along the x axis"
        )

        # Horizontal slice
        self.plot_horizontal_slice = plotInstance(None, None, xrng, [], [], self, [3 * ls, pl + 1 * ls, pl, ih])
        self.plot_horizontal_slice.plot.getAxis("bottom").setHeight(12)
        self.plot_horizontal_slice.plot.getAxis("left").setWidth(20)
        self.plot_horizontal_slice.plot.enableAutoRange()

        # Vertical slice
        self.plot_vertical_slice = plotInstance(None, None, yrng, [], [], self, [6 * ls + pl, 0, ih, pl])
        self.plot_vertical_slice.plot.getAxis("left").setWidth(20)
        self.plot_vertical_slice.plot.getAxis("bottom").setHeight(12)
        self.plot_vertical_slice.plot.enableAutoRange()

        # Can be 'follow' or 'static'
        # Follow makes the slice point assume the position of each measurement done as it's completed,
        # Static makes the slice point user-defined and not change (unless redefined)
        self.slice_mode = "follow"  #
        self.slice_point = [0, 0]  # [xnum,ynum]

        # slice mode buttons
        # print(dir(self.parent.det))
        # print(self.parent.det.items())
        # print(str(self.parent.det['setting_details'].name))
        self.label_measurement_name = simpleText(self, name, [pl + ls * 4, pl + 1 * ls, ll, ls], "OBJTT")
        self.button_auto_slice = queryButton("Auto slice", self, "", [pl + ls * 4, pl + 2 * ls], self.enable_auto_slice)
        self.button_choose_slice = queryButton(
            "Choose point", self, "", [pl + ls * 4, pl + 3 * ls], self.choose_slice_point
        )
        self.button_reset_slices = queryButton(
            "Reset slice view", self, "", [pl + ls * 4, pl + 4 * ls], self.reset_slice_view
        )

        self.setMinimumSize(6 * ls + pl + ih, 1 * ls + pl + ih)
        self.setGeometry(geometry[0], geometry[1], geometry[2], geometry[3])
コード例 #6
0
    def doUI(self):
        # background
        # self.setBackground(gui.QColor('black'))

        # use self.det
        if self.kind == "1d":
            self.stepsize = (self.det["stop"] - self.det["start"]) / (self.det["steps"])
            self.xsetting = self.det["start"]  # current value of setting. Starts at beginning.
        elif self.kind == "2d":
            self.x_stepsize = (self.det["xstop"] - self.det["xstart"]) / (self.det["xsteps"])
            self.y_stepsize = (self.det["ystop"] - self.det["ystart"]) / (self.det["ysteps"])
            self.x_setting = self.det["xstart"]
            self.y_setting = self.det["ystart"]
            self.x_num = 0
            self.y_num = 0

        # labels / info
        t = self.det["start_timestamp"]
        time_text = "Sweep started at: %i/%i/%i %i:%i:%i" % (
            t.tm_mon,
            t.tm_mday,
            t.tm_year,
            t.tm_hour,
            t.tm_min,
            t.tm_sec,
        )
        self.label_starttime = simpleText(self, time_text, [0, 0, self.gw // 2 + 74, self.ls])
        self.label_stepsdone = simpleText(
            self, "Measurements done: %i" % (self.measurements_completed), [0, self.ls * 1, self.gw // 2, self.ls]
        )

        if self.kind == "1d":
            self.meas_total = self.det["steps"] + 1
        elif self.kind == "2d":
            self.meas_total = self.det["xnum"] * self.det["ynum"]

        self.label_stepstotal = simpleText(
            self, "Measurements total: %i" % (self.meas_total), [0, self.ls * 2, self.gw // 2, self.ls]
        )
        self.progress_bar = gui.QProgressBar(self)
        self.progress_bar.setRange(0, self.meas_total)
        self.progress_bar.setGeometry(0, self.ls * 3, self.gw // 2, self.ls)

        # sweep control
        self.button_pause = queryButton("Pause", self, "", [self.gw // 2, self.ls * 1], self.pause)
        self.button_resume = queryButton("Resume", self, "", [self.gw // 2, self.ls * 2], self.resume)
        self.button_cancel = queryButton("Cancel", self, "", [self.gw // 2, self.ls * 3], self.cancel)
        self.checkbox_cancel = checkBox(self, "Confirm", [self.gw // 2 + 76, self.ls * 3 - 3])

        # 'set graphs to automatic' button
        self.button_graph_auto = queryButton("Reset graph view", self, "", [0, self.ls * 4], self.reset_graph_views)

        # completion readout
        self.label_complete_time = simpleText(
            self, "Completed at:", [self.gw // 2 + 76 + self.ls, self.ls * 0, self.gw // 2, self.ls]
        )
        self.label_complete_rate = simpleText(
            self, "Average rate:", [self.gw // 2 + 76 + self.ls, self.ls * 1, self.gw // 2, self.ls]
        )
        self.label_current_rate = simpleText(
            self, "Current rate:", [self.gw // 2 + 76 + self.ls, self.ls * 2, self.gw // 2, self.ls]
        )

        # data set name, location
        self.input_logname = textInput(self, "", [self.gw + 76 + self.ls * 2, self.ls * 0, self.ll, self.ls])
        self.input_logdest = textInput(self, "", [self.gw + 76 + self.ls * 2, self.ls * 1, self.ll, self.ls])
        self.input_logname.setPlaceholderText("Dataset name")
        self.input_logdest.setPlaceholderText("Dataset location")
        self.input_logdest.setText(self.det["dv_loc"])
        self.input_logname.setText(self.det["dv_name"])
        self.input_logdest.setToolTip(
            "Folders separated by '\\' characters.\nNo leading or trailing backslash.\nExample: data\\testing\\2016\nDefault: data"
        )

        # data logging (data vault) details
        self.button_add_comments = queryButton(
            "Add comment(s)", self, "", [self.ll + self.gw + 76 + self.ls * 3, self.ls * 0], self.add_comments
        )
        self.button_add_parameters = queryButton(
            "Add parameter(s)", self, "", [self.ll + self.gw + 76 + self.ls * 3, self.ls * 1], self.add_parameters
        )
        self.button_log_data = queryButton(
            "Write data set", self, "", [self.ll + self.gw + 76 + self.ls * 3, self.ls * 2], self.log_data
        )

        # colormap
        if self.kind == "2d":
            self.label_colormap = simpleText(
                self, "Color map:", [self.ll * 2 + self.ls * 2 + self.gw + 76 + self.ls * 2, 0, 64, self.ls]
            )
            self.dropdown_colormap = simpleDropdown(
                self,
                ["None", "Custom"] + maps.keys(),
                [self.ll * 2 + self.ls * 2 + self.gw + self.ls * 2 + 76 + 64, 0, 64, self.ls],
                self.change_colormap,
            )
            self.button_custommap = queryButton(
                "Custom", self, "", [self.ll * 2 + self.ls * 2 + self.gw + 76 + self.ls * 2, self.ls], self.cust_map
            )
        elif self.kind == "1d":
            self.label_colormap = self.dropdown_colormap = self.button_custommap = None

        # open dataset if autosave is on
        if self.det["dv_autosave"]:
            self.open_dataset()
コード例 #7
0
    def __init__(self,
                 xlabel,
                 ylabel,
                 xnum,
                 ynum,
                 xrng,
                 yrng,
                 parent=None,
                 geometry=None,
                 name="",
                 ls=23,
                 pl=320,
                 bl=12,
                 ll=128,
                 ih=96):
        super(colorplotShell, self).__init__(parent)
        self.parent = parent

        #print('\nXLABEL,YLABEL')
        #print(xlabel,ylabel)

        self.xnum = xnum
        self.ynum = ynum
        self.x_ref = numpy.linspace(xrng[0], xrng[1], xnum)
        self.y_ref = numpy.linspace(yrng[0], yrng[1], ynum)

        self.x_min = str(xrng[0])[:6]
        self.x_med = str((xrng[0] + xrng[1]) / 2.0)[:6]
        self.x_max = str(xrng[1])[:6]
        self.y_min = str(yrng[0])[:6]
        self.y_med = str((yrng[0] + yrng[1]) / 2.0)[:6]
        self.y_max = str(yrng[1])[:6]

        self.colorplot = colorplotInstance(xlabel, ylabel, xnum, ynum, self,
                                           [ls * 3, 0, pl, pl],
                                           [ls * 2, 0, ls, pl])

        self.ls = ls  # line spacing
        self.pl = pl  # plot sidelength
        self.bl = bl  # bar length & spacing
        self.ll = ll  # label length

        # y labels
        #self.label_top = verticalLabel(self,self.y_max,[8,32],[ls*3+pl,0       ,8,32])
        #self.label_mid = verticalLabel(self,self.y_med,[8,32],[ls*3+pl,pl//2-16,8,32])
        #self.label_bot = verticalLabel(self,self.y_min,[8,32],[ls*3+pl,pl-32   ,8,32])
        self.label_top = simpleLabel(
            self, self.y_max, [ls * 3 + pl + 2, 11, ll // 2, ls],
            "Y setting (%s) maximum value (%s)" % (ylabel, self.y_max))
        self.label_mid = simpleLabel(
            self, self.y_med,
            [ls * 3 + pl + 2,
             int(pl // 2 - ls // 2) + 3, ll // 2, ls],
            "Y setting (%s) median value (%s)" % (ylabel, self.y_med))
        self.label_bot = simpleLabel(
            self, self.y_min,
            [ls * 3 + pl + 2, pl - (1 * ls + 3), ll // 2, ls],
            "Y setting (%s) minimum value (%s)" % (ylabel, self.y_min))
        self.label_y_axis = simpleLabel(
            self, str(ylabel),
            [ls * 3 + pl + 2, pl - (2 * ls + 3) + ls // 2, ll, ls],
            "Y setting (what's being swept along the y axis")

        # x labels
        self.label_left = simpleLabel(
            self, self.x_min, [ls * 3 + 12, pl, ll // 2, ls],
            "X setting (%s) minimum value (%s)" % (xlabel, self.x_min))
        self.label_center = simpleLabel(
            self, self.x_med,
            [ls * 3 + 18 + (pl - ll // 2) // 2, pl, ll // 2, ls],
            "X setting (%s) median value (%s)" % (xlabel, self.x_med))
        self.label_right = simpleLabel(
            self, self.x_max, [ls * 3 + 24 + (pl - ll // 2), pl, ll // 2, ls],
            "X setting (%s) maximum value (%s)" % (xlabel, self.x_max))
        self.label_x_axis = simpleLabel(
            self, str(xlabel), [ls * 3 + 12, pl + ls // 2, ll, ls],
            "X setting (what's being swept along the x axis")

        # Horizontal slice
        self.plot_horizontal_slice = plotInstance(
            None, None, xrng, [], [], self, [3 * ls, pl + 1 * ls, pl, ih])
        self.plot_horizontal_slice.plot.getAxis('bottom').setHeight(12)
        self.plot_horizontal_slice.plot.getAxis('left').setWidth(20)
        self.plot_horizontal_slice.plot.enableAutoRange()

        # Vertical slice
        self.plot_vertical_slice = plotInstance(None, None, yrng, [], [], self,
                                                [6 * ls + pl, 0, ih, pl])
        self.plot_vertical_slice.plot.getAxis('left').setWidth(20)
        self.plot_vertical_slice.plot.getAxis('bottom').setHeight(12)
        self.plot_vertical_slice.plot.enableAutoRange()

        # Can be 'follow' or 'static'
        # Follow makes the slice point assume the position of each measurement done as it's completed,
        # Static makes the slice point user-defined and not change (unless redefined)
        self.slice_mode = 'follow'  #
        self.slice_point = [0, 0]  # [xnum,ynum]

        # slice mode buttons
        #print(dir(self.parent.det))
        #print(self.parent.det.items())
        #print(str(self.parent.det['setting_details'].name))
        self.label_measurement_name = simpleText(
            self, name, [pl + ls * 4, pl + 1 * ls, ll, ls], "OBJTT")
        self.button_auto_slice = queryButton("Auto slice", self, '',
                                             [pl + ls * 4, pl + 2 * ls],
                                             self.enable_auto_slice)
        self.button_choose_slice = queryButton("Choose point", self, '',
                                               [pl + ls * 4, pl + 3 * ls],
                                               self.choose_slice_point)
        self.button_reset_slices = queryButton("Reset slice view", self, '',
                                               [pl + ls * 4, pl + 4 * ls],
                                               self.reset_slice_view)

        self.setMinimumSize(6 * ls + pl + ih, 1 * ls + pl + ih)
        self.setGeometry(geometry[0], geometry[1], geometry[2], geometry[3])
コード例 #8
0
    def doUI(self):
        # background
        #self.setBackground(gui.QColor('black'))

        # use self.det
        if self.kind == '1d':
            self.stepsize = (self.det['stop'] -
                             self.det['start']) / (self.det['steps'])
            self.xsetting = self.det[
                'start']  # current value of setting. Starts at beginning.
        elif self.kind == '2d':
            self.x_stepsize = (self.det['xstop'] -
                               self.det['xstart']) / (self.det['xsteps'])
            self.y_stepsize = (self.det['ystop'] -
                               self.det['ystart']) / (self.det['ysteps'])
            self.x_setting = self.det['xstart']
            self.y_setting = self.det['ystart']
            self.x_num = 0
            self.y_num = 0

        # labels / info
        t = self.det['start_timestamp']
        time_text = "Sweep started at: %i/%i/%i %i:%i:%i" % (
            t.tm_mon, t.tm_mday, t.tm_year, t.tm_hour, t.tm_min, t.tm_sec)
        self.label_starttime = simpleText(self, time_text,
                                          [0, 0, self.gw // 2 + 74, self.ls])
        self.label_stepsdone = simpleText(
            self, "Measurements done: %i" % (self.measurements_completed),
            [0, self.ls * 1, self.gw // 2, self.ls])

        if self.kind == '1d':
            self.meas_total = self.det['steps'] + 1
        elif self.kind == '2d':
            self.meas_total = self.det['xnum'] * self.det['ynum']

        self.label_stepstotal = simpleText(
            self, "Measurements total: %i" % (self.meas_total),
            [0, self.ls * 2, self.gw // 2, self.ls])
        self.progress_bar = gui.QProgressBar(self)
        self.progress_bar.setRange(0, self.meas_total)
        self.progress_bar.setGeometry(0, self.ls * 3, self.gw // 2, self.ls)

        # sweep control
        self.button_pause = queryButton("Pause", self, '',
                                        [self.gw // 2, self.ls * 1],
                                        self.pause)
        self.button_resume = queryButton("Resume", self, '',
                                         [self.gw // 2, self.ls * 2],
                                         self.resume)
        self.button_cancel = queryButton("Cancel", self, '',
                                         [self.gw // 2, self.ls * 3],
                                         self.cancel)
        self.checkbox_cancel = checkBox(self, "Confirm",
                                        [self.gw // 2 + 76, self.ls * 3 - 3])

        # 'set graphs to automatic' button
        self.button_graph_auto = queryButton("Reset graph view", self, "",
                                             [0, self.ls * 4],
                                             self.reset_graph_views)

        # completion readout
        self.label_complete_time = simpleText(
            self, "Completed at:",
            [self.gw // 2 + 76 + self.ls, self.ls * 0, self.gw // 2, self.ls])
        self.label_complete_rate = simpleText(
            self, "Average rate:",
            [self.gw // 2 + 76 + self.ls, self.ls * 1, self.gw // 2, self.ls])
        self.label_current_rate = simpleText(
            self, "Current rate:",
            [self.gw // 2 + 76 + self.ls, self.ls * 2, self.gw // 2, self.ls])

        # data set name, location
        self.input_logname = textInput(
            self, '',
            [self.gw + 76 + self.ls * 2, self.ls * 0, self.ll, self.ls])
        self.input_logdest = textInput(
            self, '',
            [self.gw + 76 + self.ls * 2, self.ls * 1, self.ll, self.ls])
        self.input_logname.setPlaceholderText("Dataset name")
        self.input_logdest.setPlaceholderText("Dataset location")
        self.input_logdest.setText(self.det['dv_loc'])
        self.input_logname.setText(self.det['dv_name'])
        self.input_logdest.setToolTip(
            "Folders separated by '\\' characters.\nNo leading or trailing backslash.\nExample: data\\testing\\2016\nDefault: data"
        )

        # data logging (data vault) details
        self.button_add_comments = queryButton(
            "Add comment(s)", self, '',
            [self.ll + self.gw + 76 + self.ls * 3, self.ls * 0],
            self.add_comments)
        self.button_add_parameters = queryButton(
            "Add parameter(s)", self, '',
            [self.ll + self.gw + 76 + self.ls * 3, self.ls * 1],
            self.add_parameters)
        self.button_log_data = queryButton(
            "Write data set", self, '',
            [self.ll + self.gw + 76 + self.ls * 3, self.ls * 2], self.log_data)

        # colormap
        if self.kind == '2d':
            self.label_colormap = simpleText(self, "Color map:", [
                self.ll * 2 + self.ls * 2 + self.gw + 76 + self.ls * 2, 0, 64,
                self.ls
            ])
            self.dropdown_colormap = simpleDropdown(
                self, ["None", "Custom"] + maps.keys(), [
                    self.ll * 2 + self.ls * 2 + self.gw + self.ls * 2 + 76 +
                    64, 0, 64, self.ls
                ], self.change_colormap)
            self.button_custommap = queryButton("Custom", self, '', [
                self.ll * 2 + self.ls * 2 + self.gw + 76 + self.ls * 2, self.ls
            ], self.cust_map)
        elif self.kind == '1d':
            self.label_colormap = self.dropdown_colormap = self.button_custommap = None

        # open dataset if autosave is on
        if self.det['dv_autosave']: self.open_dataset()