当前位置: 首页>>代码示例>>Python>>正文


Python data.Volume类代码示例

本文整理汇总了Python中pyworkflow.em.data.Volume的典型用法代码示例。如果您正苦于以下问题:Python Volume类的具体用法?Python Volume怎么用?Python Volume使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了Volume类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: createOutputStep

    def createOutputStep(self):
        volume=Volume()
        volume.setFileName(self._getExtraPath('sharpenedMap_last.mrc'))
        volume.setSamplingRate(self.inputVolume.get().getSamplingRate())

        self._defineOutputs(sharpened_map=volume)
        self._defineSourceRelation(self.inputVolume, volume)          
开发者ID:I2PC,项目名称:scipion,代码行数:7,代码来源:protocol_volume_local_sharpening.py

示例2: runCreateOutputStep

def runCreateOutputStep(self):
    ''' Create standard output results_images, result_classes'''
    #creating results files
    imgSet = self.inputParticles.get()
    lastIter = self.numberOfIterations.get()
    if self.numberOfReferences != 1:
        inDocfile = self._getFileName('docfileInputAnglesIters', iter=lastIter)
        ClassFnTemplate = '%(rootDir)s/reconstruction_Ref3D_%(ref)03d.vol'
        
        allExpImagesinDocfile = xmipp.FileName()
        all_exp_images="all_exp_images"
        allExpImagesinDocfile.compose(all_exp_images, inDocfile)
        
        dataClasses = self._getFileName('sqliteClasses')
        
        createClassesFromImages(imgSet, str(allExpImagesinDocfile), dataClasses, 
                                SetOfClasses3D, xmipp.MDL_REF3D, ClassFnTemplate, lastIter)
        
        classes = self._createSetOfClasses3D(imgSet)
        clsSet = SetOfClasses3D(dataClasses)
        classes.appendFromClasses(clsSet)
        
        volumes = self._createSetOfVolumes()
        volumes.setSamplingRate(imgSet.getSamplingRate())
        
        for refN in self.allRefs():
            volFn = self._getFileName('reconstructedFileNamesIters', iter=lastIter, ref=refN)
            vol = Volume()
            vol.setFileName(volFn)
            volumes.append(vol)
    
        self._defineOutputs(outputVolumes=volumes)
        self._defineOutputs(outputClasses=classes)
        self._defineSourceRelation(self.inputParticles, volumes)
        self._defineSourceRelation(self.inputParticles, classes)
        self._defineSourceRelation(self.input3DReferences, volumes)
        self._defineSourceRelation(self.input3DReferences, classes)
    else:
        volFn = self._getFileName('reconstructedFileNamesIters',
                                  iter=lastIter, ref=1)
        halfMap1 = self._getFileName('reconstructedFileNamesItersSplit1',
                                     iter=lastIter, ref=1)
        halfMap2 = self._getFileName('reconstructedFileNamesItersSplit2',
                                     iter=lastIter, ref=1)

        vol = Volume()
        vol.setFileName(volFn)
        vol.setSamplingRate(imgSet.getSamplingRate())
        vol.setHalfMaps([halfMap1, halfMap2])
        self._defineOutputs(outputVolume=vol)
        self._defineSourceRelation(self.inputParticles, vol)
        self._defineSourceRelation(self.input3DReferences, vol)
        
        #create set of images
        imgSetOut = self._createSetOfParticles("_iter_%03d" %lastIter)
        self._fillParticlesFromIter(imgSetOut, lastIter)
        
        self._defineOutputs(outputParticles=imgSetOut)
        self._defineSourceRelation(self.inputParticles, imgSetOut)
        self._defineSourceRelation(self.input3DReferences, imgSetOut)
开发者ID:I2PC,项目名称:scipion,代码行数:60,代码来源:projmatch_steps.py

