def _insertAllSteps(self): importFrom = self.importFrom.get() ci = self.getImportClass() if ci is None: ProtImportImages._insertAllSteps(self) else: self._insertFunctionStep('importParticlesStep', importFrom, self.importFilePath)
def _getImportChoices(self): """ Return a list of possible choices from which the import can be done. (usually packages formas such as: xmipp3, eman2, relion...etc. """ choices = ProtImportImages._getImportChoices(self) return choices + ['emx', 'xmipp3', 'scipion']
def _getImportChoices(self): """ Return a list of possible choices from which the import can be done. (usually packages formas such as: xmipp3, eman2, relion...etc. """ choices = ProtImportImages._getImportChoices(self) return choices
def _defineAcquisitionParams(self, form): group = ProtImportImages._defineAcquisitionParams(self, form) group.addParam( 'samplingRateMode', params.EnumParam, choices=[Message.LABEL_SAMP_MODE_1, Message.LABEL_SAMP_MODE_2], default=SAMPLING_FROM_IMAGE, label=Message.LABEL_SAMP_MODE, help=Message.TEXT_SAMP_MODE) group.addParam('samplingRate', params.FloatParam, default=1.0, condition='samplingRateMode==%d' % SAMPLING_FROM_IMAGE, label=Message.LABEL_SAMP_RATE, help=Message.TEXT_SAMP_RATE) group.addParam('scannedPixelSize', params.FloatParam, default=7.0, condition='samplingRateMode==%d' % SAMPLING_FROM_SCANNER, label=Message.LABEL_SCANNED, help='') return group
def _getImportChoices(self): """ Return a list of possible choices from which the import can be done. (usually packages formas such as: xmipp3, eman2, relion...etc. """ choices = ProtImportImages._getImportChoices(self) return choices + ['emx', 'xmipp3', 'relion', 'scipion', 'frealign']#the order of this list is related to the constants defined
def _defineAcquisitionParams(self, form): form.addParam('samplingRate', params.FloatParam, default=1., label=Message.LABEL_SAMP_RATE) group = ProtImportImages._defineAcquisitionParams(self, form) group.expertLevel.set(LEVEL_ADVANCED)
def _defineAcquisitionParams(self, form): form.addParam('samplingRate', params.FloatParam, default=1., label=Message.LABEL_SAMP_RATE) group = ProtImportImages._defineAcquisitionParams(self, form) group.expertLevel.set(LEVEL_ADVANCED) # Change some params properties patternParam = form.getParam('filesPattern') patternParam.condition.set('0')
def _getImportChoices(self): """ Return a list of possible choices from which the import can be done. (usually packages formas such as: xmipp3, eman2, relion...etc. """ choices = ProtImportImages._getImportChoices(self) # Do not change the order of this list since # it is related to the constants defined return choices + self.importFormats
def _getImportChoices(self): """ Return a list of possible choices from which the import can be done. (usually packages formas such as: xmipp3, eman2, relion...etc. """ choices = ProtImportImages._getImportChoices(self) return choices + [ 'emx', 'xmipp3', 'relion', 'scipion', 'frealign' ] #the order of this list is related to the constants defined
def _validate(self): ci = self.getImportClass() if ci is None: return ProtImportImages._validate(self) else: errors = self._validateFileExtension() if errors: return errors else: return ci.validateParticles()
def _defineAcquisitionParams(self, form): group = ProtImportImages._defineAcquisitionParams(self, form) group.addParam('samplingRateMode', EnumParam, choices=[Message.LABEL_SAMP_MODE_1, Message.LABEL_SAMP_MODE_2], default=SAMPLING_FROM_IMAGE, label=Message.LABEL_SAMP_MODE, help=Message.TEXT_SAMP_MODE) group.addParam('samplingRate', FloatParam, default=1.0, condition='samplingRateMode==%d' % SAMPLING_FROM_IMAGE, label=Message.LABEL_SAMP_RATE, help=Message.TEXT_SAMP_RATE) group.addParam('scannedPixelSize', FloatParam, default=7.0, condition='samplingRateMode==%d' % SAMPLING_FROM_SCANNER, label=Message.LABEL_SCANNED, help='') return group
def loadAcquisitionInfo(self): """ Return a proper acquistionInfo (dict) or an error message (str). """ if self.importFrom != self.IMPORT_FROM_FILES: return ProtImportImages.loadAcquisitionInfo(self) result = "Could not find acquistion information" for fileName, fileId in self.iterFiles(): baseName = pwutils.removeExt(fileName) xml1 = baseName.replace('_frames', '.xml') if os.path.exists(xml1): result = self._parseXML(xml1) else: xml2 = baseName + '.xml' result = self._parseXML(xml2) return result
def _validate(self): errors = ProtImportImages._validate(self) errors += self._validateBlacklist() return errors
def _summary(self): if self.importFrom == self.IMPORT_FROM_FILES: return ProtImportImages._summary(self) else: return [self.summaryVar.get('')]
def _defineParams(self, form): ProtImportImages._defineParams(self, form)
def _defineAcquisitionParams(self, form): group = ProtImportImages._defineAcquisitionParams(self, form) group.addParam('samplingRate', params.FloatParam, label=Message.LABEL_SAMP_RATE)
def __init__(self, **args): ProtImportImages.__init__(self, **args)
def _validate(self): ci = self.getImportClass() if ci is None: return ProtImportImages._validate(self) else: return ci.validateParticles()