def convertGlobalTransformProtomoToImod(protomoprefix,imodprefix, center=(1024,1024)):
	# axes are in order of x,y,z
	protomotltfile = protomoprefix+"-fitted.tlt"
	imodtltfile = imodprefix+".xf"
	fout = open(imodtltfile,'w')
	specimen_euler, tiltaz, tilts, origins, rotations = readProtomoTltFile(protomotltfile)
	imodaffines = convertProtomoToImod(specimen_euler, tiltaz, origins, rotations,center)
	apImod.writeTransformFile('', imodprefix,imodaffines,'xf')
 def createTransformFile(self):
         # Get alignment from database
         specimen_euler, tiltaz, origins, rotations = apTomo.getAlignmentFromDB(self.alignerdata,self.imgcenter)
         centertuple = (self.imgcenter['x'],self.imgcenter['y'])
         imodaffines = apProTomo.convertProtomoToImod(specimen_euler, tiltaz, origins, rotations,centertuple)
         processdir = self.params['rundir']
         apImod.writeTransformFile(processdir, self.seriesname,imodaffines,ext='xf')
         imodlocalaffines = apTomo.convertGlobalToLocalAffines(imodaffines)
         apImod.writeTransformFile(processdir, self.seriesname,imodlocalaffines,ext='prexf')
示例#3
0
def convertGlobalTransformProtomoToImod(protomoprefix,
                                        imodprefix,
                                        center=(1024, 1024)):
    # axes are in order of x,y,z
    protomotltfile = protomoprefix + "-fitted.tlt"
    imodtltfile = imodprefix + ".xf"
    fout = open(imodtltfile, 'w')
    specimen_euler, tiltaz, tilts, origins, rotations = readProtomoTltFile(
        protomotltfile)
    imodaffines = convertProtomoToImod(specimen_euler, tiltaz, origins,
                                       rotations, center)
    apImod.writeTransformFile('', imodprefix, imodaffines, 'xf')
示例#4
0
 def createTransformFile(self):
     # Get alignment from database
     specimen_euler, tiltaz, origins, rotations = apTomo.getAlignmentFromDB(
         self.alignerdata, self.imgcenter)
     centertuple = (self.imgcenter['x'], self.imgcenter['y'])
     imodaffines = apProTomo.convertProtomoToImod(specimen_euler, tiltaz,
                                                  origins, rotations,
                                                  centertuple)
     processdir = self.params['rundir']
     apImod.writeTransformFile(processdir,
                               self.seriesname,
                               imodaffines,
                               ext='xf')
     imodlocalaffines = apTomo.convertGlobalToLocalAffines(imodaffines)
     apImod.writeTransformFile(processdir,
                               self.seriesname,
                               imodlocalaffines,
                               ext='prexf')