def preProcess(self, _edObject=None): EDPluginExecProcessXIA2CORE.preProcess(self) EDVerbose.DEBUG("EDPluginExecDcrawv1_0.preProcess") self.__strRawFile = self.getDataInput().getRawImagePath().getPath().getValue() if self.getDataInput().getOutputPath() is not None: self.__strOutputFile = self.getDataInput().getOutputPath().getPath().getValue() if self.getDataInput().getExtractThumbnail() is not None: self.__bExtracThumbnail = (self.getDataInput().getExtractThumbnail().getValue() in [1, "true", "True", "TRUE", True]) ######################################################################## # This option is incompatible with all others ######################################################################## if self.__bExtracThumbnail is True: self.__bWBCamera = False self.__strOutputType = None #we cannot know what find of thumbnail is saved, can be jpeg, tiff or nothing ! else: if self.getDataInput().getExportTiff() is not None: self.__bExportTiff = (self.getDataInput().getExportTiff().getValue() in [1, "true", "True", "TRUE", True]) if self.__bExportTiff: self.__strOutputType = "tiff" if self.getDataInput().getWhiteBalanceAuto() is not None: self.__bWBAuto = (self.getDataInput().getWhiteBalanceAuto().getValue() in [1, "true", "True", "TRUE", True]) if self.__bWBAuto is True: self.__bWBCamera = False if self.getDataInput().getWhiteBalanceFromCamera() is not None: self.__bWBCamera = (self.getDataInput().getWhiteBalanceFromCamera().getValue() in [1, "true", "True", "TRUE", True]) if self.getDataInput().getLevelsFromCamera() is not None: self.__bLevelCamera = (self.getDataInput().getLevelsFromCamera().getValue() in [1, "true", "True", "TRUE", True]) if self.getDataInput().getInterpolationQuality() is not None: self.__iInterpolate = self.getDataInput().getInterpolationQuality().getValue() self.generateDcrawCommand()
def preProcess(self, _edObject=None): EDPluginExecProcessXIA2CORE.preProcess(self) EDVerbose.DEBUG("EDPluginExecDcrawv1_0.preProcess") self.__strRawFile = self.getDataInput().getRawImagePath().getPath().getValue() if self.getDataInput().getOutputPath() is not None: self.__strOutputFile = self.getDataInput().getOutputPath().getPath().getValue() if self.getDataInput().getExtractThumbnail() is not None: self.__bExtracThumbnail = self.getDataInput().getExtractThumbnail().getValue() in [ 1, "true", "True", "TRUE", True, ] ######################################################################## # This option is incompatible with all others ######################################################################## if self.__bExtracThumbnail is True: self.__bWBCamera = False self.__strOutputType = ( None ) # we cannot know what find of thumbnail is saved, can be jpeg, tiff or nothing ! else: if self.getDataInput().getExportTiff() is not None: self.__bExportTiff = self.getDataInput().getExportTiff().getValue() in [1, "true", "True", "TRUE", True] if self.__bExportTiff: self.__strOutputType = "tiff" if self.getDataInput().getWhiteBalanceAuto() is not None: self.__bWBAuto = self.getDataInput().getWhiteBalanceAuto().getValue() in [ 1, "true", "True", "TRUE", True, ] if self.__bWBAuto is True: self.__bWBCamera = False if self.getDataInput().getWhiteBalanceFromCamera() is not None: self.__bWBCamera = self.getDataInput().getWhiteBalanceFromCamera().getValue() in [ 1, "true", "True", "TRUE", True, ] if self.getDataInput().getLevelsFromCamera() is not None: self.__bLevelCamera = self.getDataInput().getLevelsFromCamera().getValue() in [ 1, "true", "True", "TRUE", True, ] if self.getDataInput().getInterpolationQuality() is not None: self.__iInterpolate = self.getDataInput().getInterpolationQuality().getValue() self.generateDcrawCommand()
def __init__(self): EDPluginExecProcessXIA2CORE.__init__(self) self.setXSDataInputClass(CCP4DataInputTRUNCATE) self._hklin = None self._hklout = None self._nres = None return
def preProcess(self, _edObject=None): EDPluginExecProcessXIA2CORE.preProcess(self) EDVerbose.DEBUG('*** EDPluginExecDIMPLETRUNCATETESTv10.preProcess') data = self.getDataInput() self._hklin = data.getHKLIN().getPath().getValue() self._hklout = data.getHKLOUT().getPath().getValue() self._nres = data.getSequence().getNumberOfResidues().getValue() self.truncate_script() return
def preProcess(self, _edObject = None): EDPluginExecProcessXIA2CORE.preProcess(self) EDVerbose.DEBUG('*** EDPluginExecDIMPLETRUNCATETESTv10.preProcess') data = self.getDataInput() self._hklin = data.getHKLIN().getPath().getValue() self._hklout = data.getHKLOUT().getPath().getValue() self._nres = data.getSequence().getNumberOfResidues().getValue() self.truncate_script() return
def postProcess(self, _edObject=None): EDPluginExecProcessXIA2CORE.postProcess(self) EDVerbose.DEBUG("EDPluginExecDcrawv1_0.postProcess") # Create some output data xsDataResult = XSDataResultExecDcrawv1() xsdFile = XSDataFile() if self.__strOutputFile is not None: shutil.copyfile(os.path.join(self.getWorkingDirectory(), self.getLogFileName()), self.__strOutputFile) xsdFile.setPath(XSDataString(self.__strOutputFile)) else: xsdFile.setPath(XSDataString(os.path.join(self.getWorkingDirectory(), self.getLogFileName()))) xsDataResult.setOutputPath(xsdFile) if self.__strOutputType is not None: xsDataResult.setOutputFileType(XSDataString(self.__strOutputType)) self.setDataOutput(xsDataResult)
def __init__(self): """ """ EDPluginExecProcessXIA2CORE.__init__(self) self.setXSDataInputClass(XSDataInputExecDcrawv1) self.__strRawFile = None self.__strOutputType = "ppm" self.__strOutputFile = None self.__bExportTiff = False self.__bExtracThumbnail = False self.__bWBAuto = False self.__bWBCamera = True self.__bLevelCamera = False self.__iInterpolate = None
def postProcess(self, _edObject = None): EDPluginExecProcessXIA2CORE.postProcess(self) EDVerbose.DEBUG('*** EDPluginExecDIMPLETRUNCATETESTv10.postProcess') self.programTermination() xsDataResult = CCP4DataResultTRUNCATE( HKLOUT = HKL(self._hklout), returnStatus = CCP4ReturnStatus()) self.setDataOutput(xsDataResult) if not os.path.isfile(self.getDataOutput().getHKLOUT().getPath().getValue()): raise RuntimeError, 'File %s does not exist' % self.getDataOutput().getHKLOUT().getPath().getValue() return
def postProcess(self, _edObject=None): EDPluginExecProcessXIA2CORE.postProcess(self) EDVerbose.DEBUG('*** EDPluginExecDIMPLETRUNCATETESTv10.postProcess') self.programTermination() xsDataResult = CCP4DataResultTRUNCATE(HKLOUT=HKL(self._hklout), returnStatus=CCP4ReturnStatus()) self.setDataOutput(xsDataResult) if not os.path.isfile( self.getDataOutput().getHKLOUT().getPath().getValue()): raise RuntimeError, 'File %s does not exist' % self.getDataOutput( ).getHKLOUT().getPath().getValue() return
def process(self, _edObject=None): EDPluginExecProcessXIA2CORE.process(self) EDVerbose.DEBUG('*** EDPluginExecDIMPLETRUNCATETESTv10.process') return
def process(self, _edObject = None): EDPluginExecProcessXIA2CORE.process(self) EDVerbose.DEBUG('*** EDPluginExecDIMPLETRUNCATETESTv10.process') return