當前位置: 首頁>>代碼示例>>Python>>正文


Python analysis.SDAPlotter類代碼示例

本文整理匯總了Python中uk.ac.diamond.scisoft.analysis.SDAPlotter的典型用法代碼示例。如果您正苦於以下問題:Python SDAPlotter類的具體用法?Python SDAPlotter怎麽用?Python SDAPlotter使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了SDAPlotter類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: imagePlot

 def imagePlot(self, panel=None):
     if panel is None:
         panel=self.panel;
         
     da=self.chData.cagetArrayUnsigned();
     ds = IntegerDataset.createFromObject(da);
     newds=ds.reshape([self.height, self.width]);
 
     SDAPlotter.imagePlot(panel, newds);
開發者ID:jjkraken,項目名稱:gda-epics,代碼行數:9,代碼來源:EpicsWaveform.py

示例2: imagePlot0

 def imagePlot0(self, panel=None):
     if panel is None:
         panel=self.panel;
         
     da=self.chData.cagetArrayByte()
     ds = ByteDataset.createFromObject(da);
 
     newds=ds.reshape([self.height, self.width]);
 
     SDAPlotter.imagePlot(panel, newds);
開發者ID:jjkraken,項目名稱:gda-epics,代碼行數:10,代碼來源:EpicsWaveform.py

示例3: display

	def display(self,file=None):
		if file==None:
			file = self.getFullFileName()
#		self.data.loadPilatusData(file)
		self.data.load(PilatusTiffLoader(file));
		dataset = self.data.getAxis(0);

		if self.panel:
			if self.logScale:
				SDAPlotter.imagePlot(self.panel, DatasetUtils.lognorm(dataset)); #For RCP GUI
			else:
				SDAPlotter.imagePlot(self.panel, dataset); #For RCP GUI
		else:
			print "No panel set to display"
			raise Exception("No panel_name set in %s. Set this or set %s.setAlive(False)" % (self.name,self.name));
開發者ID:openGDA,項目名稱:gda-core,代碼行數:15,代碼來源:DummyAreaDetector.py

示例4: imagePlot2

 def imagePlot2(self, panel=None):
     if panel is None:
         panel=self.panel;
         
     da=self.chData.cagetArrayByte();
     
     #To convert from singed to unsigned
     #method 2
     da=[x&0xff for x in da]
     
 #method 3
 #    ds1=array.array('B' [x&0xff for x in ds1] )
         
     ds = IntegerDataset.createFromObject(da);
     newds=ds.reshape([self.height, self.width]);
     
     SDAPlotter.imagePlot(panel, newds);
開發者ID:jjkraken,項目名稱:gda-epics,代碼行數:17,代碼來源:EpicsWaveform.py

示例5: ncdredconf

    def ncdredconf(self, detector, **kwords):
        """
            if default None passed in no change is made
            default is everything off
        """
        
        if detector.lower() == "Waxs".lower():
            detector="Waxs"
        else:
            detector="Saxs"
            
        if not detector in self.settings:
            self.settings[detector] = {}
        for i in self.options:
            if not i in self.settings[detector]:
                self.settings[detector][i] = False
            if i in kwords:
                if kwords[i] == None:
                    self.settings[detector][i] = False
                else:
                    self.settings[detector][i] = kwords[i]
        
        realdet=ncdutils.getDetectorByType(self.detsystem, detector.upper())
        realdetname = realdet.getName()
        ncdutils.removeDetectorByName(self.detsystem, detector+" chain")
        
        saxsrc=ReductionChain(detector+" chain", realdetname)
        saxsrclist=saxsrc.getChain()
        
        panel=detector+" Plot"
        beanbag=SDAPlotter.getGuiBean(panel)
        if beanbag == None:
            beanbag = {}
        
        sroi = None
        if self.is2D(realdet):
            if GuiParameters.ROIDATA in beanbag:
                roi = beanbag[GuiParameters.ROIDATA]
                if isinstance(roi, SectorROI):
                    sroi = roi
                    radii = sroi.getRadii()
                    self.settings[detector]["length"]=int(math.ceil(radii[1]-radii[0]))
                    self.settings[detector]["disttobeamstop"]=radii[0]

        length =  self.settings[detector]["length"]
        slope =  self.settings[detector]["slope"]
        intercept =  self.settings[detector]["intercept"]
        if slope == 0 or slope == False:
            axisds=None
        else:
            axis=[]
            pis = realdet.getPixelSize()*1000
            d2b = self.settings[detector]["disttobeamstop"]
            for i in range(length):
                axis.append(float((i+d2b)*pis*slope+intercept))
            axisds=DataSet("qaxis", axis)
            
        mask =  self.settings[detector]["mask"]
        sect =  self.settings[detector]["sect"]
        if sroi != None:
            if sect or isinstance(axisds, DataSet):
                    start = sroi.getPoint()
                    realdet.setAttribute("beam_center_x", start[0])
                    realdet.setAttribute("beam_center_y", start[1])
            else:
                    realdet.setAttribute("beam_center_x", None)
                    realdet.setAttribute("beam_center_y", None)
                    
        cameralength = self.settings[detector]["cameralength"]
        if cameralength != False:
            realdet.setAttribute("distance", cameralength)
        else:
            realdet.setAttribute("distance", None)
            
        norm = self.settings[detector]["norm"]
        if (norm != False):
            saxsnorm=Normalisation(detector+"norm","ignored")
            saxsnorm.setCalibChannel(1)
            saxsnorm.setCalibName(ncdutils.getDetectorByType(self.detsystem, "CALIB").getName())
            saxsrclist.add(saxsnorm)
            
        bg =  self.settings[detector]["bg"]
        if bg != False: 
            if os.path.isfile(bg):
                saxsbgs=BackgroundSubtraction(detector+"bg","ignored")
                sfh=ScanFileHolder()
                if (norm>=0):
                    upstream=detector+"norm.data"
                else:
                    upstream=realdetname+".data"
                sfh.load(NexusLoader(bg,[upstream]))
                ds=sfh.getAxis(upstream)
                saxsbgs.setBackground(ds)
                saxsrclist.add(saxsbgs)
            else:
                print "background file \"%s\" does not exist." % bg
        

        if (sect):
            if sroi != None:
