예제 #1
0
    def OnMenuAbout(self, event):
        info = wx.AboutDialogInfo()
        info.SetName(CrystalPlan_version.package_name)
        info.SetVersion(CrystalPlan_version.version)
        info.SetDescription(CrystalPlan_version.description)
        info.SetCopyright(CrystalPlan_version.copyright)
        info.AddDeveloper(CrystalPlan_version.author + " (" +
                          CrystalPlan_version.author_email + ")")
        info.AddDocWriter(CrystalPlan_version.author + " (" +
                          CrystalPlan_version.author_email + ")")
        info.AddArtist(
            "Icons taken from the Crystal Project,\nat http://www.everaldo.com/crystal/, \ndistributed under the LGPL; \nmodified and assembled by Janik Zikovsky"
        )

        if not gui_utils.is_mac():
            #Some of these are not natively mac-supported, not including them makes it look better on mac
            icon_file = os.path.join(os.path.dirname(__file__),
                                     CrystalPlan_version.icon_file)
            info.SetIcon(wx.Icon(icon_file, wx.BITMAP_TYPE_PNG))
            info.SetLicence(CrystalPlan_version.license)
            info.SetWebSite(CrystalPlan_version.url)

        wx.AboutBox(info)

        event.Skip()
예제 #2
0
 def load_detectors_dialog(self):
     """Open a dialog to load detectors from a CSV/detcal file."""
     filename = model.config.cfg.default_detector_filename
     (path, ignored) = os.path.split(os.path.abspath(filename))
     filters = 'CSV or detcal files|*.csv;*.detcal;*.DetCal|CSV files (*.csv)|*.csv|detcal files (*.detcal)|*.detcal;*.DetCal|All files (*)|*|'
     if gui_utils.is_mac():
         filters = ''  #This is needed on Mac, for some reason the filters crashes otherwise.
     print 'opening dialog for path', path, filename
     dialog = wx.FileDialog(
         None,
         defaultFile=filename,
         defaultDir=path,
         message=
         'Choose a .csv or .detcal file describing the detector geometry',
         wildcard=filters,
         style=wx.OPEN)
     dialog.SetFilterIndex(0)
     if dialog.ShowModal() == wx.ID_OK:
         filename = dialog.GetPath()
         dialog.Destroy()
     else:
         #'Nothing was selected.
         dialog.Destroy()
         return
     #Do load the file
     self.load_detector_file(filename)
