def _visualizeLLPlot(self, e=None):
        """ Plot -LL vs cycle :N:1,5:
                """
        headerList, dataList, msg, title = self.parseFile.retrievemLLPlot()
        if not dataList:
            errorWindow(self.getTkRoot(), msg)
            return

        xplotter = Plotter(windowTitle=title)
        a = xplotter.createSubPlot(title, headerList[0], '-LL', yformat=False)
        # see
        # https://matplotlib.org/api/_as_gen/matplotlib.axes.Axes.plot.html
        a.plot(dataList[0], dataList[1], 'bx-')
        xplotter.showLegend(headerList[1:])
        xplotter.show()
Beispiel #2
0
 def visualize(self, obj, **args):
     cls = type(obj)
     if issubclass(cls, AtsasProtConvertPdbToSAXS):
         if obj.experimentalSAXS.empty():
             fnInt=obj._getPath("pseudoatoms00.int")
         else:
             fnInt=obj._getPath("pseudoatoms00.fit")
         
         import numpy
         x=numpy.loadtxt(fnInt,skiprows=1)
         xplotter = Plotter(windowTitle="SAXS Curves")
         a = xplotter.createSubPlot('SAXS curves', 'Angstrongs^-1', 'log(SAXS)', yformat=False)
         a.plot(x[:,0], numpy.log(x[:,1]))
         a.plot(x[:,0], numpy.log(x[:,2]))
         if obj.experimentalSAXS.empty():
             xplotter.showLegend(['SAXS in solution','SAXS in vacuo'])
         else:
             xplotter.showLegend(['Experimental SAXS','SAXS from volume'])
         xplotter.show()
    def _visualizeRFactorPlot(self, e=None):
        """ Plot Rfactor and Rfree vs cycle :N:[1,3]:
        """
        headerList, dataList, msg, title = self.parseFile.retrieveRFactorPlot()
        if not dataList:
            errorWindow(self.getTkRoot(), msg)
            return

        xplotter = Plotter(windowTitle=title)
        a = xplotter.createSubPlot(title,
                                   headerList[0],
                                   'Rfactor',
                                   yformat=False)
        # see
        # https://matplotlib.org/api/_as_gen/matplotlib.axes.Axes.plot.html
        # for plot options
        a.plot(dataList[0], dataList[1], 'bx-', dataList[0], dataList[2],
               'gx-')  # plot start over line  in blue
        xplotter.showLegend(headerList[1:])
        xplotter.show()
    def _visualizeGeometryPlot(self, e=None):
        """ Plot rmsBOND,zBOND, rmsANGL, zANGL and rmsCHIRALvs cycle :
        N:1,7,8,9,10,11:
        """
        headerList, dataList, msg, title = \
            self.parseFile.retrieveGeometryPlot()
        if not dataList:
            errorWindow(self.getTkRoot(), msg)
            return

        xplotter = Plotter(windowTitle=title)
        a = xplotter.createSubPlot(title,
                                   headerList[0],
                                   'geometry',
                                   yformat=False)
        # see
        # https://matplotlib.org/api/_as_gen/matplotlib.axes.Axes.plot.html
        # for plot options
        a.plot(
            dataList[0],
            dataList[1],
            'bx-',
            dataList[0],
            dataList[2],
            'gx-',
            dataList[0],
            dataList[3],
            'rx-',
            dataList[0],
            dataList[4],
            'cx-',
            dataList[0],
            dataList[5],
            'mx-',
        )  # plot start over line  in blue
        xplotter.showLegend(headerList[1:])
        xplotter.show()