def testConvert(self): micSet = SetOfMicrographs(filename=self.dbGold) # Test writing micrgraphs to an hdf filename = self.getOutputPath('micrographs.hdf') e2convert.writeSetOfParticles(micSet, filename, self.dataset.getPath())
def convertImagesStep(self): from pyworkflow.em.packages.eman2.convert import writeSetOfParticles strFn = "" partSet = self.inputParticles.get() partAlign = partSet.getAlignment() storePath = self._getExtraPath("particles") makePath(storePath) writeSetOfParticles(partSet, storePath, alignType=em.ALIGN_PROJ) if partSet.hasCTF(): program = getEmanProgram('e2ctf.py') acq = partSet.getAcquisition() args = " --voltage %3d" % acq.getVoltage() args += " --cs %f" % acq.getSphericalAberration() args += " --ac %f" % (100 * acq.getAmplitudeContrast()) if not partSet.isPhaseFlipped(): args += " --phaseflip" args += " --computesf --apix %f --allparticles --autofit --curdefocusfix --storeparm -v 8" % ( partSet.getSamplingRate()) self.runJob(program, args, cwd=self._getExtraPath()) program = getEmanProgram('e2buildsets.py') args = " --setname=inputSet --allparticles --minhisnr=-1" self.runJob(program, args, cwd=self._getExtraPath())
def convertImagesStep(self): from pyworkflow.em.packages.eman2.convert import writeSetOfParticles partSet = self._getInputParticles() partAlign = partSet.getAlignment() storePath = self._getExtraPath("particles") makePath(storePath) writeSetOfParticles(partSet, storePath, alignType=partAlign) if partSet.hasCTF(): program = getEmanProgram('e2ctf.py') acq = partSet.getAcquisition() args = " --voltage %3d" % acq.getVoltage() args += " --cs %f" % acq.getSphericalAberration() args += " --ac %f" % (100 * acq.getAmplitudeContrast()) if not partSet.isPhaseFlipped(): args += " --phaseflip" args += " --computesf --apix %f --allparticles --autofit --curdefocusfix --storeparm -v 8" % (partSet.getSamplingRate()) self.runJob(program, args, cwd=self._getExtraPath()) program = getEmanProgram('e2buildsets.py') args = " --setname=inputSet --allparticles --minhisnr=-1" self.runJob(program, args, cwd=self._getExtraPath())