예제 #3
0
    def _init_ctrls(self, prnt):
        # generated method, don't edit
        wx.Panel.__init__(self, id=wxID_DIALOGSTARTUP, name=u'PanelStartup',
              parent=prnt, pos=wx.Point(702, 235), size=wx.Size(600, 600))
        self.SetClientSize(wx.Size(600, 600))

        self.staticTextHelp = wx.StaticText(id=wxID_DIALOGSTARTUPSTATICTEXTHELP,
              label=u"The CrystalPlan application is used to simulate the coverage of reciprocal space of an instrument's detectors, given a list of sample orientations.",
              name=u'staticTextHelp', parent=self, pos=wx.Point(0, 40),
              style=0)
        if gui_utils.is_mac():
            self.staticTextHelp.Wrap(self.GetSize()[0]-50)

        self.staticTextSelect = wx.StaticText(id=wxID_DIALOGSTARTUPSTATICTEXTSELECT,
              label=u'Please select the instrument you will be simulating:',
              name=u'staticTextSelect', parent=self, pos=wx.Point(0, 99),
              size=wx.Size(475, 17), style=0)

        self.listInstruments = wx.ListBox(choices=['TOPAZ', 'Other Instruments...'],
              id=wxID_DIALOGSTARTUPLISTINSTRUMENTS, name=u'listInstruments',
              parent=self, pos=wx.Point(16, 116), size=wx.Size(443, 149),
              style=0)

        self.staticLine1 = wx.StaticLine(id=wxID_DIALOGSTARTUPSTATICLINE1,
              name='staticLine1', parent=self, pos=wx.Point(0, 273),
              size=wx.Size(475, 2), style=0)

        self.buttonApply = wx.Button(id=wxID_DIALOGSTARTUPbuttonApply,
              label=u'  Apply Changes  ', name=u'buttonApply', parent=self,
              pos=wx.Point(16, 563), style=0)
        self.buttonApply.Bind(wx.EVT_BUTTON, self.OnbuttonApplyButton,
              id=wxID_DIALOGSTARTUPbuttonApply)

        self.buttonQuit = wx.Button(id=wxID_DIALOGSTARTUPBUTTONQUIT,
              label=u'  Revert  ', name=u'buttonQuit', parent=self, pos=wx.Point(309,
              563), style=0)
        self.buttonQuit.Bind(wx.EVT_BUTTON, self.OnButtonQuitButton,
              id=wxID_DIALOGSTARTUPBUTTONQUIT)

        self.staticTextSpacer1 = wx.StaticText(id=wxID_DIALOGSTARTUPSTATICTEXTSPACER1,
              label=u' ', name=u'staticTextSpacer1', parent=self,
              pos=wx.Point(166, 563), size=wx.Size(320, 17), style=0)

        self.staticLine2 = wx.StaticLine(id=wxID_DIALOGSTARTUPSTATICLINE2,
              name='staticLine2', parent=self, pos=wx.Point(0, 491),
              size=wx.Size(478, 2), style=0)

        self.staticTextSpaceWarning = wx.StaticText(id=wxID_DIALOGSTARTUPSTATICTEXTSPACEWARNING,
              label=u'Warning: This many points may make calculations slow. Increase the q-space resolution, or reduce the q-space range by increasing d_min.',
              name=u'staticTextSpaceWarning', parent=self, pos=wx.Point(0, 432),
              size=wx.Size(475, 51), style=0)
        self.staticTextSpaceWarning.SetFont(wx.Font(10, wx.SWISS, wx.NORMAL,
              wx.NORMAL, False, u'Sans'))
        self.staticTextSpaceWarning.SetForegroundColour(wx.Colour(255, 0, 0))


        self._init_sizers()
    def _init_ctrls(self, prnt):
        # generated method, don't edit
        wx.Panel.__init__(self, id=wxID_PANELTRYPOSITION,
              name=u'PanelTryPosition', parent=prnt, pos=wx.Point(679, 241),
              size=wx.Size(367, 523), style=wx.TAB_TRAVERSAL)
        self.SetClientSize(wx.Size(367, 523))

        self.staticTextHelp = wx.StaticText(id=wxID_PANELTRYPOSITIONSTATICTEXTHELP,
              label=u'This window allows you to try out a new sample orientation and see the change in coverage. Push the button at the bottom when you are happy with the result.',
              name=u'staticTextHelp', parent=self, pos=wx.Point(0, 0),
              style=0)
        #Mac fix for too-wide text.
        if gui_utils.is_mac():
            self.staticTextHelp.Wrap(self.GetSize()[0] - 50)

        self.staticLineTop = wx.StaticLine(id=wxID_PANELTRYPOSITIONSTATICLINETOP,
              name=u'staticLineTop', parent=self, pos=wx.Point(0, 68), style=0)

        self.checkAdd = wx.CheckBox(id=wxID_PANELTRYPOSITIONCHECKADD,
              label=u'Add this position (temporarily)', name=u'checkAdd',
              parent=self, pos=wx.Point(0, 78), style=0)
        self.checkAdd.SetValue(False)
        self.checkAdd.Bind(wx.EVT_CHECKBOX, self.OnCheckAddCheckbox,
              id=wxID_PANELTRYPOSITIONCHECKADD)

        self.buttonSave = wx.Button(id=wxID_PANELTRYPOSITIONBUTTONSAVE,
              label=u'Save this orientation in the list', name=u'buttonSave',
              parent=self, pos=wx.Point(0, 99), size=wx.Size(367, 29), style=0)
        self.buttonSave.Bind(wx.EVT_BUTTON, self.OnButtonSaveButton,
              id=wxID_PANELTRYPOSITIONBUTTONSAVE)

        self.staticTextWarning = wx.StaticText(id=wxID_PANELTRYPOSITIONSTATICTEXTWARNING,
              label=u'Warning! The angles cannot be achieved by the goniometer!',
              name=u'staticTextWarning', parent=self, pos=wx.Point(4, 100), style=0)
        self.staticTextWarning.SetForegroundColour(wx.Colour(255, 0, 0))
        self.staticTextWarning.Hide()

        self.staticTextWarningReason = wx.StaticText(id=wxID_PANELTRYPOSITIONSTATICTEXTWARNINGREASON,
              label=u'Reason: ', name=u'staticTextWarningReason', parent=self,
              pos=wx.Point(16, 134), style=0)
        self.staticTextWarningReason.SetFont(wx.Font(10, wx.SWISS, wx.NORMAL,
              wx.BOLD, False, u'Sans'))
        self.staticTextWarningReason.SetForegroundColour(wx.Colour(255, 0, 0))
        self.staticTextWarningReason.Hide()

        self._init_sizers()
