def getParticles(self, zprojimagedata): ''' start Etomo insert particles ''' os.chdir(self.params['fulltomodir']) proc = subprocess.Popen("etomo --fg %s.edf" % (self.seriesname), shell=True) proc.wait() xrange = apImod.getSubTomoBoundary(self.params['fulltomodir'], self.seriesname, 'x') if not len(xrange): apDisplay.printError( 'Subtomogram coordinate not generated, can not commit to database.' ) # get subtomogram center from edf log xmin, xmax = apImod.getSubTomoBoundary(self.params['fulltomodir'], self.seriesname, 'x') ymin, ymax = apImod.getSubTomoBoundary(self.params['fulltomodir'], self.seriesname, 'y') xcenter = self.fullbin * (xmin + xmax) / 2 ycenter = self.fullbin * (ymin + ymax) / 2 peaktree = [{'xcoord': xcenter, 'ycoord': ycenter, 'peakarea': 1}] # Use the same selection run name for all subtomogram centers selectionrunname = zprojimagedata['session']['name'] + '_subtomo' self.insertCenterSelectionRunData(zprojimagedata['session'], selectionrunname) apParticle.insertParticlePeaks(peaktree, zprojimagedata, selectionrunname) particles = apParticle.getParticlesForImageFromRunName( zprojimagedata, selectionrunname) return [particles[0]]
def getParticles(self,zprojimagedata): ''' start Etomo insert particles ''' os.chdir(self.params['fulltomodir']) proc = subprocess.Popen("etomo --fg %s.edf" % (self.seriesname), shell=True) proc.wait() xrange = apImod.getSubTomoBoundary(self.params['fulltomodir'],self.seriesname,'x') if not len(xrange): apDisplay.printError('Subtomogram coordinate not generated, can not commit to database.') # get subtomogram center from edf log xmin,xmax = apImod.getSubTomoBoundary(self.params['fulltomodir'],self.seriesname,'x') ymin,ymax = apImod.getSubTomoBoundary(self.params['fulltomodir'],self.seriesname,'y') xcenter = self.fullbin * (xmin+xmax) / 2 ycenter = self.fullbin * (ymin+ymax) / 2 peaktree = [{'xcoord':xcenter,'ycoord':ycenter,'peakarea':1}] # Use the same selection run name for all subtomogram centers selectionrunname = zprojimagedata['session']['name']+'_subtomo' self.insertCenterSelectionRunData(zprojimagedata['session'],selectionrunname) apParticle.insertParticlePeaks(peaktree, zprojimagedata, selectionrunname) particles = apParticle.getParticlesForImageFromRunName(zprojimagedata,selectionrunname) return [particles[0]]
def getOffsetZ(self): processdir = self.params['fulltomodir'] zmin,zmax = apImod.getSubTomoBoundary(self.params['fulltomodir'],self.seriesname,'z') offsetz = ((zmax + zmin) - self.fulltomoshape[1] ) / 2 return offsetz
def getOffsetZ(self): processdir = self.params['fulltomodir'] zmin, zmax = apImod.getSubTomoBoundary(self.params['fulltomodir'], self.seriesname, 'z') offsetz = ((zmax + zmin) - self.fulltomoshape[1]) / 2 return offsetz