Exemple #1
0
 def _validate(self):
     errors = []
     # Check that the program exists
     useGPU = self.useGPU.get()
     if not exists(getProgram(useGPU)):
         errors.append("Binary '%s' does not exits. \n"
                       "Check configuration file: "
                       "~/.config/scipion/scipion.conf\n"
                       "and set GEMPICKER variablesproperly."
                       % getProgram(useGPU))
         print "os.environ['GEMPICKER_HOME']", os.environ['GEMPICKER_HOME']
         print "os.environ['GEMPICKER']", os.environ['GEMPICKER']
     # Check that the number of input masks (in case of non-circular mask)
     # should be the same of the number of references, if greater than one
     if self.maskType == MASK_OBJECT:
         n = len(self.inputMasks)
         if n > 1 and n != self.inputReferences.get().getSize():
             errors.append('If the number of input masks is greater than '
                           'one, it should be equal to the number of '
                           'references.')
     
     value1 = round(self.thresholdLow,1)
     value2 = round(self.thresholdHigh,1)
     
     if (self.thresholdLow < self.thresholdHigh and
                     0.0 <= value1 <= 1.0 and 0.0 <= value2 <= 1.0):
         pass
     else:
         errors.append('Wrong threshold values!')
     
     return errors
    def _validate(self):
        errors = []
        # Check that the program exists
        program = getProgram()
        if program is None:
            errors.append(
                "Missing variables GAUTOMATCH and/or GAUTOMATCH_HOME")
        elif not os.path.exists(program):
            errors.append("Binary '%s' does not exists.\n" % program)

        # If there is any error at this point it is related to config variables
        if errors:
            errors.append(
                "Check configuration file: ~/.config/scipion/scipion.conf")
            errors.append(
                "and set GAUTOMATCH and GAUTOMATCH_HOME variables properly.")
            if program is not None:
                errors.append("Current values:")
                errors.append("GAUTOMATCH_HOME = %s" %
                              os.environ['GAUTOMATCH_HOME'])
                errors.append("GAUTOMATCH = %s" % os.environ['GAUTOMATCH'])

        if not self.localAvgMin < self.localAvgMax:
            errors.append('Wrong values of local average cut-off!')
        if self.exclusive:
            if not self.inputBadCoords.get() and not self.inputDefects.get():
                errors.append(
                    "You have to provide at least one set of coordinates ")
                errors.append("for exclusive picking!")

        return errors
Exemple #3
0
    def _validate(self):
        errors = []
        # Check that the program exists
        program = getProgram()
        if program is None:
            errors.append(
                "Missing variables GAUTOMATCH and/or GAUTOMATCH_HOME")
        elif not os.path.exists(program):
            errors.append("Binary '%s' does not exists.\n" % program)

        # If there is any error at this point it is related to config variables
        if errors:
            errors.append("Check configuration file: "
                          "~/.config/scipion/scipion.conf")
            errors.append("and set GAUTOMATCH and GAUTOMATCH_HOME "
                          "variables properly.")
            if program is not None:
                errors.append("Current values:")
                errors.append("GAUTOMATCH_HOME = %s" %
                              os.environ['GAUTOMATCH_HOME'])
                errors.append("GAUTOMATCH = %s" % os.environ['GAUTOMATCH'])

        if not self.localAvgMin < self.localAvgMax:
            errors.append('Wrong values of local average cut-off!')

        if self.exclusive:
            if not self.inputBadCoords.get() and not self.inputDefects.get():
                errors.append("You have to provide at least "
                              "one set of coordinates ")
                errors.append("for exclusive picking!")

        nprocs = max(self.numberOfMpi.get(), self.numberOfThreads.get())

        if nprocs < len(self.getGpuList()):
            errors.append("Multiple GPUs can not be used by a single process. "
                          "Make sure you specify more processors than GPUs. ")

        return errors
Exemple #4
0
    def _validate(self):
        errors = []
        # Check that the program exists
        program = getProgram()
        if program is None:
            errors.append("Missing variables GAUTOMATCH and/or GAUTOMATCH_HOME")
        elif not os.path.exists(program):
            errors.append("Binary '%s' does not exists.\n" % program)

        # If there is any error at this point it is related to config variables
        if errors:
            errors.append("Check configuration file: "
                          "~/.config/scipion/scipion.conf")
            errors.append("and set GAUTOMATCH and GAUTOMATCH_HOME "
                          "variables properly.")
            if program is not None:
                errors.append("Current values:")
                errors.append("GAUTOMATCH_HOME = %s"
                              % os.environ['GAUTOMATCH_HOME'])
                errors.append("GAUTOMATCH = %s" % os.environ['GAUTOMATCH'])

        if not self.localAvgMin < self.localAvgMax:
            errors.append('Wrong values of local average cut-off!')

        if self.exclusive:
            if not self.inputBadCoords.get() and not self.inputDefects.get():
                errors.append("You have to provide at least "
                              "one set of coordinates ")
                errors.append("for exclusive picking!")

        nprocs = max(self.numberOfMpi.get(), self.numberOfThreads.get())

        if nprocs < len(self.getGpuList()):
            errors.append("Multiple GPUs can not be used by a single process. "
                          "Make sure you specify more processors than GPUs. ")

        return errors