def parseLabelitDistlOutput(self, _strLabelitDistlLogText): EDVerbose.DEBUG("EDPluginDistlSignalStrengthv1_1.parseLabelitDistlOutput") xsDataImageQualityIndicators = None if _strLabelitDistlLogText is not None: xsDataImageQualityIndicators = XSDataImageQualityIndicators() for strLine in _strLabelitDistlLogText.split("\n"): if strLine.find("Spot Total") != -1: iSpotTotal = int(strLine.split()[3]) xsDataImageQualityIndicators.setSpotTotal(XSDataInteger(iSpotTotal)) elif strLine.find("In-Resolution Total") != -1: iInResTotal = int(strLine.split()[3]) xsDataImageQualityIndicators.setInResTotal(XSDataInteger(iInResTotal)) elif strLine.find("Good Bragg Candidates") != -1: iGoodBraggCandidates = int(strLine.split()[4]) xsDataImageQualityIndicators.setGoodBraggCandidates(XSDataInteger(iGoodBraggCandidates)) elif strLine.find("Ice Rings") != -1: iIceRings = int(strLine.split()[3]) xsDataImageQualityIndicators.setIceRings(XSDataInteger(iIceRings)) elif strLine.find("Method 1 Resolution") != -1: fMethod1Res = float(strLine.split()[4]) xsDataImageQualityIndicators.setMethod1Res(XSDataDouble(fMethod1Res)) elif strLine.find("Method 2 Resolution") != -1: if strLine.split()[4] != "None": fMethod2Res = float(strLine.split()[4]) xsDataImageQualityIndicators.setMethod2Res(XSDataDouble(fMethod2Res)) elif strLine.find("Maximum unit cell") != -1: if strLine.split()[4] != "None": fMaxUnitCell = float(strLine.split()[4]) xsDataImageQualityIndicators.setMaxUnitCell(XSDataDouble(fMaxUnitCell)) elif strLine.find("%Saturation, Top 50 Peaks") != -1: fPctSaturationTop50Peaks = float(strLine.split()[5]) xsDataImageQualityIndicators.setPctSaturationTop50Peaks(XSDataDouble(fPctSaturationTop50Peaks)) elif strLine.find("In-Resolution Ovrld Spots") != -1: iInResolutionOvrlSpots = int(strLine.split()[4]) xsDataImageQualityIndicators.setInResolutionOvrlSpots(XSDataInteger(iInResolutionOvrlSpots)) elif strLine.find("Bin population cutoff for method 2 resolution") != -1: fBinPopCutOffMethod2Res = float(strLine.split()[7][:-1]) xsDataImageQualityIndicators.setBinPopCutOffMethod2Res(XSDataDouble(fBinPopCutOffMethod2Res)) elif strLine.find("Total integrated signal, pixel-ADC units above local background (just the good Bragg candidates)") != -1: fTotalIntegratedSignal = float(strLine.split()[-1]) xsDataImageQualityIndicators.setTotalIntegratedSignal(XSDataDouble(fTotalIntegratedSignal)) elif strLine.find("Signals range from") != -1: listStrLine = strLine.split() fSignalRangeMin = float(listStrLine[3]) fSignalRangeMax = float(listStrLine[5]) fSignalRangeAverage = float(listStrLine[-1]) xsDataImageQualityIndicators.setSignalRangeMin(XSDataDouble(fSignalRangeMin)) xsDataImageQualityIndicators.setSignalRangeMax(XSDataDouble(fSignalRangeMax)) xsDataImageQualityIndicators.setSignalRangeAverage(XSDataDouble(fSignalRangeAverage)) elif strLine.find("Saturations range from") != -1: listStrLine = strLine.split() fSaturationRangeMin = float(listStrLine[3][:-1]) fSaturationRangeMax = float(listStrLine[5][:-1]) fSaturationRangeAverage = float(listStrLine[-1][:-1]) xsDataImageQualityIndicators.setSaturationRangeMin(XSDataDouble(fSaturationRangeMin)) xsDataImageQualityIndicators.setSaturationRangeMax(XSDataDouble(fSaturationRangeMax)) xsDataImageQualityIndicators.setSaturationRangeAverage(XSDataDouble(fSaturationRangeAverage)) return xsDataImageQualityIndicators
def parseLabelitDistlOutput(self, _strLabelitDistlLogText): self.DEBUG("EDPluginDistlSignalStrengthv1_1.parseLabelitDistlOutput") xsDataImageQualityIndicators = None if _strLabelitDistlLogText is not None: xsDataImageQualityIndicators = XSDataImageQualityIndicators() for strLine in _strLabelitDistlLogText.split("\n"): if strLine.find("Spot Total") != -1: iSpotTotal = int(strLine.split()[3]) xsDataImageQualityIndicators.setSpotTotal( XSDataInteger(iSpotTotal)) elif strLine.find("In-Resolution Total") != -1: iInResTotal = int(strLine.split()[3]) xsDataImageQualityIndicators.setInResTotal( XSDataInteger(iInResTotal)) elif strLine.find("Good Bragg Candidates") != -1: iGoodBraggCandidates = int(strLine.split()[4]) xsDataImageQualityIndicators.setGoodBraggCandidates( XSDataInteger(iGoodBraggCandidates)) elif strLine.find("Ice Rings") != -1: iIceRings = int(strLine.split()[3]) xsDataImageQualityIndicators.setIceRings( XSDataInteger(iIceRings)) elif strLine.find("Method 1 Resolution") != -1: fMethod1Res = float(strLine.split()[4]) xsDataImageQualityIndicators.setMethod1Res( XSDataDouble(fMethod1Res)) elif strLine.find("Method 2 Resolution") != -1: if strLine.split()[4] != "None": fMethod2Res = float(strLine.split()[4]) xsDataImageQualityIndicators.setMethod2Res( XSDataDouble(fMethod2Res)) elif strLine.find("Maximum unit cell") != -1: if strLine.split()[4] != "None": fMaxUnitCell = float(strLine.split()[4]) xsDataImageQualityIndicators.setMaxUnitCell( XSDataDouble(fMaxUnitCell)) elif strLine.find("%Saturation, Top 50 Peaks") != -1: fPctSaturationTop50Peaks = float(strLine.split()[5]) xsDataImageQualityIndicators.setPctSaturationTop50Peaks( XSDataDouble(fPctSaturationTop50Peaks)) elif strLine.find("In-Resolution Ovrld Spots") != -1: iInResolutionOvrlSpots = int(strLine.split()[4]) xsDataImageQualityIndicators.setInResolutionOvrlSpots( XSDataInteger(iInResolutionOvrlSpots)) elif strLine.find( "Bin population cutoff for method 2 resolution") != -1: fBinPopCutOffMethod2Res = float(strLine.split()[7][:-1]) xsDataImageQualityIndicators.setBinPopCutOffMethod2Res( XSDataDouble(fBinPopCutOffMethod2Res)) elif strLine.find( "Total integrated signal, pixel-ADC units above local background (just the good Bragg candidates)" ) != -1: fTotalIntegratedSignal = float(strLine.split()[-1]) xsDataImageQualityIndicators.setTotalIntegratedSignal( XSDataDouble(fTotalIntegratedSignal)) elif strLine.find("Signals range from") != -1: listStrLine = strLine.split() fSignalRangeMin = float(listStrLine[3]) fSignalRangeMax = float(listStrLine[5]) fSignalRangeAverage = float(listStrLine[-1]) xsDataImageQualityIndicators.setSignalRangeMin( XSDataDouble(fSignalRangeMin)) xsDataImageQualityIndicators.setSignalRangeMax( XSDataDouble(fSignalRangeMax)) xsDataImageQualityIndicators.setSignalRangeAverage( XSDataDouble(fSignalRangeAverage)) elif strLine.find("Saturations range from") != -1: listStrLine = strLine.split() fSaturationRangeMin = float(listStrLine[3][:-1]) fSaturationRangeMax = float(listStrLine[5][:-1]) fSaturationRangeAverage = float(listStrLine[-1][:-1]) xsDataImageQualityIndicators.setSaturationRangeMin( XSDataDouble(fSaturationRangeMin)) xsDataImageQualityIndicators.setSaturationRangeMax( XSDataDouble(fSaturationRangeMax)) xsDataImageQualityIndicators.setSaturationRangeAverage( XSDataDouble(fSaturationRangeAverage)) return xsDataImageQualityIndicators