示例3: createOutputStep

 def createOutputStep(self):
     volInput = self.inputVolumes.get()
     if self._isSingleInput():
         # Create the output with the same class as
         # the input, that should be Volume or a subclass
         # of Volume like VolumeMask
         volClass = volInput.getClass()
         vol = volClass() # Create an instance with the same class of input 
         vol.copyInfo(volInput)
         vol.setLocation(1, self.outputStk)
         self._postprocessOutput(vol)
         self._defineOutputs(outputVol=vol)
     else:
         # ToDo: createSetOfVolumes not work properly when the protocol is resumed.
         volumes = self._createSetOfVolumes()
         volumes.copyInfo(volInput)
         self._preprocessOutput(volumes)
         numberOfVols = self.inputVolumes.get().getSize()
         for i in range(1, numberOfVols + 1):
             vol = Volume()
             vol.setLocation(i, self.outputStk)
             volumes.append(vol)
         self._postprocessOutput(volumes)
         self._defineOutputs(outputVol=volumes)
         
     self._defineTransformRelation(volInput, self.outputVol)
开发者ID:josegutab,项目名称:scipion,代码行数:26,代码来源:protocol_process.py

示例4: createOutputStep

    def createOutputStep(self):
        numberOfClasses = self.numberOfRef
        imgSet = self._getInputParticles()
        volumes = self._createSetOfVolumes()
        volumes.setSamplingRate(imgSet.getSamplingRate())
        
        for ref in range(1, numberOfClasses + 1):
            vol = Volume()
            volFn = self._getFileName('iter_vol_class', iter=self._getLastIter(), ref=ref)
            vol.setFileName(volFn)
            volumes.append(vol)
        
        clsSet = self._createSetOfClasses3D(imgSet)
        self._fill3DClasses(clsSet, numberOfClasses)

        # Define the outputs and relations
        self._defineOutputs(outputClasses=clsSet)
        self._defineOutputs(outputVolumes=volumes)
        #TODO: save alignment

        self._defineSourceRelation(self._getInputParticlesPointer(), clsSet)
        self._defineSourceRelation(self._getInputParticlesPointer(), volumes)
        if not self.doContinue:
            self._defineSourceRelation(self.input3DReference, clsSet)
            self._defineSourceRelation(self.input3DReference, volumes)
开发者ID:I2PC,项目名称:scipion,代码行数:25,代码来源:protocol_ml_classification.py

示例5: createOutputStep

 def createOutputStep(self):
     partSet = self.inputParticles.get()
     vol = Volume()
     vol.setFileName(self._getFileName("volume"))
     vol.copyInfo(partSet)
     self._defineOutputs(outputVolume=vol)
     self._defineSourceRelation(self.inputParticles, vol)
开发者ID:I2PC,项目名称:scipion,代码行数:7,代码来源:protocol_reconstruct.py

示例6: createOutputStep

 def createOutputStep(self):
     imgSet = self.inputParticles.get()
     volume = Volume()
     volume.setFileName(self._getFileName('output_volume'))
     volume.setSamplingRate(imgSet.getSamplingRate())
     
     self._defineOutputs(outputVolume=volume)
     self._defineSourceRelation(self.inputParticles, volume)
开发者ID:azazellochg,项目名称:scipion,代码行数:8,代码来源:protocol_reconstruct.py

示例7: createOutputStep

 def createOutputStep(self):
     volume = Volume()
     volume.setFileName(self._getFileName("finalMap"))
     vol = self.protRefine.get().outputVolume
     pxSize = vol.getSamplingRate()
     volume.setSamplingRate(pxSize)
     self._defineOutputs(outputVolume=volume)
     self._defineSourceRelation(vol, volume)
开发者ID:I2PC,项目名称:scipion,代码行数:8,代码来源:protocol_localres.py

示例8: createOutputStep

 def createOutputStep(self):
     """ Create the output volume 
     """
     outputVolume = Volume()
     outputVolume.setSamplingRate(self.getSampling())
     outputVolume.setFileName(self.getOutputFn())
     self._defineOutputs(outputVolume=outputVolume)
     self._defineTransformRelation(self.inputVolume, outputVolume)
开发者ID:I2PC,项目名称:scipion,代码行数:8,代码来源:protocol_locscale.py

示例9: createOutputStep

    def createOutputStep(self):
        imgSet = self.inputParticles.get()
        vol = Volume()
        # FIXME: return two half-volumes as well
        vol.setFileName(self._getPath('volume.stk'))
        vol.setSamplingRate(imgSet.getSamplingRate())

        self._defineOutputs(outputVolume=vol)
        self._defineSourceRelation(self.inputParticles, vol)
