Exemple #1
0
    def _updateItem(self, particle, row):
        self.reader.setParticleTransform(particle, row)
        # FIXME: check if other attrs need saving
        particle._rlnImageOriginalName = String(row.rlnImageOriginalName)
        particle._rlnRandomSubset = Integer(row.rlnRandomSubset)

        newLoc = convert.relionToLocation(row.rlnImageName)
        particle.setLocation(newLoc)
Exemple #2
0
    def _setFileName(self, item, row):
        relionFn = row.getValue(md.RLN_IMAGE_NAME)
        indx, fn = convert.relionToLocation(relionFn)
        item.setLocation(indx, self._getPath(fn))

        invFactor = 1 / self._getScaleFactor(item)

        if invFactor != 1.0:
            if item.hasCoordinate():
                item.scaleCoordinate(invFactor)
            if item.hasTransform():
                item.getTransform().scaleShifts(invFactor)
Exemple #3
0
    def _loadClassesInfo(self, iteration):
        """ Read some information about the produced Relion 3D classes
        from the *model.star file.
        """
        self._classesInfo = {}  # store classes info, indexed by class id

        modelFn = self._protocol._getFileName('model', iter=iteration)
        modelIter = Table.iterRows('model_classes@' + modelFn)

        for classNumber, row in enumerate(modelIter):
            index, fn = relionToLocation(row.rlnReferenceImage)
            # Store info indexed by id
            self._classesInfo[classNumber + 1] = (index, fn, row)
 def _updatePtcl(self, particle, row):
     newLoc = convert.relionToLocation(row.getValue('rlnImageName'))
     particle.setLocation(newLoc)
 def _updateItem(self, item, row):
     newFn = row.getValue(md.RLN_IMAGE_NAME)
     newLoc = convert.relionToLocation(newFn)
     item.setLocation(newLoc)