Exemplo n.º 1
0
def runAngularProjectLibraryStep(self, iterN, refN, args, stepParams, **kwargs):
    args += ' --method %(method)s'
    if stepParams['method'] == 'fourier':
        if self._fourierMaxFrequencyOfInterest[iterN] == -1:
            fourierMaxFrequencyOfInterest = self._getFourierMaxFrequencyOfInterest(iterN-1, refN)
            fourierMaxFrequencyOfInterest = self.resolSam / fourierMaxFrequencyOfInterest + stepParams['constantToAdd']
            
            if fourierMaxFrequencyOfInterest > 0.5:
                fourierMaxFrequencyOfInterest = 0.5
            elif fourierMaxFrequencyOfInterest < 0.:
                fourierMaxFrequencyOfInterest = 0.001
        else:
            fourierMaxFrequencyOfInterest = self._fourierMaxFrequencyOfInterest[iterN]
        
        stepParams['fourierMaxFrequencyOfInterest'] = fourierMaxFrequencyOfInterest
        args += ' %(paddingAngularProjection)s %(fourierMaxFrequencyOfInterest)s %(kernelAngularProjection)s'
    
    processorsToUse = self.numberOfMpi.get() * self.numberOfThreads.get()
    if processorsToUse > 1:
        memoryAvailable = getMemoryAvailable()
        processorsToUse = min(processorsToUse, memoryAvailable/stepParams['memoryUsed'])
    
    if self.numberOfMpi > 1 and processorsToUse > 1:
        stepParams['mpiJobSize'] = self.mpiJobSize.get()
        args += ' --mpi_job_size %(mpiJobSize)s'
    
    self._log.info('* Create projection library')
    self.runJob('xmipp_angular_project_library', args % stepParams, numberOfMpi=processorsToUse, **kwargs)
Exemplo n.º 2
0
def runAngularProjectLibraryStep(self, iterN, refN, args, stepParams, **kwargs):
    args += ' --method %(method)s'
    if stepParams['method'] == 'fourier':
        if self._fourierMaxFrequencyOfInterest[iterN] == -1:
            fourierMaxFrequencyOfInterest = self._getFourierMaxFrequencyOfInterest(iterN-1, refN)
            fourierMaxFrequencyOfInterest = self.resolSam / fourierMaxFrequencyOfInterest + stepParams['constantToAdd']
            
            if fourierMaxFrequencyOfInterest > 0.5:
                fourierMaxFrequencyOfInterest = 0.5
            elif fourierMaxFrequencyOfInterest < 0.:
                fourierMaxFrequencyOfInterest = 0.001
        else:
            fourierMaxFrequencyOfInterest = self._fourierMaxFrequencyOfInterest[iterN]
        
        stepParams['fourierMaxFrequencyOfInterest'] = fourierMaxFrequencyOfInterest
        args += ' %(paddingAngularProjection)s %(fourierMaxFrequencyOfInterest)s %(kernelAngularProjection)s'
    
    processorsToUse = self.numberOfMpi.get() * self.numberOfThreads.get()
    if processorsToUse > 1:
        memoryAvailable = getMemoryAvailable()
        processorsToUse = min(processorsToUse, memoryAvailable/stepParams['memoryUsed'])
    
    if self.numberOfMpi > 1 and processorsToUse > 1:
        stepParams['mpiJobSize'] = self.mpiJobSize.get()
        args += ' --mpi_job_size %(mpiJobSize)s'
    
    self._log.info('* Create projection library')
    self.runJob('xmipp_angular_project_library', args % stepParams, numberOfMpi=processorsToUse, **kwargs)