def _createCoordinatesTiltPair(self, micTiltPairs, uCoords, tCoords, angles, suffix): coordTiltPairs = self.__createSet( emobj.CoordinatesTiltPair, 'coordinates_pairs%s.sqlite', suffix, indexes=['_untilted._micId', '_tilted._micId']) coordTiltPairs.setUntilted(uCoords) coordTiltPairs.setTilted(tCoords) coordTiltPairs.setAngles(angles) coordTiltPairs.setMicsPair(micTiltPairs) for coordU, coordT in izip(uCoords, tCoords): coordTiltPairs.append(emobj.TiltPair(coordU, coordT)) return coordTiltPairs
def createTiltedPairsStep(self): args = {} self.micsPairsSqlite = self._getPath('micrographs_pairs.sqlite') pwutils.cleanPath(self.micsPairsSqlite) # Delete if exists micsTiltPair = emobj.MicrographsTiltPair(filename=self.micsPairsSqlite) micsU = self.importMicrographs(self.patternUntilted.get(), 'Untilted', self.voltage.get(), self.sphericalAberration.get(), self.ampContrast.get()) micsT = self.importMicrographs(self.patternTilted.get(), 'Tilted', self.voltage.get(), self.sphericalAberration.get(), self.ampContrast.get()) micsTiltPair.setUntilted(micsU) micsTiltPair.setTilted(micsT) for micU, micT in zip(micsU, micsT): micsTiltPair.append(emobj.TiltPair(micU, micT)) args[self.OUTPUT_NAME] = micsTiltPair self._defineOutputs(**args)