Exemplo n.º 1
0
 def body(self, bodyFrame):
     figFrame = FigureFrame(bodyFrame, figsize=(18, 9))
     figFrame.grid(row=0, column=0, columnspan=5)
     
     #self._runBeforePreWhitening(self.prot)
     dialog.FlashMessage(self.form.root, "Running Pre-Whitening tool...", 
                         func=self._runBeforePreWhitening)
     results = self.results
     
     self.figure = figFrame.getFigure() #plt.figure(figsize=(18, 9))
     self._runPreWhitening(results['newElbowAngstrom'], 
                           results['newRampWeight'])
     
     #bodyFrame.config()
     bodyFrame.columnconfigure(0, weight=1)
     bodyFrame.rowconfigure(0, weight=1)
     
     controlsFrame = tk.Frame(bodyFrame)
     controlsFrame.grid(row=1, column=0)
     
     self.elbowSlider = LabelSlider(controlsFrame, "Angstroms", from_=2.1*results['vxSize'], to=100, 
                          value=results['newElbowAngstrom'])
     self.elbowSlider.grid(row=1, column=0, padx=5, pady=5)
     
     self.rampSlider = LabelSlider(controlsFrame, "Ramp weight", from_=0.0, to=1., 
                          value=results['newRampWeight'])
     self.rampSlider.grid(row=1, column=1, padx=5, pady=5)
     
     self.updateBtn = HotButton(controlsFrame, "   Update   ", 
                                command=self._onUpdate,
                                tooltip="Update plots with new pre-whitening parameters.")
     self.updateBtn.grid(row=1, column=2, padx=10, pady=5)
Exemplo n.º 2
0
 def _createFigureBox(self, content):
     from pyworkflow.gui.matplotlib_image import FigureFrame
     figFrame = FigureFrame(content, figsize=(6, 6))
     figFrame.grid(row=0, column=0, padx=5, columnspan=2)
     self.figure = figFrame.figure
     
     applyBtn = HotButton(content, text='Apply B-factor',
                        command=self._onApplyBfactorClick)
     applyBtn.grid(row=1, column=0, sticky='ne', padx=5, pady=5)
     
     closeBtn = Button(content, text='Close', imagePath=Icon.ACTION_CLOSE,
                        command=self.close)
     closeBtn.grid(row=1, column=1, sticky='ne', padx=5, pady=5)
 def _createFigureBox(self, content):
     from pyworkflow.gui.matplotlib_image import FigureFrame
     figFrame = FigureFrame(content, figsize=(6, 6))
     figFrame.grid(row=0, column=0, padx=5, columnspan=2)
     self.figure = figFrame.figure
     
     applyBtn = HotButton(content, text='Apply B-factor',
                        command=self._onApplyBfactorClick)
     applyBtn.grid(row=1, column=0, sticky='ne', padx=5, pady=5)
     
     closeBtn = Button(content, text='Close', imagePath=Icon.ACTION_CLOSE,
                        command=self.close)
     closeBtn.grid(row=1, column=1, sticky='ne', padx=5, pady=5)
Exemplo n.º 4
0
    def body(self, bodyFrame):
        figFrame = FigureFrame(bodyFrame, figsize=(18, 9))
        figFrame.grid(row=0, column=0, columnspan=5)

        #self._runBeforePreWhitening(self.prot)
        dialog.FlashMessage(self.form.root,
                            "Running Pre-Whitening tool...",
                            func=self._runBeforePreWhitening)
        results = self.results

        self.figure = figFrame.getFigure()  #plt.figure(figsize=(18, 9))
        self._runPreWhitening(results['newElbowAngstrom'],
                              results['newRampWeight'])

        #bodyFrame.config()
        bodyFrame.columnconfigure(0, weight=1)
        bodyFrame.rowconfigure(0, weight=1)

        controlsFrame = tk.Frame(bodyFrame)
        controlsFrame.grid(row=1, column=0)

        self.elbowSlider = LabelSlider(controlsFrame,
                                       "Angstroms",
                                       from_=2.1 * results['vxSize'],
                                       to=100,
                                       value=results['newElbowAngstrom'])
        self.elbowSlider.grid(row=1, column=0, padx=5, pady=5)

        self.rampSlider = LabelSlider(controlsFrame,
                                      "Ramp weight",
                                      from_=0.0,
                                      to=1.,
                                      value=results['newRampWeight'])
        self.rampSlider.grid(row=1, column=1, padx=5, pady=5)

        self.updateBtn = HotButton(
            controlsFrame,
            "   Update   ",
            command=self._onUpdate,
            tooltip="Update plots with new pre-whitening parameters.")
        self.updateBtn.grid(row=1, column=2, padx=10, pady=5)