def generateXSDataInputISPyBStoreScreening(_xsDataInputControlISPyB,
                                               _strStatusMessage=None,
                                               _strShortComments=None,
                                               _strComments=None):

        xsDataInputISPyBStoreScreening = XSDataInputISPyBStoreScreening()

        xsDataResultCharacterisation = _xsDataInputControlISPyB.getCharacterisationResult(
        )
        xsDataIntegerDataCollectionGroupId = _xsDataInputControlISPyB.getDataCollectionGroupId(
        )

        # ISPyB image
        xsDataISPyBImage = EDHandlerXSDataISPyBv1_4.generateXSDataISPyBImage(
            xsDataResultCharacterisation)

        # Diffraction plan
        xsDataISPyBDiffractionPlan = EDHandlerXSDataISPyBv1_4.generateXSDataISPyBDiffractionPlan(
            xsDataResultCharacterisation)

        # Screening
        # Temporary fix for mxsup717, while waiting for a change of the ISPyB web service
        strComments = _strComments
        #        if xsDataResultCharacterisation.getIndexingResult() is not None:
        #            if xsDataResultCharacterisation.getIndexingResult().getLabelitIndexing():
        #                if strComments is None:
        #                    strComments = ""
        #                else:
        #                    strComments += " "
        #                if xsDataResultCharacterisation.getIndexingResult().getLabelitIndexing().getValue():
        #                    strComments += "Labelit indexing"
        #                else:
        #                    strComments += "MOSFLM indexing"
        xsDataISPyBScreening = EDHandlerXSDataISPyBv1_4.generateXSDataISPyBScreening(
            _strShortComments, strComments)

        # ScreeningOutputContainer
        fKappa = None
        if _xsDataInputControlISPyB.kappa is not None:
            fKappa = _xsDataInputControlISPyB.kappa.value
        fPhi = None
        if _xsDataInputControlISPyB.phi is not None:
            fPhi = _xsDataInputControlISPyB.phi.value
        xsDataISPyBScreeningOutputContainer = EDHandlerXSDataISPyBv1_4.generateXSDataISPyBScreeningOutputContainer(xsDataResultCharacterisation, \
                                                                                                                   _strStatusMessage, fKappa, fPhi)

        # Assemble the input
        xsDataISPyBScreening.dataCollectionGroupId = xsDataIntegerDataCollectionGroupId
        xsDataInputISPyBStoreScreening.image = xsDataISPyBImage
        xsDataInputISPyBStoreScreening.diffractionPlan = xsDataISPyBDiffractionPlan
        xsDataInputISPyBStoreScreening.screening = xsDataISPyBScreening
        xsDataInputISPyBStoreScreening.addScreeningOutputContainer(
            xsDataISPyBScreeningOutputContainer)

        return xsDataInputISPyBStoreScreening
    def generateXSDataInputISPyBStoreScreening(_xsDataInputControlISPyB, _strStatusMessage=None, _strShortComments=None, _strComments=None):

        xsDataInputISPyBStoreScreening = XSDataInputISPyBStoreScreening()

        xsDataResultCharacterisation = _xsDataInputControlISPyB.getCharacterisationResult()
        xsDataIntegerDataCollectionId = _xsDataInputControlISPyB.getDataCollectionId()

        # Diffraction plan
        xsDataISPyBDiffractionPlan = EDHandlerXSDataISPyBv1_4.generateXSDataISPyBDiffractionPlan(xsDataResultCharacterisation)

        # Screening
        # Temporary fix for mxsup717, while waiting for a change of the ISPyB web service
        strComments = _strComments
#        if xsDataResultCharacterisation.getIndexingResult() is not None:
#            if xsDataResultCharacterisation.getIndexingResult().getLabelitIndexing():
#                if strComments is None:
#                    strComments = ""
#                else:
#                    strComments += " "
#                if xsDataResultCharacterisation.getIndexingResult().getLabelitIndexing().getValue():
#                    strComments += "Labelit indexing"
#                else:
#                    strComments += "MOSFLM indexing"
        xsDataISPyBScreening = EDHandlerXSDataISPyBv1_4.generateXSDataISPyBScreening(_strShortComments, strComments)

        # ScreeningOutputContainer
        xsDataISPyBScreeningOutputContainer = EDHandlerXSDataISPyBv1_4.generateXSDataISPyBScreeningOutputContainer(xsDataResultCharacterisation, \
                                                                                                                   _strStatusMessage)

        # Legacy strategy - everything stored in a list of XSDataISPyBStrategy entries
        EDHandlerXSDataISPyBv1_4.generateLegacyXSDataISPyBStrategy(xsDataResultCharacterisation, xsDataISPyBScreeningOutputContainer)

        # Assemble the input
        xsDataISPyBScreening.dataCollectionId = xsDataIntegerDataCollectionId
        xsDataInputISPyBStoreScreening.diffractionPlan = xsDataISPyBDiffractionPlan
        xsDataInputISPyBStoreScreening.screening = xsDataISPyBScreening
        xsDataInputISPyBStoreScreening.addScreeningOutputContainer(xsDataISPyBScreeningOutputContainer)

        return xsDataInputISPyBStoreScreening
