def createOutputStep(self): inputParticles = self.inputParticles.get() fnDeformedParticles = self._getExtraPath('deformed-particles.xmd') outputSetOfParticles = self._createSetOfParticles() readSetOfParticles(fnDeformedParticles, outputSetOfParticles) outputSetOfParticles.copyInfo(inputParticles) self._defineOutputs(outputParticles=outputSetOfParticles)
def createOutput(self): imgSetOut = self._createSetOfAverages() imgSetOut.setSamplingRate(self.inputVolume.get().getSamplingRate()) imgSetOut.setAlignmentProj() readSetOfParticles(self._getPath("images.xmd"), imgSetOut) self._defineOutputs(outputReprojections=imgSetOut) self._defineSourceRelation(self.inputVolume, imgSetOut)
def createOutputStep(self): inputSet = self.inputParticles.get() partSet = self._createSetOfParticles() readSetOfParticles(self.imgsFn, partSet, extraLabels=[xmipp.MDL_NMA, xmipp.MDL_COST]) partSet.copyInfo(inputSet) self._defineOutputs(outputParticles=partSet) self._defineSourceRelation(self.getInputPdb(), partSet) self._defineTransformRelation(inputSet, partSet)
def importParticles(self): """ Import particles from a metadata 'images.xmd' """ self._imgDict = {} # store which images stack have been linked/copied and the new path self._findPathAndCtf(label=md.MDL_IMAGE) if self._micIdOrName: # If MDL_MICROGRAPH_ID or MDL_MICROGRAPH then # create a set to link from particles self.micSet = self.protocol._createSetOfMicrographs() self.protocol.setSamplingRate(self.micSet) self.protocol.fillAcquisition(self.micSet.getAcquisition()) partSet = self.protocol._createSetOfParticles() partSet.setObjComment('Particles imported from Xmipp metadata:\n%s' % self._mdFile) # Update both samplingRate and acquisition with parameters # selected in the protocol form self.protocol.setSamplingRate(partSet) partSet.setIsPhaseFlipped(self.protocol.haveDataBeenPhaseFlipped.get()) self.protocol.fillAcquisition(partSet.getAcquisition()) # Read the micrographs from the 'self._mdFile' metadata # but fixing the filenames with new ones (linked or copy to extraDir) readSetOfParticles(self._mdFile, partSet, preprocessImageRow=self._preprocessParticleRow, readAcquisition=False) if self._micIdOrName: self.protocol._defineOutputs(outputMicrographs=self.micSet) self.protocol._defineOutputs(outputParticles=partSet) # Also create classes if MDL_REF or MDL_REF3D was found if self._classFunc is not None: clsSet = self._classFunc(partSet) fillClasses(clsSet) self.protocol._defineOutputs(outputClasses=clsSet) self.protocol._defineSourceRelation(partSet, clsSet)