本文整理匯總了Python中pyworkflow.em.data.Volume.setHalfMaps方法的典型用法代碼示例。如果您正苦於以下問題:Python Volume.setHalfMaps方法的具體用法?Python Volume.setHalfMaps怎麽用?Python Volume.setHalfMaps使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類pyworkflow.em.data.Volume
的用法示例。
在下文中一共展示了Volume.setHalfMaps方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: runCreateOutputStep
# 需要導入模塊: from pyworkflow.em.data import Volume [as 別名]
# 或者: from pyworkflow.em.data.Volume import setHalfMaps [as 別名]
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)
示例2: createOutputStep
# 需要導入模塊: from pyworkflow.em.data import Volume [as 別名]
# 或者: from pyworkflow.em.data.Volume import setHalfMaps [as 別名]
def createOutputStep(self):
if not self.realignMovieFrames:
imgSet = self._getInputParticles()
vol = Volume()
vol.setFileName(self._getExtraPath('relion_class001.mrc'))
vol.setSamplingRate(imgSet.getSamplingRate())
half1 = self._getFileName("final_half1_volume", ref3d=1)
half2 = self._getFileName("final_half2_volume", ref3d=1)
vol.setHalfMaps([half1, half2])
outImgSet = self._createSetOfParticles()
outImgSet.copyInfo(imgSet)
self._fillDataFromIter(outImgSet, self._lastIter())
self._defineOutputs(outputVolume=vol)
self._defineSourceRelation(self.inputParticles, vol)
self._defineOutputs(outputParticles=outImgSet)
self._defineTransformRelation(self.inputParticles, outImgSet)
fsc = FSC(objLabel=self.getRunName())
blockName = 'model_class_%[email protected]' % 1
fn = blockName + self._getExtraPath("relion_model.star")
mData = md.MetaData(fn)
fsc.loadFromMd(mData,
md.RLN_RESOLUTION,
md.RLN_MLMODEL_FSC_HALVES_REF)
self._defineOutputs(outputFSC=fsc)
self._defineSourceRelation(vol, fsc)
else:
movieSet = self.inputMovieParticles.get()
if self.movieIncludeRotSearch:
vol = Volume()
vol.setFileName(self._getExtraPath('relion_class001.mrc'))
vol.setSamplingRate(movieSet.getSamplingRate())
half1 = self._getFileName("final_half1_volume", ref3d=1)
half2 = self._getFileName("final_half2_volume", ref3d=1)
vol.setHalfMaps([half1, half2])
self._defineOutputs(outputVolume=vol)
self._defineSourceRelation(self.inputParticles, vol)
self._defineSourceRelation(self.inputMovieParticles, vol)
fnOut = self._getFileName('dataFinal')
outMovieSet = self._createSetOfMovieParticles()
outMovieSet.copyInfo(movieSet)
outMovieSet.setAlignmentProj()
# not using copyItems since input movie particle
# set is missing a lot of metadata (CTF, micName etc.)
# that was created in convertInputStep
readSetOfParticles(fnOut, outMovieSet, alignType=ALIGN_PROJ,
extraLabels=MOVIE_EXTRA_LABELS,
postprocessImageRow=self._updateParticle)
self._defineOutputs(outputParticles=outMovieSet)
self._defineTransformRelation(self.inputParticles, outMovieSet)
self._defineTransformRelation(self.inputMovieParticles, outMovieSet)
示例3: createOutputStep
# 需要導入模塊: from pyworkflow.em.data import Volume [as 別名]
# 或者: from pyworkflow.em.data.Volume import setHalfMaps [as 別名]
def createOutputStep(self):
iterN = self.numberOfIterations.get()
partSet = self._getInputParticles()
numRun = self._getRun()
vol = Volume()
vol.setFileName(self._getFileName("mapFull",run=numRun, iter=iterN))
halfMap1 = self._getFileName("mapEvenUnmasked", run=numRun)
halfMap2 = self._getFileName("mapOddUnmasked", run=numRun)
vol.setHalfMaps([halfMap1, halfMap2])
vol.copyInfo(partSet)
newPartSet = self._createSetOfParticles()
newPartSet.copyInfo(partSet)
self._fillDataFromIter(newPartSet, iterN)
self._defineOutputs(outputVolume=vol)
self._defineSourceRelation(self._getInputParticlesPointer(), vol)
self._defineOutputs(outputParticles=newPartSet)
self._defineTransformRelation(self._getInputParticlesPointer(), newPartSet)