示例#3
0
    def generateXSDataInputISPyBStoreScreening(_xsDataInputControlISPyB,
                                               _strStatusMessage=None,
                                               _strShortComments=None,
                                               _strComments=None):

        xsDataInputISPyBStoreScreening = XSDataInputISPyBStoreScreening()

        xsDataResultCharacterisation = _xsDataInputControlISPyB.getCharacterisationResult(
        )
        xsDataIntegerDataCollectionId = _xsDataInputControlISPyB.getDataCollectionId(
        )

        # ISPyB image
        xsDataISPyBImage = EDHandlerXSDataISPyBv1_4.generateXSDataISPyBImage(
            xsDataResultCharacterisation)

        # Diffraction plan
        xsDataISPyBDiffractionPlan = EDHandlerXSDataISPyBv1_4.generateXSDataISPyBDiffractionPlan(
            xsDataResultCharacterisation)

        # Screening
        # Temporary fix for mxsup717, while waiting for a change of the ISPyB web service
        strComments = _strComments
        #        if xsDataResultCharacterisation.getIndexingResult() is not None:
        #            if xsDataResultCharacterisation.getIndexingResult().getLabelitIndexing():
        #                if strComments is None:
        #                    strComments = ""
        #                else:
        #                    strComments += " "
        #                if xsDataResultCharacterisation.getIndexingResult().getLabelitIndexing().getValue():
        #                    strComments += "Labelit indexing"
        #                else:
        #                    strComments += "MOSFLM indexing"
        xsDataISPyBScreening = EDHandlerXSDataISPyBv1_4.generateXSDataISPyBScreening(
            _strShortComments, strComments)

        # ScreeningOutputContainer
        xsDataISPyBScreeningOutputContainer = EDHandlerXSDataISPyBv1_4.generateXSDataISPyBScreeningOutputContainer(xsDataResultCharacterisation, \
                                                                                                                   _strStatusMessage)

        # Legacy strategy - everything stored in a list of XSDataISPyBStrategy entries
        EDHandlerXSDataISPyBv1_4.generateLegacyXSDataISPyBStrategy(
            xsDataResultCharacterisation, xsDataISPyBScreeningOutputContainer)

        # Assemble the input
        xsDataISPyBScreening.dataCollectionId = xsDataIntegerDataCollectionId
        xsDataInputISPyBStoreScreening.image = xsDataISPyBImage
        xsDataInputISPyBStoreScreening.diffractionPlan = xsDataISPyBDiffractionPlan
        xsDataInputISPyBStoreScreening.screening = xsDataISPyBScreening
        xsDataInputISPyBStoreScreening.addScreeningOutputContainer(
            xsDataISPyBScreeningOutputContainer)

        return xsDataInputISPyBStoreScreening
    def generateXSDataInputISPyBStoreScreening(_xsDataInputControlISPyB, _strStatusMessage=None, _strShortComments=None, _strComments=None):

        xsDataInputISPyBStoreScreening = XSDataInputISPyBStoreScreening()

        xsDataResultCharacterisation = _xsDataInputControlISPyB.getCharacterisationResult()
        xsDataIntegerDataCollectionId = _xsDataInputControlISPyB.getDataCollectionId()

        # ISPyB image
        xsDataISPyBImage = EDHandlerXSDataISPyBv1_4.generateXSDataISPyBImage(xsDataResultCharacterisation)

        # Diffraction plan
        xsDataISPyBDiffractionPlan = EDHandlerXSDataISPyBv1_4.generateXSDataISPyBDiffractionPlan(xsDataResultCharacterisation)

        # Screening
        # Temporary fix for mxsup717, while waiting for a change of the ISPyB web service
        strComments = _strComments
#        if xsDataResultCharacterisation.getIndexingResult() is not None:
#            if xsDataResultCharacterisation.getIndexingResult().getLabelitIndexing():
#                if strComments is None:
#                    strComments = ""
#                else:
#                    strComments += " "
#                if xsDataResultCharacterisation.getIndexingResult().getLabelitIndexing().getValue():
#                    strComments += "Labelit indexing"
#                else:
#                    strComments += "MOSFLM indexing"
        xsDataISPyBScreening = EDHandlerXSDataISPyBv1_4.generateXSDataISPyBScreening(_strShortComments, strComments)

        # ScreeningOutputContainer
        fKappa = None
        if _xsDataInputControlISPyB.kappa is not None:
            fKappa = _xsDataInputControlISPyB.kappa.value
        fPhi = None
        if _xsDataInputControlISPyB.phi is not None:
            fPhi = _xsDataInputControlISPyB.phi.value
        xsDataISPyBScreeningOutputContainer = EDHandlerXSDataISPyBv1_4.generateXSDataISPyBScreeningOutputContainer(xsDataResultCharacterisation, \
                                                                                                                   _strStatusMessage, fKappa, fPhi)

        # Assemble the input
        xsDataISPyBScreening.dataCollectionId = xsDataIntegerDataCollectionId
        xsDataInputISPyBStoreScreening.image = xsDataISPyBImage
        xsDataInputISPyBStoreScreening.diffractionPlan = xsDataISPyBDiffractionPlan
        xsDataInputISPyBStoreScreening.screening = xsDataISPyBScreening
        xsDataInputISPyBStoreScreening.addScreeningOutputContainer(xsDataISPyBScreeningOutputContainer)

        return xsDataInputISPyBStoreScreening