Exemplo n.º 1
0
    def _validate(self):
        validateMsgs = []

        if not self.inputVolumes.hasValue():
            validateMsgs.append('Please provide an initial volume(s).')

        if self.doNormalize.get():
            size = int(self._getSize() / 2)

            if self.backRadius.get() > size:
                validateMsgs.append(
                    'Set a valid Background radius less than %d' % size)

        if self.doSymmetrize.get():
            if self.symmetryGroup.get() == 'c1':
                validateMsgs.append('c1 is not a valid symmetry group.'
                                    'If you do not want to symmetrize set'
                                    'the field Symmetrize to not.')

        if self.useGpu and not isXmippCudaPresent(CUDA_ALIGN_SIGNIFICANT):
            validateMsgs.append(
                "You asked to use GPU, but I cannot find Xmipp cuda programs in the path"
            )

        return validateMsgs
 def _validate(self):
     errors = []
     if self.useGpu and not isXmippCudaPresent():
         errors.append(
             "You have asked to use GPU, but I cannot find the Xmipp GPU programs"
         )
     return errors
Exemplo n.º 3
0
    def _validate(self):
        errors = []

        if self.doCTFCorrection:

            if not self.doAutoCTFGroup and not exists(self.setOfDefocus.get()):
                errors.append("Error: for non-automated ctf grouping, "
                              "please provide a docfile!")

            if not self.inputParticles.get().hasCTF():
                errors.append("Error: for doing CTF correction the input "
                              "particles should have CTF information.")

        if self.numberOfMpi <= 1:
            errors.append(
                "The number of MPI processes has to be larger than 1")

        self._validateDim(self.inputParticles.get(),
                          self.input3DReferences.get(), errors,
                          'Input particles', 'Reference volume')

        if self.useGpu and not isXmippCudaPresent():
            errors.append(
                "You have asked to use GPU, but I cannot find Xmipp GPU programs in the path"
            )

        return errors
 def _validate(self):
     validateMsgs = []
     # if there are Volume references, it cannot be empty.
     if self.inputVolumes.get() and not self.inputVolumes.hasValue():
         validateMsgs.append('Please provide an input reference volume.')
     if self.inputParticles.get() and not self.inputParticles.hasValue():
         validateMsgs.append('Please provide input particles.')
     if self.useGpu and not isXmippCudaPresent(CUDA_ALIGN_SIGNIFICANT):
         validateMsgs.append("You have asked to use GPU, but I cannot find the Xmipp GPU programs in the path")
     return validateMsgs
Exemplo n.º 5
0
 def _validate(self):
     errors = []
     newSize = self.imageSize.get()
     x, y, _ = self.inputParticles.get().getDim()
     if newSize > x or newSize > y:
         errors.append('The image size must be smaller than the size of '
                       'the input images')
     if not isXmippCudaPresent("xmipp_cuda_correlation"):
         errors.append("I cannot find the Xmipp GPU programs in the path")
     return errors