#.........這裏部分代碼省略.........
開發者ID:openGDA,項目名稱:gda-core,代碼行數:101,代碼來源:redux.py

示例6: plot_viewnexustree

def plot_viewnexustree(name, tree):
    if not isinstance(tree, _h5mgr):
        import sys #@Reimport
        print >> sys.stderr, "Only tree from loadnexus works for now"
        return
#        import jyhdf5io._tojavatree as _tojtree
#        tree = _tojtree(tree)
    _plotter.viewHDF5Tree(name, tree.gettree())
開發者ID:thiyagavit,項目名稱:passerelle,代碼行數:8,代碼來源:jyplot.py

示例7: plot_getdatabean

def plot_getdatabean(name):
    jdb = _plotter.getDataBean(name)
    if jdb is not None:
        jgb = jdb.getGuiParameters()
        if jgb is not None:
            _wrap_gui_bean(jgb, jgb)
    return jdb
開發者ID:erwindl0,項目名稱:scisoft-core,代碼行數:7,代碼來源:jyplot.py

示例8: plot_addline

def plot_addline(*arg, **kwarg):
    _plotter.addPlot(*arg, **kwarg)
開發者ID:erwindl0,項目名稱:scisoft-core,代碼行數:2,代碼來源:jyplot.py

示例9: plot_line

def plot_line(*arg, **kwarg):
    _plotter.plot(*arg, **kwarg)
開發者ID:erwindl0,項目名稱:scisoft-core,代碼行數:2,代碼來源:jyplot.py

示例10: plot_getdatabean

def plot_getdatabean(name):
    jdb = _plotter.getDataBean(name)
    jgb = jdb.getGuiParameters()
    _wrap_gui_bean(jgb)
    return jdb
開發者ID:DevasenaInupakutika,項目名稱:scisoft-core,代碼行數:5,代碼來源:jyplot.py

示例11: plot_updatepoints2d

def plot_updatepoints2d(*arg, **kwarg):
    _plotter.scatter2DPlotOver(*arg, **kwarg)
開發者ID:erwindl0,項目名稱:scisoft-core,代碼行數:2,代碼來源:jyplot.py

示例12: plot_surface

def plot_surface(*arg, **kwarg):
    _plotter.surfacePlot(*arg, **kwarg)
開發者ID:erwindl0,項目名稱:scisoft-core,代碼行數:2,代碼來源:jyplot.py

示例13: plot_setupimagegrid

def plot_setupimagegrid(*arg, **kwarg):
    _plotter.setupNewImageGrid(*arg, **kwarg)
開發者ID:erwindl0,項目名稱:scisoft-core,代碼行數:2,代碼來源:jyplot.py

示例14: plot_image

def plot_image(*arg, **kwarg):
    _plotter.imagePlot(*arg, **kwarg)
開發者ID:erwindl0,項目名稱:scisoft-core,代碼行數:2,代碼來源:jyplot.py

示例15: plot_addstack

def plot_addstack(*arg, **kwarg):
    _plotter.addStackPlot(*arg, **kwarg)
開發者ID:erwindl0,項目名稱:scisoft-core,代碼行數:2,代碼來源:jyplot.py


注:本文中的uk.ac.diamond.scisoft.analysis.SDAPlotter類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。