def convertStackToMrc(self):
         stackdata = apStackData.getOnlyStackData(self.params['stackid'])
         stackfile = os.path.join(stackdata['path']['path'],stackdata['name'])
         stackbaseroot = os.path.basename(stackfile).split('.')[0]
         stackroot = os.path.join(stackdata['path']['path'],stackdata['name'][:-4])
         apDisplay.printMsg('converting %s from default IMAGIC stack format to MRC as %s.mrc'% (stackroot,stackbaseroot))
         self.stackfile = stackbaseroot+'.mrc'
         apIMAGIC.convertImagicStackToMrcStack(stackroot,self.stackfile)
 def convertStackToMrc(self):
     stackdata = apStackData.getOnlyStackData(self.params["stackid"])
     stackfile = os.path.join(stackdata["path"]["path"], stackdata["name"])
     stackbaseroot = os.path.basename(stackfile).split(".")[0]
     stackroot = os.path.join(stackdata["path"]["path"], stackdata["name"][:-4])
     apDisplay.printMsg(
         "converting %s from default IMAGIC stack format to MRC as %s.mrc" % (stackroot, stackbaseroot)
     )
     self.stackfile = stackbaseroot + ".mrc"
     apIMAGIC.convertImagicStackToMrcStack(stackroot, self.stackfile)
 def ImagicStackToMrcStack(self,stackfile):
         stackroot = stackfile[:-4]
         stackbaseroot = os.path.basename(stackfile).split('.')[0]
         apDisplay.printMsg('converting %s from default IMAGIC stack format to MRC as %s.mrc'% (stackroot,stackbaseroot))
         apIMAGIC.convertImagicStackToMrcStack(stackroot,stackbaseroot+'.mrc')
         # clean up non-mrc stack in rundir which may be left from preprocessing such as binning
         tmpstackdir = os.path.dirname(stackfile)
         stackext = os.path.basename(stackfile).split('.')[-1]
         if stackext != 'mrc' and tmpstackdir == self.params['rundir']:
                 os.remove(stackfile)
                 if stackext == 'hed':
                         imgfilepath = stackfile.replace('hed','img')
                         os.remove(imgfilepath)
Beispiel #4
0
 def ImagicStackToFrealignMrcStack(self,stackfile):
         stackroot = stackfile[:-4]
         stackbaseroot = os.path.basename(stackfile).split('.')[0]
         apDisplay.printMsg('converting %s from default IMAGIC stack format to MRC as %s.mrc'% (stackroot,stackbaseroot))
         apIMAGIC.convertImagicStackToMrcStack(stackroot,stackbaseroot+'.mrc')
         # clean up non-mrc stack in rundir which may be left from preprocessing such as binning
         tmpstackdir = os.path.dirname(stackfile)
         stackext = os.path.basename(stackfile).split('.')[-1]
         if stackext != 'mrc' and tmpstackdir == self.params['rundir']:
                 os.remove(stackfile)
                 if stackext == 'hed':
                         imgfilepath = stackfile.replace('hed','img')
                         os.remove(imgfilepath)
	def ImagicStackToMrcStack(self, oldstackfile):
		'''
		Convert IMAGIC Stack into MRC stack with extension .mrcs
   		''' 	
		self.stackErrorCheck(oldstackfile)
		
		stackroot = oldstackfile[:-4]
		mrcstackfile = os.path.join(self.params['rundir'], 'particles.mrcs')
		apDisplay.printMsg('converting %s from default IMAGIC stack format to MRC as %s'% (stackroot, mrcstackfile))
		apIMAGIC.convertImagicStackToMrcStack(stackroot, mrcstackfile)
		# clean up non-mrc stack in rundir which may be left from preprocessing such as binning
		if not 'mrc' in oldstackfile and os.path.dirname(oldstackfile) == self.params['rundir']:
			#apFile.removeStack(oldstackfile)
			pass
Beispiel #6
0
    def ImagicStackToMrcStack(self, oldstackfile):
        '''
		Convert IMAGIC Stack into MRC stack with extension .mrcs
   		'''
        self.stackErrorCheck(oldstackfile)

        stackroot = oldstackfile[:-4]
        mrcstackfile = os.path.join(self.params['rundir'], 'particles.mrcs')
        apDisplay.printMsg(
            'converting %s from default IMAGIC stack format to MRC as %s' %
            (stackroot, mrcstackfile))
        apIMAGIC.convertImagicStackToMrcStack(stackroot, mrcstackfile)
        # clean up non-mrc stack in rundir which may be left from preprocessing such as binning
        if not 'mrc' in oldstackfile and os.path.dirname(
                oldstackfile) == self.params['rundir']:
            #apFile.removeStack(oldstackfile)
            pass