Exemplo n.º 6
0
 def _validate(self):
     validateMsgs = ProtAnalysis3D._validate(self)
     # if there are Volume references, it cannot be empty.
     if self.inputVolume.get() and not self.inputVolume.hasValue():
         validateMsgs.append('Please provide an input reference volume.')
     if self.inputParticles.get() and not self.inputParticles.hasValue():
         validateMsgs.append('Please provide input particles.')
     if self.angularSampling.get() > 40:
         validateMsgs.append("The angular sampling must be <= 40")
     if self.useGpu and not isXmippCudaPresent():
         validateMsgs.append(
             "You have asked to use GPU, but I cannot find the Xmipp GPU programs"
         )
     return validateMsgs
 def _validateBinary(self):
     errors = []
     getXmippHome = self.getClassPackage().Plugin.getHome
     cpuBinaryFn = getXmippHome('bin', 'xmipp_movie_alignment_correlation')
     if self.useGpu.get(
     ) and not isXmippCudaPresent("xmipp_cuda_movie_alignment_correlation"):
         errors.append('GPU version not found, make sure that Xmipp is '
                       'compiled with GPU\n'
                       '( *CUDA=True* in _scipion.conf_ + '
                       '_run_: $ *scipion installb xmippSrc* ).')
     elif not os.path.isfile(cpuBinaryFn):
         errors.append(
             'CPU version not found for some reason, try to use the GPU version.'
         )
     return errors
 def _validate(self):
     errors = []
     if (self.doResize.get() and
             self.newSize.get() > self.inputParticles.get().getDim()[0]):
         errors.append("Fourier resize method cannot be used "
                       "to increase the dimensions")
     if (self.doResize.get() and self.newSize.get()
             == self.inputParticles.get().getDim()[0]):
         errors.append("The new chosen size is equal to the "
                       "recent particles size")
     if self.useGpu and not isXmippCudaPresent():
         errors.append(
             "You have asked to use GPU, but I cannot find the Xmipp GPU programs"
         )
     return errors
    def _validate(self):
        errors = []
        if self.useReferenceImages:
            if self.numberOfClasses<self.referenceImages.get().getSize():
                errors.append('The number of classes must be equal or greater'
                              ' than the number of references')
            if self.referenceImages.hasValue():
                [x1, y1, _] = self.referenceImages.get().getDimensions()
                [x2, y2, _] = self.inputParticles.get().getDim()
                if x1 != x2 or y1 != y2:
                    errors.append('The input images (%s, %s) and the reference images (%s, %s) '
                                  'have different sizes' % (x2, y2, x1, y1))
            else:
                errors.append("Please, enter the reference images")
        if not isXmippCudaPresent("xmipp_cuda_correlation"):
            errors.append("I cannot find the Xmipp GPU programs in the path")

        return errors
 def _validate(self):
     """ Should be overriden in subclasses to 
     return summary message for NORMAL EXECUTION. 
     """
     errors = ProtReconstruct3D._validate(self)
     if self.useGpu.get() and self.legacy.get():
         errors.append("Legacy version is not implemented for GPU")
     if self.approx.get() and self.legacy.get():
         errors.append(
             "Approximative version is not implemented for Legacy code")
     if not self.useGpu.get() and self.numberOfThreads.get() > 1:
         errors.append(
             "CPU version can use only a single thread. Use MPI instead")
     if self.useGpu and not isXmippCudaPresent():
         errors.append(
             "You have asked to use GPU, but I cannot find Xmipp GPU programs in the path"
         )
     return errors
Exemplo n.º 11
0
    def _validate(self):
        errors = []
        inputSet = self.inputSet.get()
        if isinstance(inputSet, SetOfClasses2D):
            if not self.inputSet.get().hasRepresentatives():
                errors.append("The input classes should have representatives.")
                
                
        if self.dimRed:
            nGrids = self.numGrids.get()
            if (nGrids * nGrids) > inputSet.getSize():
                errors.append('Dimensionaly reduction could not be applied')
                errors.append('if the number of classes is less than the number')
                errors.append('of grids squared. \n')
                errors.append('Consider either provide more classes or')
                errors.append('disable dimensionality reduction')

        if self.useGpu and not isXmippCudaPresent():
            errors.append("You have asked to use GPU, but I cannot find Xmipp GPU programs in the path")

        return errors
    def _validate(self):
        errors = []
        if self.thereisRefVolume:
            if self.refVolume.hasValue():
                refVolume = self.refVolume.get()
                x1, y1, _ = refVolume.getDim()
                x2, y2, _ = self.inputSet.get().getDimensions()
                if x1 != x2 or y1 != y2:
                    errors.append('The input images and the reference volume '
                                  'have different sizes')
            else:
                errors.append("Please, enter a reference image")

        SL = emlib.SymList()
        SL.readSymmetryFile(self.symmetryGroup.get())
        if (100 - self.alpha0.get()) / 100.0 * (SL.getTrueSymsNo() + 1) > 1:
            errors.append("Increase the initial significance it is too low "
                          "for this symmetry")

        if self.useGpu and not isXmippCudaPresent():
            errors.append(
                "You have asked to use GPU, but I cannot find Xmipp GPU programs in the path"
            )
        return errors