コード例 #1
0
ファイル: gl_render.py プロジェクト: RuralCat/CLipPYME
 def jitMCQ(self,x,y,jsig, mcp):
     from PYME.Analysis.QuadTree import pointQT
     Imc = numpy.rand(len(x)) < mcp
     qt = pointQT.qtRoot(-250,250, 0, 500)
     if type(jsig) == numpy.ndarray:
         jsig = jsig[Imc]
     for xi, yi in zip(x[Imc] +  jsig*numpy.random.normal(size=Imc.sum()), y[Imc] +  jsig*numpy.random.normal(size=Imc.sum())):
         qt.insert(pointQT.qtRec(xi, yi, None))
     self.setQuads(qt, 100, True)
コード例 #2
0
 def jitMCQ(self, x, y, jsig, mcp):
     from PYME.Analysis.QuadTree import pointQT
     Imc = numpy.rand(len(x)) < mcp
     qt = pointQT.qtRoot(-250, 250, 0, 500)
     if type(jsig) == numpy.ndarray:
         jsig = jsig[Imc]
     for xi, yi in zip(x[Imc] + jsig * numpy.random.normal(size=Imc.sum()),
                       y[Imc] + jsig * numpy.random.normal(size=Imc.sum())):
         qt.insert(pointQT.qtRec(xi, yi, None))
     self.setQuads(qt, 100, True)
コード例 #3
0
ファイル: pipeline.py プロジェクト: RuralCat/CLipPYME
    def getQuads(self):
        from PYME.Analysis.QuadTree import pointQT
        
        di = max(self.imageBounds.x1 - self.imageBounds.x0, 
                 self.imageBounds.y1 - self.imageBounds.y0)

        np = di/self.QTGoalPixelSize

        di = self.QTGoalPixelSize*2**np.ceil(np.log2(np))

        
        self.Quads = pointQT.qtRoot(self.imageBounds.x0, self.imageBounds.x0+di, 
                                    self.imageBounds.y0, self.imageBounds.y0 + di)

        for xi, yi in zip(self['x'],self['y']):
            self.Quads.insert(pointQT.qtRec(xi,yi, None))
コード例 #4
0
    def getQuads(self):
        from PYME.Analysis.QuadTree import pointQT

        di = max(self.imageBounds.x1 - self.imageBounds.x0,
                 self.imageBounds.y1 - self.imageBounds.y0)

        np = di / self.QTGoalPixelSize

        di = self.QTGoalPixelSize * 2**np.ceil(np.log2(np))

        self.Quads = pointQT.qtRoot(self.imageBounds.x0,
                                    self.imageBounds.x0 + di,
                                    self.imageBounds.y0,
                                    self.imageBounds.y0 + di)

        for xi, yi in zip(self['x'], self['y']):
            self.Quads.insert(pointQT.qtRec(xi, yi, None))