Esempio n. 1
0
 def __add_peaks(self):
     self.peaksId = wx.NewId()
     self.__add_check_tool('peaks', 'Mark peaks above threshold '
                           '(right click for options)',
                           self.__on_check_peaks,
                           self.settings.peaks,
                           toolId=self.peaksId)
     wx.EVT_TOOL_RCLICKED(self, self.peaksId, self.__on_set_peaks)
Esempio n. 2
0
    def set_type(self, display):
        for toolId in self.extraTools:
            self.DeleteTool(toolId)
        self.extraTools = []

        self.__add_spacer()

        if display == Display.PLOT:
            self.__add_auto_range(True, True, False)
            self.__add_peak()
            self.__add_peaks()

            self.__add_check_tool('fade', 'Fade plots',
                                  self.__on_check_fade,
                                  self.settings.fadeScans)
            self.__add_spacer()
            self.avgId = wx.NewId()
            self.__add_check_tool('average', 'Show average',
                                  self.__on_check_avg,
                                  toolId=self.avgId)
            self.minId = wx.NewId()
            self.__add_check_tool('min', 'Show minimum',
                                  self.__on_check_min,
                                  toolId=self.minId)
            self.maxId = wx.NewId()
            self.__add_check_tool('max', 'Show maximum',
                                  self.__on_check_max,
                                  toolId=self.maxId)
            self.varId = wx.NewId()
            self.__add_check_tool('variance', 'Show variance',
                                  self.__on_check_var,
                                  toolId=self.varId)
            self.smoothId = wx.NewId()
            self.__add_check_tool('smooth', 'Smooth (right click for options)',
                                  self.__on_check_smooth,
                                  toolId=self.smoothId)
            wx.EVT_TOOL_RCLICKED(self, self.smoothId, self.__on_set_smooth)
            self.diffId = wx.NewId()
            self.__add_check_tool('diff', 'Differentiate spectrum',
                                  self.__on_check_diff,
                                  toolId=self.diffId)

            self.__add_spacer()
            self.__add_colourmap()

        elif display == Display.SPECT:
            self.__add_auto_range(True, True, True)
            self.__add_peak()
            self.__add_peaks()
            self.smoothId = wx.NewId()
            self.__add_check_tool('smooth', 'Smooth (right click for options)',
                                  self.__on_check_smooth,
                                  toolId=self.smoothId)
            wx.EVT_TOOL_RCLICKED(self, self.smoothId, self.__on_set_smooth)
            self.diffId = wx.NewId()
            self.__add_check_tool('diff', 'Differentiate spectrum',
                                  self.__on_check_diff,
                                  toolId=self.diffId)
            self.__add_spacer()
            self.__add_colourmap(False)

        elif display == Display.SURFACE:
            self.__add_auto_range(True, True, True)
            self.__add_peak()
            self.__add_peaks()
            self.smoothId = wx.NewId()
            self.__add_check_tool('smooth', 'Smooth (right click for options)',
                                  self.__on_check_smooth,
                                  toolId=self.smoothId)
            wx.EVT_TOOL_RCLICKED(self, self.smoothId, self.__on_set_smooth)
            self.diffId = wx.NewId()
            self.__add_check_tool('diff', 'Differentiate spectrum',
                                  self.__on_check_diff,
                                  toolId=self.diffId)
            self.__add_spacer()
            self.__add_colourmap(False)
            self.__add_spacer()
            self.__add_check_tool('wireframe', 'Wireframe drawing',
                                  self.__on_check_wire,
                                  self.settings.wireframe)

        elif display == Display.TIMELINE:
            self.__add_auto_range(False, True, True)

        elif display == Display.PREVIEW:
            self.__add_check_tool('fade', 'Fade plots',
                                  self.__on_check_fade,
                                  self.settings.fadeScans)

        self.__set_func()

        self.Realize()