예제 #5
0
 def load_detectors_dialog(self):
     """Open a dialog to load detectors from a CSV/detcal file."""
     filename = model.config.cfg.default_detector_filename
     (path, ignored) = os.path.split( os.path.abspath(filename) )
     filters = 'CSV or detcal files|*.csv;*.detcal;*.DetCal|CSV files (*.csv)|*.csv|detcal files (*.detcal)|*.detcal;*.DetCal|All files (*)|*|'
     if gui_utils.is_mac():
         filters = '' #This is needed on Mac, for some reason the filters crashes otherwise.
     print 'opening dialog for path', path, filename
     dialog = wx.FileDialog ( None, defaultFile=filename, defaultDir=path, message='Choose a .csv or .detcal file describing the detector geometry', wildcard=filters, style=wx.OPEN )
     dialog.SetFilterIndex(0)
     if dialog.ShowModal() == wx.ID_OK:
         filename = dialog.GetPath()
         dialog.Destroy()
     else:
         #'Nothing was selected.
         dialog.Destroy()
         return
     #Do load the file
     self.load_detector_file(filename)
예제 #6
0
    def OnMenuAbout(self, event):
        info = wx.AboutDialogInfo()
        info.SetName(CrystalPlan_version.package_name)
        info.SetVersion(CrystalPlan_version.version)
        info.SetDescription(CrystalPlan_version.description)
        info.SetCopyright(CrystalPlan_version.copyright)
        info.AddDeveloper(CrystalPlan_version.author + " (" + CrystalPlan_version.author_email + ")")
        info.AddDocWriter(CrystalPlan_version.author + " (" + CrystalPlan_version.author_email + ")")
        info.AddArtist("Icons taken from the Crystal Project,\nat http://www.everaldo.com/crystal/, \ndistributed under the LGPL; \nmodified and assembled by Janik Zikovsky")
        
        if not gui_utils.is_mac():
            #Some of these are not natively mac-supported, not including them makes it look better on mac
            icon_file = os.path.join(os.path.dirname(__file__), CrystalPlan_version.icon_file)
            info.SetIcon(wx.Icon( icon_file, wx.BITMAP_TYPE_PNG))
            info.SetLicence(CrystalPlan_version.license)
            info.SetWebSite(CrystalPlan_version.url)

        wx.AboutBox(info)

        event.Skip()
예제 #7
0
    def OnMenuUserGuide(self, event):
        """Open the user guide in a browser."""
        filename = "../docs/user_guide.html"
        absolute_file = os.path.abspath( os.path.split(__file__)[0] + "/" + filename)
        if gui_utils.is_mac():
            #Start browser on mac
            command = ['open', '"%s"' % absolute_file]
        else:
            #Start firefox
            command = ['firefox', '"%s"' % absolute_file]
        #Open in background?

        import subprocess
        #result = subprocess.Popen(command)
        os.system(" ".join(command + [" &"]))


        #if result != 0:
        #    absolute_file = os.path.abspath( os.path.split(__file__)[0] + "/" + filename)
        #    wx.MessageDialog(self, 'Sorry! There was an error opening the user guide in the webbrowser. You can find it at:\n\n%s\n\n(You can copy/paste the file path above)' % absolute_file,
        #                    'Error Opening User Guide', wx.OK|wx.ICON_ERROR).ShowModal()
            
        event.Skip()
예제 #8
0
    def OnMenuUserGuide(self, event):
        """Open the user guide in a browser."""
        filename = "../docs/user_guide.html"
        absolute_file = os.path.abspath(
            os.path.split(__file__)[0] + "/" + filename)
        if gui_utils.is_mac():
            #Start browser on mac
            command = ['open', '"%s"' % absolute_file]
        else:
            #Start firefox
            command = ['firefox', '"%s"' % absolute_file]
        #Open in background?

        import subprocess
        #result = subprocess.Popen(command)
        os.system(" ".join(command + [" &"]))

        #if result != 0:
        #    absolute_file = os.path.abspath( os.path.split(__file__)[0] + "/" + filename)
        #    wx.MessageDialog(self, 'Sorry! There was an error opening the user guide in the webbrowser. You can find it at:\n\n%s\n\n(You can copy/paste the file path above)' % absolute_file,
        #                    'Error Opening User Guide', wx.OK|wx.ICON_ERROR).ShowModal()

        event.Skip()
