Exemplo n.º 1
0
        def start(self):
            """
            Override the GuiMaker start
            These are things to do when the gui starts
            eg: show a message about the license and list of things to do
            Then build the actual gui
            """
            startmessage = """
  ImageD11 version %s, Copyright (C) 2005-2017 Jon Wright
  ImageD11 comes with ABSOLUTELY NO WARRANTY; for details select help,
  license. This is free software, and you are welcome to redistribute it
  under certain conditions

  Please send useful feedback to [email protected]
  """ % (__version__)

            startmessage += """
  You are using version %s

  There have been lots of changes recently!

  I would also be happily surprised if it is currently working.
  """ % (__version__)
            showinfo("Welcome to ImageD11 " + __version__, startmessage)

            # For the peaksearch menu

            self.peaksearcher = guipeaksearch.guipeaksearcher(self)

            # For the transformation menu
            from ImageD11 import guitransformer

            self.transformer = guitransformer.guitransformer(self)

            # For the indexing - supposed to generate orientations from the
            # unitcell and g-vectors
            self.indexer = guiindexer.guiindexer(self)

            self.solver = guisolver.guisolver(self)

            # Configure the menubar (lists of Tuples of (name,
            # underline_char, command_or_submenu) )
            self.menuBar = [("File", 0, [
                ("Print", 0, self.printplot), ("Exit", 1, sys.exit)
            ]), self.peaksearcher.menuitems, self.transformer.menuitems,
                            self.indexer.menuitems, self.solver.menuitems,
                            ("Plotting", 0, [
                                ("Autoscale", 0, self.autoscaleplot),
                                ("Clear plot", 0, self.clearplot),
                            ]),
                            ("Help", 0, [("Help Me!", 0, help),
                                         ("History", 1, self.history),
                                         ("Credits", 0, credits),
                                         ("License", 0, showlicense)])]
Exemplo n.º 2
0
        def start(self):
            """
            Override the GuiMaker start
            These are things to do when the gui starts
            eg: show a message about the license and list of things to do
            Then build the actual gui
            """
            from tkinter.messagebox import showinfo
            import ImageD11
            startmessage = """
  ImageD11 version %s, Copyright (C) 2005 Jon Wright
  ImageD11 comes with ABSOLUTELY NO WARRANTY; for details select help, license.
  This is free software, and you are welcome to redistribute it under certain conditions

  Please send useful feedback to [email protected]
  """%(ImageD11.__version__)

            startmessage += """
  Stuff to do:

     Implement the image peaksearching in the gui (maybe display opengl images??)
     Separate the peak merging/reading from the gui for standalone scripting
     Same for the transformations - once parameters are known gui is not needed
     Tidy the mulitple threshold consequences
     Implement those filters based in intensity etc

     Sort peaks in output file by integer hkl
     Allow merging algorith to be more flexible in tolerance, perhaps decide
     overlap as a multiple of FWHM observed.

     Sort out a file format which tracks all information properly?
  """
#          showinfo("Welcome to ImageD11_v0.4",startmessage)


            # For the peaksearch menu
            from ImageD11 import guipeaksearch
            self.peaksearcher = guipeaksearch.guipeaksearcher(self,quiet="yes")

            # self.finalpeaks is what the peaksearchmenu is meant to generate
            # and what the transformer should transform
            self.finalpeaks=None

            # For the transformation menu
            from ImageD11 import guitransformer

            # Unit cell is for generating theoretical peak positions
            self.unitcell=None

            # self.gv holds the g-vectors, after they are generated
            self.gv=None
            self.transformer  = guitransformer.guitransformer(self,quiet="yes")

            # For the indexing - supposed to generate orientations from the
            # unitcell and g-vectors
            from ImageD11 import guiindexer
            self.indexer = guiindexer.guiindexer(self)

            # sys is for sys.exit
            import sys

            # Configure the menubar (lists of Tuples of (name, underline_char, command_or_submenu) )
            self.menuBar = [ ( "File", 0,
                                [ ( "Print" , 0, self.printplot ),
                                  ( "Exit", 1, sys.exit) ] ) ,
                             self.peaksearcher.menuitems,
                             self.transformer.menuitems,
                             self.indexer.menuitems,
                             ( "Plotting", 0,
                                [ ( "Autoscale", 0, self.autoscaleplot),
                                  ( "Clear plot",0, self.clearplot),
                                ] ) ,

                             ( "Help", 0,
                                [ ( "Help Me!", 0, help) ,
                                  ( "Credits" , 0, credits) ,
                                  ( "License" , 0, showlicense)
                                  ] ) ]