def projectInitialVolume(log,WorkingDir,InitialVolume,RemainingClasses,Xdim2,AngularSampling,SymmetryGroup): fnOutputInitVolume=os.path.join(WorkingDir,"tmp/initialVolume.vol") runJob(log,'xmipp_image_convert',"-i %s -o %s"%(removeFilenamePrefix(InitialVolume),fnOutputInitVolume)) runJob(log,"xmipp_image_resize","-i %s --dim %d %d"%(fnOutputInitVolume,Xdim2,Xdim2)) fnGallery=os.path.join(WorkingDir,'tmp/gallery_InitialVolume.stk') runJob(log,"xmipp_angular_project_library", "-i %s -o %s --sampling_rate %f --sym %s --method fourier 1 0.25 bspline --compute_neighbors --angular_distance -1 --experimental_images %s"\ %(fnOutputInitVolume,fnGallery,float(AngularSampling),SymmetryGroup,RemainingClasses))
def defineSteps(self): fnOutputClass=self.workingDirPath('classes.xmd') self.insertStep('createDir',path=self.ExtraDir) self.insertStep("linkAcquisitionInfo",InputFile=self.Classes,dirDest=self.WorkingDir) if self.trueClass: self.insertStep("copyFile",source=removeFilenamePrefix(self.Classes),dest=fnOutputClass) else: self.insertRunJobStep("xmipp_metadata_utilities","-i %s -o classes@%s"%(self.Classes,fnOutputClass),NumberOfMpi=1,NumberOfThreads=1) # Projection Matching fnAngles=self.extraPath('angles.xmd') self.insertStep("projMatch",Volume=self.Volume,AngularSampling=self.AngularSampling,SymmetryGroup=self.SymmetryGroup, Images="classes@%s"%fnOutputClass,ExtraDir=self.ExtraDir,fnAngles=fnAngles,NumberOfMpi=self.NumberOfMpi) # Reorganize output and produce difference images self.insertStep("runJob",programname="xmipp_metadata_utilities", params="-i classes@%s --set join %s --mode append"%(fnOutputClass,fnAngles),NumberOfMpi=1) fnIn='classes@'+fnOutputClass self.insertStep("produceAlignedImages",fnIn=fnIn, fnOut='classes_aligned@'+fnOutputClass, fnDiff=self.extraPath("diff.stk"), volumeIsCTFCorrected=False) self.insertStep("runJob",programname="xmipp_metadata_utilities", params="-i classes_aligned@%s --operate sort maxCC desc --mode append"%(fnOutputClass),NumberOfMpi=1) self.insertStep("runJob",programname="xmipp_metadata_utilities", params="-i classes_aligned@%s --set join %s image --mode append"%(fnOutputClass,fnIn),NumberOfMpi=1)