예제 #9
0
 def AddPage(tab, title, mac_title="", select=False):
     if (gui_utils.is_mac() or gui_utils.is_windows()) and not (mac_title==""):
         title = mac_title
     self.notebook.AddPage(tab, title, select)
예제 #10
0
 def AddPage(tab, title, mac_title="", select=False):
     if (gui_utils.is_mac()
             or gui_utils.is_windows()) and not (mac_title == ""):
         title = mac_title
     self.notebook.AddPage(tab, title, select)
예제 #11
0
    def _init_ctrls(self, prnt):
        # generated method, don't edit
        wx.Panel.__init__(self,
                          id=wxID_DIALOGSTARTUP,
                          name=u'PanelStartup',
                          parent=prnt,
                          pos=wx.Point(702, 235),
                          size=wx.Size(600, 600))
        self.SetClientSize(wx.Size(600, 600))

        self.staticTextHelp = wx.StaticText(
            id=wxID_DIALOGSTARTUPSTATICTEXTHELP,
            label=
            u"The CrystalPlan application is used to simulate the coverage of reciprocal space of an instrument's detectors, given a list of sample orientations.",
            name=u'staticTextHelp',
            parent=self,
            pos=wx.Point(0, 40),
            style=0)
        if gui_utils.is_mac():
            self.staticTextHelp.Wrap(self.GetSize()[0] - 50)

        self.staticTextSelect = wx.StaticText(
            id=wxID_DIALOGSTARTUPSTATICTEXTSELECT,
            label=u'Please select the instrument you will be simulating:',
            name=u'staticTextSelect',
            parent=self,
            pos=wx.Point(0, 99),
            size=wx.Size(475, 17),
            style=0)

        self.listInstruments = wx.ListBox(
            choices=['TOPAZ', 'Other Instruments...'],
            id=wxID_DIALOGSTARTUPLISTINSTRUMENTS,
            name=u'listInstruments',
            parent=self,
            pos=wx.Point(16, 116),
            size=wx.Size(443, 149),
            style=0)

        self.staticLine1 = wx.StaticLine(id=wxID_DIALOGSTARTUPSTATICLINE1,
                                         name='staticLine1',
                                         parent=self,
                                         pos=wx.Point(0, 273),
                                         size=wx.Size(475, 2),
                                         style=0)

        self.buttonApply = wx.Button(id=wxID_DIALOGSTARTUPbuttonApply,
                                     label=u'  Apply Changes  ',
                                     name=u'buttonApply',
                                     parent=self,
                                     pos=wx.Point(16, 563),
                                     style=0)
        self.buttonApply.Bind(wx.EVT_BUTTON,
                              self.OnbuttonApplyButton,
                              id=wxID_DIALOGSTARTUPbuttonApply)

        self.buttonQuit = wx.Button(id=wxID_DIALOGSTARTUPBUTTONQUIT,
                                    label=u'  Revert  ',
                                    name=u'buttonQuit',
                                    parent=self,
                                    pos=wx.Point(309, 563),
                                    style=0)
        self.buttonQuit.Bind(wx.EVT_BUTTON,
                             self.OnButtonQuitButton,
                             id=wxID_DIALOGSTARTUPBUTTONQUIT)

        self.staticTextSpacer1 = wx.StaticText(
            id=wxID_DIALOGSTARTUPSTATICTEXTSPACER1,
            label=u' ',
            name=u'staticTextSpacer1',
            parent=self,
            pos=wx.Point(166, 563),
            size=wx.Size(320, 17),
            style=0)

        self.staticLine2 = wx.StaticLine(id=wxID_DIALOGSTARTUPSTATICLINE2,
                                         name='staticLine2',
                                         parent=self,
                                         pos=wx.Point(0, 491),
                                         size=wx.Size(478, 2),
                                         style=0)

        self.staticTextSpaceWarning = wx.StaticText(
            id=wxID_DIALOGSTARTUPSTATICTEXTSPACEWARNING,
            label=
            u'Warning: This many points may make calculations slow. Increase the q-space resolution, or reduce the q-space range by increasing d_min.',
            name=u'staticTextSpaceWarning',
            parent=self,
            pos=wx.Point(0, 432),
            size=wx.Size(475, 51),
            style=0)
        self.staticTextSpaceWarning.SetFont(
            wx.Font(10, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Sans'))
        self.staticTextSpaceWarning.SetForegroundColour(wx.Colour(255, 0, 0))

        self._init_sizers()
예제 #12
0
    def _init_ctrls(self, prnt):
        # generated method, don't edit
        wx.Panel.__init__(self, id=wxID_PANELEXPERIMENT,
              name=u'PanelExperiment', parent=prnt, pos=wx.Point(633, 252),
              size=wx.Size(600, 849), style=wx.TAB_TRAVERSAL)
        self.SetClientSize(wx.Size(600, 849))
        self.SetAutoLayout(True)

        self.gridExp = wx.grid.Grid(id=wxID_PANELEXPERIMENTGRIDEXP,
              name=u'gridExp', parent=self, pos=wx.Point(0, 70),
              size=wx.Size(1, 1), style=0)
        self.gridExp.Bind(wx.grid.EVT_GRID_CELL_LEFT_CLICK, self.OnGridExpGridCellLeftClick)
        self.gridExp.Bind(wx.grid.EVT_GRID_CELL_LEFT_DCLICK, self.OnGridExpGridCellLeftDoubleClick)
        self.gridExp.Bind(wx.grid.EVT_GRID_CELL_RIGHT_CLICK, self.OnGridExpGridCellRightClick)
        self.gridExp.Bind(wx.grid.EVT_GRID_CELL_CHANGE, self.OnGridExpGridCellChange)
        self.gridExp.Bind(wx.grid.EVT_GRID_EDITOR_CREATED, self.OnGridExpGridEditorCreated)
        self.gridExp.Bind(wx.grid.EVT_GRID_LABEL_LEFT_CLICK, self.OnGridExpGridLabelLeftClick)
        self.gridExp.Bind(wx.grid.EVT_GRID_LABEL_LEFT_DCLICK, self.OnGridExpGridLabelLeftDClick)
        self.gridExp.SetToolTipString("Double-click on an angle column header to sort the list by that angle.")

        self.staticTextHelp = wx.StaticText(id=wxID_PANELEXPERIMENTSTATICTEXTHELP,
              label=u'Select the sample orientations you wish to use in the experiment, and the criterion for data acquisition at each orientation.',
              name=u'staticTextHelp', parent=self, pos=wx.Point(0, 8),
              style=0)
        self.staticTextHelp.SetAutoLayout(True)
        if gui_utils.is_mac():
            self.staticTextHelp.Wrap(self.GetSize()[0]-50)

        self.staticTextEstimatedTime = wx.StaticText(id=wxID_PANELEXPERIMENTSTATICTEXTESTIMATEDTIME,
              label=u'Estimated Time:', name=u'staticTextEstimatedTime',
              parent=self, size=wx.Size(100, 35), style=0) #wx.ST_NO_AUTORESIZE)
        self.staticTextEstimatedTime.SetAutoLayout(True)

        self.checkUseAll = wx.CheckBox(id=wxID_PANELEXPERIMENTcheckUseAll,
              label=u'Use All', name=u'checkUseAll', parent=self,
              pos=wx.Point(8, 36), size=wx.Size(95, 22), style=0)
        self.checkUseAll.SetValue(True)
        self.checkUseAll.Bind(wx.EVT_CHECKBOX, self.OncheckUseAllCheckbox,
              id=wxID_PANELEXPERIMENTcheckUseAll)
        self.checkUseAll.SetToolTipString("Check the box to use all the sample orientations in the list; uncheck it to clear the list.")

        self.staticTextHighlighted = wx.StaticText(label=u'Highlighted Rows:',
              name=u'staticTextHighlighted', parent=self, pos=wx.Point(0, 8),
              style=0)
        self.staticTextHighlighted.SetAutoLayout(True)

        self.buttonUseHighlighted = wx.Button(label=u'Use', name=u'buttonUseHighlighted', parent=self,
              pos=wx.Point(4, 734), size=wx.Size(65, 29), style=0)
        self.buttonUseHighlighted.SetToolTipString(u'Select to use all the highlighted rows in the grid below.')
        self.buttonUseHighlighted.Bind(wx.EVT_BUTTON, self.OnButtonUseHighlighted)

        self.buttonDontUseHighlighted = wx.Button(label=u" Don't Use ", name=u'buttonDontUseHighlighted', parent=self,
              pos=wx.Point(4, 734), size=wx.Size(95, 29), style=0)
        self.buttonDontUseHighlighted.SetToolTipString(u'Select not to use all the highlighted rows in the grid below.')
        self.buttonDontUseHighlighted.Bind(wx.EVT_BUTTON, self.OnButtonDontUseHighlighted)

        self.buttonDeleteAll = wx.Button(id=wxID_PANELEXPERIMENTBUTTONDELETEALL,
              label=u'  Delete All  ', name=u'buttonDeleteAll', parent=self,
              pos=wx.Point(4, 734), style=0)
        self.buttonDeleteAll.SetToolTipString(u'Delete all the orientations in the list.')
        self.buttonDeleteAll.Bind(wx.EVT_BUTTON, self.OnButtonDeleteAllButton,
              id=wxID_PANELEXPERIMENTBUTTONDELETEALL)

        self.buttonDeleteHighlighted = wx.Button(id=wxID_PANELEXPERIMENTBUTTONDELETEHIGHLIGHTED,
              label=u'  Delete Highlighted  ', name=u'buttonDeleteHighlighted',
              parent=self, pos=wx.Point(97, 734), style=0)
        self.buttonDeleteHighlighted.SetToolTipString(u'Delete the orientations in rows above that are highlighted.')
        self.buttonDeleteHighlighted.Bind(wx.EVT_BUTTON,
              self.OnButtonDeleteHighlightedButton,
              id=wxID_PANELEXPERIMENTBUTTONDELETEHIGHLIGHTED)

        self.buttonDeleteUnused = wx.Button(id=wxID_PANELEXPERIMENTBUTTONDELETEUNUSED,
              label=u'  Delete Unused  ', name=u'buttonDeleteUnused', parent=self,
              pos=wx.Point(249, 734), style=0)
        self.buttonDeleteUnused.SetToolTipString(u'Delete all the orientations in the list that are unused (unchecked).')
        self.buttonDeleteUnused.Bind(wx.EVT_BUTTON,
              self.OnButtonDeleteUnusedButton,
              id=wxID_PANELEXPERIMENTBUTTONDELETEUNUSED)

        self.buttonSaveToCSV = wx.Button(id=wxID_PANELEXPERIMENTBUTTONSAVETOCSV,
              label=u'  Save to .CSV file  ', name=u'buttonSaveToCSV', parent=self,
              pos=wx.Point(0, 804), style=0)
        self.buttonSaveToCSV.Bind(wx.EVT_BUTTON, self.OnButtonSaveToCSVButton,
              id=wxID_PANELEXPERIMENTBUTTONSAVETOCSV)
        self.buttonSaveToCSV.SetToolTipString("Choose a path to save the list of sample orientations to a .CSV file compatible with PyDas (SNS data acquisition system python scripting).")

        self.buttonOptimizer = wx.Button(id=wx.NewId(), label=u'  Automatic Coverage Optimizer...  ', name=u'buttonOptimizer', parent=self,
              pos=wx.Point(0, 804), style=0)
        self.buttonOptimizer.Bind(wx.EVT_BUTTON, self.OnButtonOptimizer)
        self.buttonOptimizer.SetToolTipString("Open the Experiment Plan Automatic Optimizer window.")

        self.buttonRefreshList = wx.Button(id=wxID_PANELEXPERIMENTBUTTONREFRESHLIST,
              label=u' Refresh List ', name=u'buttonRefreshList', parent=self,
              pos=wx.Point(240, 33), style=0)
        self.buttonRefreshList.Bind(wx.EVT_BUTTON,
              self.OnButtonRefreshListButton,
              id=wxID_PANELEXPERIMENTBUTTONREFRESHLIST)

        self.buttonChangeStopping = wx.Button(id=wx.NewId(),
              label=u'  Change Stopping Criteria  ', name=u'buttonChangeStopping', parent=self,
              pos=wx.Point(240, 33), style=0)
        self.buttonChangeStopping.Bind(wx.EVT_BUTTON, self.OnButtonChangeStopping)
        self.buttonChangeStopping.SetToolTipString("Change the stopping criteria and value for all selected rows.")
              
        self._init_sizers()
    def _init_ctrls(self, prnt):
        # generated method, don't edit
        wx.Panel.__init__(self,
                          id=wxID_PANELEXPERIMENT,
                          name=u'PanelExperiment',
                          parent=prnt,
                          pos=wx.Point(633, 252),
                          size=wx.Size(600, 849),
                          style=wx.TAB_TRAVERSAL)
        self.SetClientSize(wx.Size(600, 849))
        self.SetAutoLayout(True)

        self.gridExp = wx.grid.Grid(id=wxID_PANELEXPERIMENTGRIDEXP,
                                    name=u'gridExp',
                                    parent=self,
                                    pos=wx.Point(0, 70),
                                    size=wx.Size(1, 1),
                                    style=0)
        self.gridExp.Bind(wx.grid.EVT_GRID_CELL_LEFT_CLICK,
                          self.OnGridExpGridCellLeftClick)
        self.gridExp.Bind(wx.grid.EVT_GRID_CELL_LEFT_DCLICK,
                          self.OnGridExpGridCellLeftDoubleClick)
        self.gridExp.Bind(wx.grid.EVT_GRID_CELL_RIGHT_CLICK,
                          self.OnGridExpGridCellRightClick)
        self.gridExp.Bind(wx.grid.EVT_GRID_CELL_CHANGE,
                          self.OnGridExpGridCellChange)
        self.gridExp.Bind(wx.grid.EVT_GRID_EDITOR_CREATED,
                          self.OnGridExpGridEditorCreated)
        self.gridExp.Bind(wx.grid.EVT_GRID_LABEL_LEFT_CLICK,
                          self.OnGridExpGridLabelLeftClick)
        self.gridExp.Bind(wx.grid.EVT_GRID_LABEL_LEFT_DCLICK,
                          self.OnGridExpGridLabelLeftDClick)
        self.gridExp.SetToolTipString(
            "Double-click on an angle column header to sort the list by that angle."
        )

        self.staticTextHelp = wx.StaticText(
            id=wxID_PANELEXPERIMENTSTATICTEXTHELP,
            label=
            u'Select the sample orientations you wish to use in the experiment, and the criterion for data acquisition at each orientation.',
            name=u'staticTextHelp',
            parent=self,
            pos=wx.Point(0, 8),
            style=0)
        self.staticTextHelp.SetAutoLayout(True)
        if gui_utils.is_mac():
            self.staticTextHelp.Wrap(self.GetSize()[0] - 50)

        self.staticTextEstimatedTime = wx.StaticText(
            id=wxID_PANELEXPERIMENTSTATICTEXTESTIMATEDTIME,
            label=u'Estimated Time:',
            name=u'staticTextEstimatedTime',
            parent=self,
            size=wx.Size(100, 35),
            style=0)  #wx.ST_NO_AUTORESIZE)
        self.staticTextEstimatedTime.SetAutoLayout(True)

        self.checkUseAll = wx.CheckBox(id=wxID_PANELEXPERIMENTcheckUseAll,
                                       label=u'Use All',
                                       name=u'checkUseAll',
                                       parent=self,
                                       pos=wx.Point(8, 36),
                                       size=wx.Size(95, 22),
                                       style=0)
        self.checkUseAll.SetValue(True)
        self.checkUseAll.Bind(wx.EVT_CHECKBOX,
                              self.OncheckUseAllCheckbox,
                              id=wxID_PANELEXPERIMENTcheckUseAll)
        self.checkUseAll.SetToolTipString(
            "Check the box to use all the sample orientations in the list; uncheck it to clear the list."
        )

        self.staticTextHighlighted = wx.StaticText(
            label=u'Highlighted Rows:',
            name=u'staticTextHighlighted',
            parent=self,
            pos=wx.Point(0, 8),
            style=0)
        self.staticTextHighlighted.SetAutoLayout(True)

        self.buttonUseHighlighted = wx.Button(label=u'Use',
                                              name=u'buttonUseHighlighted',
                                              parent=self,
                                              pos=wx.Point(4, 734),
                                              size=wx.Size(65, 29),
                                              style=0)
        self.buttonUseHighlighted.SetToolTipString(
            u'Select to use all the highlighted rows in the grid below.')
        self.buttonUseHighlighted.Bind(wx.EVT_BUTTON,
                                       self.OnButtonUseHighlighted)

        self.buttonDontUseHighlighted = wx.Button(
            label=u" Don't Use ",
            name=u'buttonDontUseHighlighted',
            parent=self,
            pos=wx.Point(4, 734),
            size=wx.Size(95, 29),
            style=0)
        self.buttonDontUseHighlighted.SetToolTipString(
            u'Select not to use all the highlighted rows in the grid below.')
        self.buttonDontUseHighlighted.Bind(wx.EVT_BUTTON,
                                           self.OnButtonDontUseHighlighted)

        self.buttonDeleteAll = wx.Button(
            id=wxID_PANELEXPERIMENTBUTTONDELETEALL,
            label=u'  Delete All  ',
            name=u'buttonDeleteAll',
            parent=self,
            pos=wx.Point(4, 734),
            style=0)
        self.buttonDeleteAll.SetToolTipString(
            u'Delete all the orientations in the list.')
        self.buttonDeleteAll.Bind(wx.EVT_BUTTON,
                                  self.OnButtonDeleteAllButton,
                                  id=wxID_PANELEXPERIMENTBUTTONDELETEALL)

        self.buttonDeleteHighlighted = wx.Button(
            id=wxID_PANELEXPERIMENTBUTTONDELETEHIGHLIGHTED,
            label=u'  Delete Highlighted  ',
            name=u'buttonDeleteHighlighted',
            parent=self,
            pos=wx.Point(97, 734),
            style=0)
        self.buttonDeleteHighlighted.SetToolTipString(
            u'Delete the orientations in rows above that are highlighted.')
        self.buttonDeleteHighlighted.Bind(
            wx.EVT_BUTTON,
            self.OnButtonDeleteHighlightedButton,
            id=wxID_PANELEXPERIMENTBUTTONDELETEHIGHLIGHTED)

        self.buttonDeleteUnused = wx.Button(
            id=wxID_PANELEXPERIMENTBUTTONDELETEUNUSED,
            label=u'  Delete Unused  ',
            name=u'buttonDeleteUnused',
            parent=self,
            pos=wx.Point(249, 734),
            style=0)
        self.buttonDeleteUnused.SetToolTipString(
            u'Delete all the orientations in the list that are unused (unchecked).'
        )
        self.buttonDeleteUnused.Bind(wx.EVT_BUTTON,
                                     self.OnButtonDeleteUnusedButton,
                                     id=wxID_PANELEXPERIMENTBUTTONDELETEUNUSED)

        self.buttonSaveToCSV = wx.Button(
            id=wxID_PANELEXPERIMENTBUTTONSAVETOCSV,
            label=u'  Save to .CSV file  ',
            name=u'buttonSaveToCSV',
            parent=self,
            pos=wx.Point(0, 804),
            style=0)
        self.buttonSaveToCSV.Bind(wx.EVT_BUTTON,
                                  self.OnButtonSaveToCSVButton,
                                  id=wxID_PANELEXPERIMENTBUTTONSAVETOCSV)
        self.buttonSaveToCSV.SetToolTipString(
            "Choose a path to save the list of sample orientations to a .CSV file compatible with PyDas (SNS data acquisition system python scripting)."
        )

        self.buttonOptimizer = wx.Button(
            id=wx.NewId(),
            label=u'  Automatic Coverage Optimizer...  ',
            name=u'buttonOptimizer',
            parent=self,
            pos=wx.Point(0, 804),
            style=0)
        self.buttonOptimizer.Bind(wx.EVT_BUTTON, self.OnButtonOptimizer)
        self.buttonOptimizer.SetToolTipString(
            "Open the Experiment Plan Automatic Optimizer window.")

        self.buttonRefreshList = wx.Button(
            id=wxID_PANELEXPERIMENTBUTTONREFRESHLIST,
            label=u' Refresh List ',
            name=u'buttonRefreshList',
            parent=self,
            pos=wx.Point(240, 33),
            style=0)
        self.buttonRefreshList.Bind(wx.EVT_BUTTON,
                                    self.OnButtonRefreshListButton,
                                    id=wxID_PANELEXPERIMENTBUTTONREFRESHLIST)

        self.buttonChangeStopping = wx.Button(
            id=wx.NewId(),
            label=u'  Change Stopping Criteria  ',
            name=u'buttonChangeStopping',
            parent=self,
            pos=wx.Point(240, 33),
            style=0)
        self.buttonChangeStopping.Bind(wx.EVT_BUTTON,
                                       self.OnButtonChangeStopping)
        self.buttonChangeStopping.SetToolTipString(
            "Change the stopping criteria and value for all selected rows.")

        self._init_sizers()