本文整理匯總了Python中XSDataMXv1.XSDataExperimentalCondition.getDetector方法的典型用法代碼示例。如果您正苦於以下問題:Python XSDataExperimentalCondition.getDetector方法的具體用法?Python XSDataExperimentalCondition.getDetector怎麽用?Python XSDataExperimentalCondition.getDetector使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類XSDataMXv1.XSDataExperimentalCondition
的用法示例。
在下文中一共展示了XSDataExperimentalCondition.getDetector方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: generateXSDataIndexingResult
# 需要導入模塊: from XSDataMXv1 import XSDataExperimentalCondition [as 別名]
# 或者: from XSDataMXv1.XSDataExperimentalCondition import getDetector [as 別名]
def generateXSDataIndexingResult(_xsDataResultXDSIndexing, _xsDataExperimentalCondition=None):
xsDataIndexingResult = XSDataIndexingResult()
xsDataIndexingSolutionSelected = XSDataIndexingSolutionSelected()
xsDataCrystalSelected = XSDataCrystal()
# xsDataIndexingSolutionSelected.setNumber(XSDataInteger(iIndex))
# xsDataCellSelected = xsDataLabelitSolution.getUnitCell()
spaceGroupName = EDUtilsSymmetry.getMinimumSymmetrySpaceGroupFromBravaisLattice(_xsDataResultXDSIndexing.bravaisLattice.value)
xsDataCrystalSelected = XSDataCrystal()
xsDataSpaceGroupSelected = XSDataSpaceGroup()
xsDataSpaceGroupSelected.setName(XSDataString(spaceGroupName))
xsDataCrystalSelected.setSpaceGroup(xsDataSpaceGroupSelected)
# xsDataCrystalSelected.setCell(xsDataCellSelected)
xsDataCrystalSelected.setMosaicity(XSDataDouble(_xsDataResultXDSIndexing.mosaicity.value))
xsDataCrystalSelected.setCell(XSDataCell.parseString(_xsDataResultXDSIndexing.unitCell.marshal()))
xsDataIndexingSolutionSelected.setCrystal(xsDataCrystalSelected)
xsDataOrientation = XSDataOrientation()
xsDataOrientation.setMatrixA(_xsDataResultXDSIndexing.getAMatrix())
xsDataOrientation.setMatrixU(_xsDataResultXDSIndexing.getUMatrix())
xsDataIndexingSolutionSelected.setOrientation(xsDataOrientation)
xsDataStatisticsIndexing = XSDataStatisticsIndexing()
if (_xsDataExperimentalCondition is not None):
fBeamPositionXOrig = _xsDataExperimentalCondition.getDetector().getBeamPositionX().getValue()
fBeamPositionYOrig = _xsDataExperimentalCondition.getDetector().getBeamPositionY().getValue()
fBeamPositionXNew = _xsDataResultXDSIndexing.getBeamCentreX().getValue()
fBeamPositionYNew = _xsDataResultXDSIndexing.getBeamCentreY().getValue()
xsDataStatisticsIndexing.setBeamPositionShiftX(XSDataLength(fBeamPositionXOrig - fBeamPositionXNew))
xsDataStatisticsIndexing.setBeamPositionShiftY(XSDataLength(fBeamPositionYOrig - fBeamPositionYNew))
xsDataExperimentalConditionRefined = None
if (_xsDataExperimentalCondition is None):
xsDataExperimentalConditionRefined = XSDataExperimentalCondition()
else:
# Copy the incoming experimental condition
xmlExperimentalCondition = _xsDataExperimentalCondition.marshal()
xsDataExperimentalConditionRefined = XSDataExperimentalCondition.parseString(xmlExperimentalCondition)
xsDataDetector = xsDataExperimentalConditionRefined.getDetector()
if (xsDataDetector is None):
xsDataDetector = XSDataDetector()
xsDataDetector.setBeamPositionX(XSDataLength(_xsDataResultXDSIndexing.getBeamCentreX().value))
xsDataDetector.setBeamPositionY(XSDataLength(_xsDataResultXDSIndexing.getBeamCentreY().value))
xsDataDetector.setDistance(_xsDataResultXDSIndexing.getDistance())
xsDataExperimentalConditionRefined.setDetector(xsDataDetector)
xsDataIndexingSolutionSelected.setExperimentalConditionRefined(xsDataExperimentalConditionRefined)
xsDataIndexingResult.setSelectedSolution(xsDataIndexingSolutionSelected)
return xsDataIndexingResult
示例2: generateXSDataIndexingResult
# 需要導入模塊: from XSDataMXv1 import XSDataExperimentalCondition [as 別名]
# 或者: from XSDataMXv1.XSDataExperimentalCondition import getDetector [as 別名]
def generateXSDataIndexingResult(_xsDataResultLabelitIndexing, _xsDataExperimentalCondition=None):
EDVerbose.DEBUG("EDHandlerXSDataLabelitv1_1.generateXSDataIndexingOutput")
xsDataLabelitScreenOutput = _xsDataResultLabelitIndexing.screenOutput
xsDataLabelitMosflmScriptsOutput = _xsDataResultLabelitIndexing.mosflmScriptsOutput
iSelectedSolutionNumber = xsDataLabelitScreenOutput.getSelectedSolutionNumber().getValue()
xsDataIndexingResult = XSDataIndexingResult()
xsDataIndexingSolutionSelected = None
for xsDataLabelitSolution in xsDataLabelitScreenOutput.getLabelitScreenSolution():
xsDataCrystal = XSDataCrystal()
xsDataSpaceGroup = XSDataSpaceGroup()
edStringSpaceGroupName = EDUtilsSymmetry.getMinimumSymmetrySpaceGroupFromBravaisLattice(xsDataLabelitSolution.getBravaisLattice().getValue())
xsDataSpaceGroup.setName(XSDataString(edStringSpaceGroupName))
xsDataCrystal.setSpaceGroup(xsDataSpaceGroup)
xsDataCrystal.setCell(xsDataLabelitSolution.getUnitCell())
xsDataIndexingSolution = XSDataIndexingSolution()
xsDataIndexingSolution.setCrystal(xsDataCrystal)
iIndex = xsDataLabelitSolution.getSolutionNumber().getValue()
xsDataIndexingSolution.setNumber(XSDataInteger(iIndex))
xsDataIndexingResult.addSolution(xsDataIndexingSolution)
if (iIndex == iSelectedSolutionNumber):
xsDataIndexingSolutionSelected = XSDataIndexingSolutionSelected()
xsDataIndexingSolutionSelected.setNumber(XSDataInteger(iIndex))
edStringSelectedSpaceGroupName = edStringSpaceGroupName
xsDataCellSelected = xsDataLabelitSolution.getUnitCell()
fRmsdSelected = xsDataLabelitSolution.getRmsd().getValue()
iNumberOfSpotsSelected = xsDataLabelitSolution.getNumberOfSpots().getValue()
xsDataCrystalSelected = XSDataCrystal()
xsDataSpaceGroupSelected = XSDataSpaceGroup()
xsDataSpaceGroupSelected.setName(XSDataString(edStringSelectedSpaceGroupName))
xsDataSpaceGroupSelected.setITNumber(XSDataInteger(EDUtilsSymmetry.getITNumberFromSpaceGroupName(edStringSelectedSpaceGroupName)))
xsDataCrystalSelected.setSpaceGroup(xsDataSpaceGroupSelected)
xsDataCrystalSelected.setCell(xsDataCellSelected)
xsDataCrystalSelected.setMosaicity(XSDataDouble(xsDataLabelitScreenOutput.getMosaicity().getValue()))
xsDataIndexingSolutionSelected.setCrystal(xsDataCrystalSelected)
xsDataOrientation = XSDataOrientation()
xsDataOrientation.setMatrixA(xsDataLabelitMosflmScriptsOutput.getAMatrix())
xsDataOrientation.setMatrixU(xsDataLabelitMosflmScriptsOutput.getUMatrix())
xsDataIndexingSolutionSelected.setOrientation(xsDataOrientation)
xsDataStatisticsIndexing = XSDataStatisticsIndexing()
if (_xsDataExperimentalCondition is not None):
fBeamPositionXOrig = _xsDataExperimentalCondition.getDetector().getBeamPositionX().getValue()
fBeamPositionYOrig = _xsDataExperimentalCondition.getDetector().getBeamPositionY().getValue()
fBeamPositionXNew = xsDataLabelitScreenOutput.getBeamCentreX().getValue()
fBeamPositionYNew = xsDataLabelitScreenOutput.getBeamCentreY().getValue()
xsDataStatisticsIndexing.setBeamPositionShiftX(XSDataLength(fBeamPositionXOrig - fBeamPositionXNew))
xsDataStatisticsIndexing.setBeamPositionShiftY(XSDataLength(fBeamPositionYOrig - fBeamPositionYNew))
# xsDataStatisticsIndexing.setSpotDeviXSDataLength( dDistanceRefinedationAngular( XSDataAngle( dDeviationAngular ) )
xsDataStatisticsIndexing.setSpotDeviationPositional(XSDataLength(fRmsdSelected))
xsDataStatisticsIndexing.setSpotsUsed(XSDataInteger(iNumberOfSpotsSelected))
xsDataStatisticsIndexing.setSpotsTotal(XSDataInteger(iNumberOfSpotsSelected))
xsDataIndexingSolutionSelected.setStatistics(xsDataStatisticsIndexing)
xsDataExperimentalConditionRefined = None
if (_xsDataExperimentalCondition is None):
xsDataExperimentalConditionRefined = XSDataExperimentalCondition()
else:
# Copy the incoming experimental condition
xmlExperimentalCondition = _xsDataExperimentalCondition.marshal()
xsDataExperimentalConditionRefined = XSDataExperimentalCondition.parseString(xmlExperimentalCondition)
xsDataDetector = xsDataExperimentalConditionRefined.getDetector()
if (xsDataDetector is None):
xsDataDetector = XSDataDetector()
xsDataDetector.setBeamPositionX(xsDataLabelitScreenOutput.getBeamCentreX())
xsDataDetector.setBeamPositionY(xsDataLabelitScreenOutput.getBeamCentreY())
xsDataDetector.setDistance(xsDataLabelitScreenOutput.getDistance())
xsDataExperimentalConditionRefined.setDetector(xsDataDetector)
xsDataIndexingSolutionSelected.setExperimentalConditionRefined(xsDataExperimentalConditionRefined)
xsDataIndexingResult.setSelectedSolution(xsDataIndexingSolutionSelected)
xsDataIndexingResult.setIndexingLogFile(xsDataLabelitScreenOutput.getPathToLogFile())
return xsDataIndexingResult
示例3: generateXSDataIntegrationSubWedgeResult
# 需要導入模塊: from XSDataMXv1 import XSDataExperimentalCondition [as 別名]
# 或者: from XSDataMXv1.XSDataExperimentalCondition import getDetector [as 別名]
def generateXSDataIntegrationSubWedgeResult(_xsDataMOSFLMOutputIntegration, _xsDataExperimentalCondition=None):
"""
Translation from XSDataMOSFLMOutputIntegration to XSDataIntegrationSubWedgeResult.
"""
EDVerbose.DEBUG("EDHandlerXSDataMOSFLMv10.generateXSDataIntegrationInput")
EDFactoryPluginStatic.loadModule("XSDataMOSFLMv10")
xsDataIntegrationSubWedgeResult = XSDataIntegrationSubWedgeResult()
xsDataExperimentalConditionRefined = None
if (_xsDataExperimentalCondition is None):
xsDataExperimentalConditionRefined = XSDataExperimentalCondition()
else:
# Copy the incoming experimental condition
xmlExperimentalCondition = _xsDataExperimentalCondition.marshal()
xsDataExperimentalConditionRefined = XSDataExperimentalCondition.parseString(xmlExperimentalCondition)
xsDataDetector = xsDataExperimentalConditionRefined.getDetector()
if (xsDataDetector is None):
xsDataDetector = XSDataDetector()
xsDataIntegrationSubWedgeResult.setBestfilePar(XSDataString(_xsDataMOSFLMOutputIntegration.getBestfilePar().getValue()))
xsDataIntegrationSubWedgeResult.setBestfileDat(XSDataString(_xsDataMOSFLMOutputIntegration.getBestfileDat().getValue()))
xsDataIntegrationSubWedgeResult.setBestfileHKL(XSDataString(_xsDataMOSFLMOutputIntegration.getBestfileHKL().getValue()))
xsDataLengthRefinedDistance = _xsDataMOSFLMOutputIntegration.getRefinedDistance()
if (xsDataLengthRefinedDistance is not None):
xsDataDetector.setDistance(xsDataLengthRefinedDistance)
xsDataMOSFLMBeamPositionRefined = _xsDataMOSFLMOutputIntegration.getRefinedBeam()
if (xsDataMOSFLMBeamPositionRefined is not None):
xsDataDetector.setBeamPositionX(XSDataLength(xsDataMOSFLMBeamPositionRefined.getX().getValue()))
xsDataDetector.setBeamPositionY(XSDataLength(xsDataMOSFLMBeamPositionRefined.getY().getValue()))
xsDataExperimentalConditionRefined.setDetector(xsDataDetector)
xsDataIntegrationSubWedgeResult.setExperimentalConditionRefined(xsDataExperimentalConditionRefined)
if (_xsDataMOSFLMOutputIntegration.getGeneratedMTZFile() is not None):
xsDataIntegrationSubWedgeResult.setGeneratedMTZFile(_xsDataMOSFLMOutputIntegration.getGeneratedMTZFile())
xsDataStatisticsIntegration = XSDataStatisticsIntegration()
if (_xsDataMOSFLMOutputIntegration.getOverallIOverSigma() is not None):
xsDataStatisticsIntegration.setIOverSigmaOverall(XSDataDouble(_xsDataMOSFLMOutputIntegration.getOverallIOverSigma().getValue()))
if (_xsDataMOSFLMOutputIntegration.getHighestResolutionIOverSigma() is not None):
xsDataStatisticsIntegration.setIOverSigmaAtHighestResolution(XSDataDouble(_xsDataMOSFLMOutputIntegration.getHighestResolutionIOverSigma().getValue()))
if (_xsDataMOSFLMOutputIntegration.getRMSSpotDeviation() is not None):
xsDataStatisticsIntegration.setRMSSpotDeviation(XSDataLength(_xsDataMOSFLMOutputIntegration.getRMSSpotDeviation().getValue()))
if (_xsDataMOSFLMOutputIntegration.getNumberOfBadReflections() is not None):
xsDataStatisticsIntegration.setNumberOfBadReflections(XSDataInteger(_xsDataMOSFLMOutputIntegration.getNumberOfBadReflections().getValue()))
if (_xsDataMOSFLMOutputIntegration.getNumberOfFullyRecordedReflections() is not None):
xsDataStatisticsIntegration.setNumberOfFullyRecordedReflections(XSDataInteger(_xsDataMOSFLMOutputIntegration.getNumberOfFullyRecordedReflections().getValue()))
if (_xsDataMOSFLMOutputIntegration.getNumberOfNegativeReflections() is not None):
xsDataStatisticsIntegration.setNumberOfNegativeReflections(XSDataInteger(_xsDataMOSFLMOutputIntegration.getNumberOfNegativeReflections().getValue()))
if (_xsDataMOSFLMOutputIntegration.getNumberOfOverlappedReflections() is not None):
xsDataStatisticsIntegration.setNumberOfOverlappedReflections(XSDataInteger(_xsDataMOSFLMOutputIntegration.getNumberOfOverlappedReflections().getValue()))
if (_xsDataMOSFLMOutputIntegration.getNumberOfPartialReflections() is not None):
xsDataStatisticsIntegration.setNumberOfPartialReflections(XSDataInteger(_xsDataMOSFLMOutputIntegration.getNumberOfPartialReflections().getValue()))
if (_xsDataMOSFLMOutputIntegration.getNumberOfReflectionsGenerated() is not None):
xsDataStatisticsIntegration.setNumberOfReflectionsGenerated(XSDataInteger(_xsDataMOSFLMOutputIntegration.getNumberOfReflectionsGenerated().getValue()))
xsDataIntegrationSubWedgeResult.setStatistics(xsDataStatisticsIntegration)
xsDataIntegrationSubWedgeResult.setExperimentalConditionRefined(xsDataExperimentalConditionRefined)
for xsDataMOSFLMIntegrationStatisticsPerResolutionBin in _xsDataMOSFLMOutputIntegration.getStatisticsPerResolutionBin():
xsDataStatisticsIntegrationPerResolutionBin = XSDataStatisticsIntegrationPerResolutionBin()
if (xsDataMOSFLMIntegrationStatisticsPerResolutionBin.getMaxResolution() is not None):
xsDataStatisticsIntegrationPerResolutionBin.setMaxResolution(XSDataDouble(xsDataMOSFLMIntegrationStatisticsPerResolutionBin.getMaxResolution().getValue()))
if (xsDataMOSFLMIntegrationStatisticsPerResolutionBin.getMinResolution() is not None):
xsDataStatisticsIntegrationPerResolutionBin.setMinResolution(XSDataDouble(xsDataMOSFLMIntegrationStatisticsPerResolutionBin.getMinResolution().getValue()))
xsDataStatisticsIntegrationPerResolutionBin.setProfileFitted(EDHandlerXSDataMOSFLMv10.generateXSDataIntegrationStatisticsPerReflectionType(xsDataMOSFLMIntegrationStatisticsPerResolutionBin.getProfileFitted()))
xsDataStatisticsIntegrationPerResolutionBin.setSummation(EDHandlerXSDataMOSFLMv10.generateXSDataIntegrationStatisticsPerReflectionType(xsDataMOSFLMIntegrationStatisticsPerResolutionBin.getSummation()))
xsDataIntegrationSubWedgeResult.addStatisticsPerResolutionBin(xsDataStatisticsIntegrationPerResolutionBin)
return xsDataIntegrationSubWedgeResult
示例4: generateXSDataIndexingResult
# 需要導入模塊: from XSDataMXv1 import XSDataExperimentalCondition [as 別名]
# 或者: from XSDataMXv1.XSDataExperimentalCondition import getDetector [as 別名]
def generateXSDataIndexingResult(_xsDataMOSFLMIndexingOutput, _xsDataExperimentalCondition=None):
"""
Translation from XSDataMOSFLMIndexingOutput to XSDataIndexingResult.
"""
EDVerbose.DEBUG("EDHandlerXSDataMOSFLMv10.generateXSDataIndexingOutput")
xsDataMOSFLMBeamPositionRefined = _xsDataMOSFLMIndexingOutput.getRefinedBeam()
xsDataMOSFLMBeamPositionShift = _xsDataMOSFLMIndexingOutput.getBeamShift()
dDeviationAngular = _xsDataMOSFLMIndexingOutput.getDeviationAngular().getValue()
dDeviationPositional = _xsDataMOSFLMIndexingOutput.getDeviationPositional().getValue()
dMosaicityEstimation = _xsDataMOSFLMIndexingOutput.getMosaicityEstimation().getValue()
dDistanceRefined = _xsDataMOSFLMIndexingOutput.getRefinedDistance().getValue()
iSelectedSolution = _xsDataMOSFLMIndexingOutput.getSelectedSolutionNumber().getValue()
iSpotsTotal = _xsDataMOSFLMIndexingOutput.getSpotsTotal().getValue()
iSpotsUsed = _xsDataMOSFLMIndexingOutput.getSpotsUsed().getValue()
xsDataCellRefined = _xsDataMOSFLMIndexingOutput.getRefinedNewmat().getRefinedCell()
xsDataMatrixA = _xsDataMOSFLMIndexingOutput.getRefinedNewmat().getAMatrix()
xsDataMatrixU = _xsDataMOSFLMIndexingOutput.getRefinedNewmat().getUMatrix()
strSelectedSpaceGroupName = _xsDataMOSFLMIndexingOutput.getSelectedSolutionSpaceGroup().getValue()
iSelectedSpaceGroupNumber = _xsDataMOSFLMIndexingOutput.getSelectedSolutionSpaceGroupNumber().getValue()
xsDataIndexingResult = XSDataIndexingResult()
xsDataIndexingSolutionSelected = None
for possibleSolutions in _xsDataMOSFLMIndexingOutput.getPossibleSolutions():
xsDataCrystal = XSDataCrystal()
xsDataSpaceGroup = XSDataSpaceGroup()
xsDataSpaceGroup.setName(XSDataString(possibleSolutions.getLattice().getValue()))
xsDataCrystal.setSpaceGroup(xsDataSpaceGroup)
xsDataCrystal.setCell(possibleSolutions.getCell())
xsDataIndexingSolution = XSDataIndexingSolution()
xsDataIndexingSolution.setCrystal(xsDataCrystal)
iIndex = possibleSolutions.getIndex().getValue()
xsDataIndexingSolution.setNumber(XSDataInteger(iIndex))
xsDataIndexingSolution.setPenalty(XSDataFloat(possibleSolutions.getPenalty().getValue()))
xsDataIndexingResult.addSolution(xsDataIndexingSolution)
if (iIndex == iSelectedSolution):
xsDataIndexingSolutionSelected = XSDataIndexingSolutionSelected()
xsDataIndexingSolutionSelected.setNumber(XSDataInteger(iIndex))
xsDataIndexingSolutionSelected.setPenalty(XSDataFloat(possibleSolutions.getPenalty().getValue()))
xsDataCrystalSelected = XSDataCrystal()
xsDataSpaceGroupSelected = XSDataSpaceGroup()
xsDataSpaceGroupSelected.setName(XSDataString(strSelectedSpaceGroupName))
xsDataSpaceGroupSelected.setITNumber(XSDataInteger(iSelectedSpaceGroupNumber))
xsDataCrystalSelected.setSpaceGroup(xsDataSpaceGroupSelected)
xsDataCrystalSelected.setCell(xsDataCellRefined)
xsDataCrystalSelected.setMosaicity(XSDataDouble(dMosaicityEstimation))
xsDataIndexingSolutionSelected.setCrystal(xsDataCrystalSelected)
xsDataOrientation = XSDataOrientation()
xsDataOrientation.setMatrixA(xsDataMatrixA)
xsDataOrientation.setMatrixU(xsDataMatrixU)
xsDataIndexingSolutionSelected.setOrientation(xsDataOrientation)
xsDataStatisticsIndexing = XSDataStatisticsIndexing()
xsDataStatisticsIndexing.setBeamPositionShiftX(XSDataLength(xsDataMOSFLMBeamPositionShift.getX().getValue()))
xsDataStatisticsIndexing.setBeamPositionShiftY(XSDataLength(xsDataMOSFLMBeamPositionShift.getY().getValue()))
xsDataStatisticsIndexing.setSpotDeviationAngular(XSDataAngle(dDeviationAngular))
xsDataStatisticsIndexing.setSpotDeviationPositional(XSDataLength(dDeviationPositional))
xsDataStatisticsIndexing.setSpotsUsed(XSDataInteger(iSpotsUsed))
xsDataStatisticsIndexing.setSpotsTotal(XSDataInteger(iSpotsTotal))
xsDataIndexingSolutionSelected.setStatistics(xsDataStatisticsIndexing)
xsDataExperimentalConditionRefined = None
if (_xsDataExperimentalCondition is None):
xsDataExperimentalConditionRefined = XSDataExperimentalCondition()
else:
# Copy the incoming experimental condition
xmlExperimentalCondition = _xsDataExperimentalCondition.marshal()
xsDataExperimentalConditionRefined = XSDataExperimentalCondition.parseString(xmlExperimentalCondition)
xsDataDetector = xsDataExperimentalConditionRefined.getDetector()
if (xsDataDetector is None):
xsDataDetector = XSDataDetector()
xsDataDetector.setBeamPositionX(XSDataLength(xsDataMOSFLMBeamPositionRefined.getX().getValue()))
xsDataDetector.setBeamPositionY(XSDataLength(xsDataMOSFLMBeamPositionRefined.getY().getValue()))
xsDataDetector.setDistance(XSDataLength(dDistanceRefined))
xsDataExperimentalConditionRefined.setDetector(xsDataDetector)
xsDataIndexingSolutionSelected.setExperimentalConditionRefined(xsDataExperimentalConditionRefined)
xsDataIndexingResult.setSelectedSolution(xsDataIndexingSolutionSelected)
return xsDataIndexingResult