开发者ID:I2PC,项目名称:scipion,代码行数:9,代码来源:protocol_reconstruct.py

示例10: createOutputStep

    def createOutputStep(self):
        imgSet = self.inputParticles.get()
        vol = Volume()
        #FIXME: return the last completed iteration
        vol.setFileName(self._getExtraPath('Refinement/final/bpr%02d.stk' % (self.numberOfIterations.get() + 1)))
        vol.setSamplingRate(imgSet.getSamplingRate())

        self._defineOutputs(outputVolume=vol)
        self._defineSourceRelation(self.inputParticles, vol)
开发者ID:azazellochg,项目名称:scipion,代码行数:9,代码来源:protocol_projmatch.py

示例11: createOutput

 def createOutput(self):
     inputParticles = self.directionalClasses.get()
     volumesSet = self._createSetOfVolumes()
     volumesSet.setSamplingRate(inputParticles.getSamplingRate())
     for i in range(2):
         vol = Volume()
         vol.setLocation(1, self._getExtraPath("split_v%d.vol"%(i+1)))
         volumesSet.append(vol)
     
     self._defineOutputs(outputVolumes=volumesSet)
     self._defineSourceRelation(inputParticles, volumesSet)
开发者ID:I2PC,项目名称:scipion,代码行数:11,代码来源:protocol_split_volume.py

示例12: createOutputStep

    def createOutputStep(self):
        inputVol = self.inputStructure.get()
        pdb = PdbFile(self._getPath('pseudoatoms.pdb'), pseudoatoms=True)
        self.createChimeraScript(inputVol, pdb)
        self._defineOutputs(outputPdb=pdb)
        self._defineSourceRelation(self.inputStructure, pdb)

        volume=Volume()
        volume.setFileName(self._getExtraPath("pseudoatoms_approximation.vol"))
        volume.setSamplingRate(inputVol.getSamplingRate())
        self._defineOutputs(outputVolume=volume)
        self._defineSourceRelation(self.inputStructure.get(),volume)
开发者ID:I2PC,项目名称:scipion,代码行数:12,代码来源:protocol_pseudoatoms.py

示例13: _appendOutputVolume

    def _appendOutputVolume(self, volumeOut):
        vol = Volume()
        vol.setFileName(volumeOut)
        vol.setSamplingRate(self.sampling)
        self.volumesSet.append(vol)

        if self.doFilter.get():
            volumeFilterOut = volumeOut.replace('.vol', '_filtered.vol')
            volf = Volume()
            volf.setFileName(volumeFilterOut)
            volf.setSamplingRate(self.sampling)
            self.volumesFilterSet.append(volf)
开发者ID:I2PC,项目名称:scipion,代码行数:12,代码来源:protocol_random_conical_tilt.py

示例14: createOutput

 def createOutput(self):
     volumesSet = self._createSetOfVolumes()
     volumesSet.setSamplingRate(self.inputParticles.get().getSamplingRate())
     Nvols = len(self.splitPercentiles.get().split())
     fnStack = self._getPath("splittedVolumes.stk")
     for i in range(Nvols):
         vol = Volume()
         vol.setLocation(i+1, fnStack)
         volumesSet.append(vol)
     
     self._defineOutputs(outputVolumes=volumesSet)
     self._defineSourceRelation(self.inputParticles.get(), volumesSet)
开发者ID:azazellochg,项目名称:scipion,代码行数:12,代码来源:protocol_split_volume.py

示例15: createOutputStep

    def createOutputStep(self):
        volume = Volume()
        volume.setFileName(self._getExtraPath('postprocess.mrc'))
        volume.setSamplingRate(self.samplingRate)
        vol = self.protRelionRefine.get().outputVolume
        mask = VolumeMask()
        mask.setFileName(self._getExtraPath('postprocess_automask.mrc'))
        mask.setSamplingRate(self.samplingRate)

        self._defineOutputs(outputVolume=volume)
        self._defineOutputs(outputMask=mask)
        self._defineSourceRelation(vol, volume)
        self._defineSourceRelation(vol, mask)
开发者ID:azazellochg,项目名称:scipion,代码行数:13,代码来源:protocol_postprocess.py


注:本文中的pyworkflow.em.data.Volume类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。