Ejemplo n.º 1
0
def getTomoDirs(WorkingDir, tomogram):
    """ Give the tomogram filename, return the root and prefix
    to store the result files. """
    tomoBaseName = removeBasenameExt(tomogram)
    tomoDir = join(WorkingDir, tomoBaseName)
    tomoRoot = join(tomoDir, tomoBaseName)
    
    return tomoBaseName, tomoDir, tomoRoot
Ejemplo n.º 2
0
    def summary(self):
        md = self.getTomogramMd()
        size = md.size()
        message = []
        if size > 1:
            message.append("Alignment of <%d> tomograms" % size)
        elif size == 1:
            message.append("Alignment of <%s> tomogram" % removeBasenameExt(md.getValue(xmipp.MDL_TOMOGRAMMD, md.firstObject())))

        return message
 def __init__(self, scriptname, project):
     ProtParticlesBase.__init__(self, protDict.preprocess_particles.name, scriptname, project)
     self.Import = 'from protocol_preprocess_particles import *'
     (self.InputDir,file)=split(self.InSelFile)
     baseFile = removeBasenameExt(file)
     self.OutStack = self.getFilename('images_stk')
     self.OutMetadata = self.getFilename('images')
     self.TiltPair = exists(os.path.join(self.InputDir,'images_untilted.xmd')) and self.InSelFile.find('images.xmd')!=-1
     if self.TiltPair:
         self.InputUntilted=self.InSelFile.replace(".xmd","_untilted.xmd")
         self.InputTilted=self.InSelFile.replace(".xmd","_tilted.xmd")
         self.OutUntiltedStack=self.getFilename('images_untilted_stk')
         self.OutUntiltedMetadata=self.getFilename('images_untilted')
         self.OutTiltedStack=self.getFilename('images_tilted_stk')
         self.OutTiltedMetadata=self.getFilename('images_tilted')
         self.OutStack=self.OutUntiltedStack