Example #1
0
 def testCheckParameters(self):
     xsDataInput = XSDataInputBioSaxsHPLCv1_0()
     xsDataInput.rawImage = XSDataImage()
     xsDataInput.sample = XSDataBioSaxsSample()
     xsDataInput.experimentSetup = XSDataBioSaxsExperimentSetup()
     xsDataInput.logFile = XSDataFile()
     xsDataInput.normalizedImage = XSDataImage()
     xsDataInput.rawImageSize = XSDataInteger()
     edPluginExecBioSaxsNormalize = self.createPlugin()
     edPluginExecBioSaxsNormalize.setDataInput(xsDataInput)
     edPluginExecBioSaxsNormalize.checkParameters()
Example #2
0
 def testCheckParameters(self):
     xsDataInput = XSDataInputBioSaxsAzimutIntv1_0()
     xsDataInput.setNormalizedImage(XSDataImage())
     xsDataInput.setNormalizedImageSize(XSDataInteger())
     xsDataInput.setIntegratedImage(XSDataImage())
     xsDataInput.setIntegratedCurve(XSDataFile())
     xsDataInput.correctedImage = XSDataImage()
     xsDataInput.sample = XSDataBioSaxsSample()
     xsDataInput.experimentSetup = XSDataBioSaxsExperimentSetup()
     edPluginExec = self.createPlugin()
     edPluginExec.setDataInput(xsDataInput)
     edPluginExec.checkParameters()
Example #3
0
    def testCheckParameters(self):
        xsDataInput = XSDataInputBioSaxsReduceFileSeriev1_0()
        xsDataInput.fileSerie = XSDataFileSeries()
        xsDataInput.sample = XSDataBioSaxsSample()
        xsDataInput.experimentSetup = XSDataBioSaxsExperimentSetup()
        xsDataInput.directory1D = XSDataFile()
        xsDataInput.directory2D = XSDataFile()
        xsDataInput.directoryMisc = XSDataFile()
        edPluginExecBioSaxsReduceFileSerie = self.createPlugin()

        edPluginExecBioSaxsReduceFileSerie.setDataInput(xsDataInput)
        edPluginExecBioSaxsReduceFileSerie.checkParameters()
Example #4
0
    def __init__(self, code=None, comment=None, \
                 maskFile=None, normalization=None, imageSize=None, detector="pilatus", detectorDistance=None, pixelSize_1=None, pixelSize_2=None, beamCenter_1=None, beamCenter_2=None, wavelength=None,):
        EDLogging.__init__(self)
        self.comment = comment
        self.code = code
        self.maskFile = maskFile
        self.normalization = normalization

        self.detector = detector
        self.detectorDistance = detectorDistance
        if (detector == "pilatus") and (pixelSize_1 is None) and (pixelSize_2
                                                                  is None):
            self.pixelSize_1 = 1.72e-4
            self.pixelSize_2 = 1.72e-4
        else:
            self.pixelSize_1 = pixelSize_1
            self.pixelSize_2 = pixelSize_2
        if (detector == "pilatus") and (beamCenter_1 is None):
            self.imageSize = 4000000
        else:
            self.imageSize = imageSize
        self.beamCenter_1 = beamCenter_1
        self.beamCenter_2 = beamCenter_2
        self.wavelength = wavelength

        self.timeStamp = time.strftime("-%Y%m%d%H%M%S", time.localtime())
        self.dest1D = "1d" + self.timeStamp
        self.dest2D = "2d" + self.timeStamp
        self.destMisc = "misc" + self.timeStamp
        self.sample = XSDataBioSaxsSample()
        if code is not None:
            self.sample.code = XSDataString(code)
        if comment is not None:
            self.sample.comment = XSDataString(comment)
        self.experimentSetup = XSDataBioSaxsExperimentSetup()
        if self.detector:
            self.experimentSetup.detector = XSDataString(self.detector)
        if self.detectorDistance:
            self.experimentSetup.detectorDistance = XSDataLength(
                self.detectorDistance)
        if self.pixelSize_1:
            self.experimentSetup.pixelSize_1 = XSDataLength(self.pixelSize_1)
        if self.pixelSize_2:
            self.experimentSetup.pixelSize_2 = XSDataLength(self.pixelSize_2)
        if self.beamCenter_1:
            self.experimentSetup.beamCenter_1 = XSDataDouble(self.beamCenter_1)
        if self.beamCenter_2:
            self.experimentSetup.beamCenter_2 = XSDataDouble(self.beamCenter_2)
        if self.wavelength:
            self.experimentSetup.wavelength = XSDataWavelength(self.wavelength)
Example #5
0
    def testCheckParameters(self):
        xsDataInput = XSDataInputBioSaxsNormalizev1_0()
        xsDataInput.setRawImage(XSDataImage())
        #        xsDataInput.setLogFile(XSDataFile())
        xsDataInput.setNormalizedImage(XSDataImage())
        xsDataInput.setRawImageSize(XSDataInteger())
        xsDataInput.setExperimentSetup(XSDataBioSaxsExperimentSetup())
        xsDataInput.setSample(XSDataBioSaxsSample())
        #        xsDataInput.setBeamStopDiode(XSDataDouble())
        #        xsDataInput.setNormalizationFactor(XSDataDouble())
        #        xsDataInput.setMachineCurrent(XSDataDouble())
        #        xsDataInput.setMaskFile(XSDataImage())
        #        xsDataInput.setDetectorDistance(XSDataLength())
        #        xsDataInput.setWavelength(XSDataWavelength())
        #        xsDataInput.setPixelSize_1(XSDataLength())
        #        xsDataInput.setPixelSize_2(XSDataLength())
        #        xsDataInput.setBeamCenter_1(XSDataDouble())
        #        xsDataInput.setBeamCenter_2(XSDataDouble())

        edPluginExecBioSaxsNormalize = self.createPlugin()
        edPluginExecBioSaxsNormalize.setDataInput(xsDataInput)
        edPluginExecBioSaxsNormalize.checkParameters()
    def testCheckParameters(self):
        xsDataInput = XSDataInputBioSaxsProcessOneFilev1_0()
        xsDataInput.rawImage = XSDataImage()
        xsDataInput.sample = XSDataBioSaxsSample()
        xsDataInput.experimentSetup = XSDataBioSaxsExperimentSetup()
        xsDataInput.logFile = XSDataFile()
        xsDataInput.normalizedImage = XSDataImage()
        xsDataInput.rawImageSize = XSDataInteger()
        #        xsDataInput.beamStopDiode = XSDataDouble()
        #        xsDataInput.normalizationFactor = XSDataDouble()
        #        xsDataInput.machineCurrent = XSDataDouble()
        #        xsDataInput.maskFile = XSDataImage()
        #        xsDataInput.detectorDistance = XSDataLength()
        #        xsDataInput.wavelength = XSDataWavelength()
        #        xsDataInput.pixelSize_1 = XSDataLength()
        #        xsDataInput.pixelSize_2 = XSDataLength()
        #        xsDataInput.beamCenter_1 = XSDataDouble()
        #        xsDataInput.beamCenter_2 = XSDataDouble()

        edPluginExecBioSaxsNormalize = self.createPlugin()
        edPluginExecBioSaxsNormalize.setDataInput(xsDataInput)
        edPluginExecBioSaxsNormalize.checkParameters()
    def postProcess(self, _edObject=None):
        """
complex type XSDataBioSaxsExperimentSetup extends XSData{
    detector : XSDataString optional
    detectorDistance : XSDataLength optional
    pixelSize_1 : XSDataLength optional
    pixelSize_2 : XSDataLength optional
    beamCenter_1 : XSDataDouble optional
    beamCenter_2 : XSDataDouble optional
    beamStopDiode : XSDataDouble optional
    wavelength : XSDataWavelength optional
    machineCurrent : XSDataDouble optional
    maskFile : XSDataImage optional
    normalizationFactor : XSDataDouble optional
    storageTemperature: XSDataDouble optional
    exposureTemperature: XSDataDouble optional
    exposureTime: XSDataTime optional
    frameNumber: XSDataInteger optional
    frameMax: XSDataInteger optional
}

complex type XSDataBioSaxsSample extends XSData {
    concentration : XSDataDouble optional
    comments : XSDataString optional
    code : XSDataString optional
    temperature: XSDataDouble optional
"""

        EDPluginExec.postProcess(self)
        EDVerbose.DEBUG("EDPluginBioSaxsMetadatav1_1.postProcess")
        # Create some output data
        xsDataResult = XSDataResultBioSaxsMetadatav1_0()
        xsdSample = XSDataBioSaxsSample()
        xsdExperiment = XSDataBioSaxsExperimentSetup()
        if self.strOutputImage is not None:
            xsdImage = XSDataImage()
            xsdImage.setPath(XSDataString(self.strOutputImage))
            xsDataResult.setOutputImage(xsdImage)
        if self.detector is not None:
            xsdExperiment.detector = xsDataResult.detector = XSDataString(
                self.detector)
        if self.detectorDistance is not None:
            xsdExperiment.detectorDistance = xsDataResult.detectorDistance = XSDataLength(
                self.detectorDistance)
        if self.pixelSize_1 is not None:
            xsDataResult.pixelSize_1 = XSDataLength(self.pixelSize_1)
            xsdExperiment.pixelSize_1 = xsDataResult.pixelSize_1
        if self.pixelSize_2 is not None:
            xsDataResult.pixelSize_2 = XSDataLength(self.pixelSize_2)
            xsdExperiment.pixelSize_2 = xsDataResult.pixelSize_2
        if self.beamCenter_1 is not None:
            xsDataResult.beamCenter_1 = XSDataDouble(self.beamCenter_1)
            xsdExperiment.beamCenter_1 = xsDataResult.beamCenter_1
        if self.beamCenter_2 is not None:
            xsDataResult.beamCenter_2 = XSDataDouble(self.beamCenter_2)
            xsdExperiment.beamCenter_2 = xsDataResult.beamCenter_2
        if self.beamStopDiode is not None:
            xsdExperiment.beamStopDiode = xsDataResult.beamStopDiode = XSDataDouble(
                self.beamStopDiode)
        if self.wavelength is not None:
            xsdExperiment.wavelength = xsDataResult.wavelength = XSDataWavelength(
                self.wavelength)
        if self.maskFile is not None:
            xsdFile = XSDataImage()
            xsdFile.setPath(XSDataString(self.maskFile))
            xsdExperiment.maskFile = xsDataResult.maskFile = xsdFile
        if self.normalizationFactor is not None:
            xsdExperiment.normalizationFactor = xsDataResult.normalizationFactor = XSDataDouble(
                self.normalizationFactor)
        if self.machineCurrent is not None:
            xsdExperiment.machineCurrent = xsDataResult.machineCurrent = XSDataDouble(
                self.machineCurrent)
        if self.storageTemperature is not None:
            xsdExperiment.storageTemperature = xsDataResult.storageTemperature = XSDataDouble(
                self.storageTemperature)
        if self.exposureTemperature is not None:
            xsdExperiment.exposureTemperature = xsDataResult.exposureTemperature = XSDataDouble(
                self.exposureTemperature)
        if self.exposureTime is not None:
            xsdExperiment.exposureTime = xsDataResult.exposureTime = XSDataTime(
                self.exposureTime)
        if self.frameNumber is not None:
            xsdExperiment.frameNumber = xsDataResult.frameNumber = XSDataInteger(
                self.frameNumber)
        if self.frameMax is not None:
            xsdExperiment.frameMax = xsDataResult.frameMax = XSDataInteger(
                self.frameMax)
        if self.timeOfFrame is not None:
            xsdExperiment.timeOfFrame = xsDataResult.timeOfFrame = XSDataTime(
                self.timeOfFrame)
        if self.code is not None:
            xsdSample.code = xsDataResult.code = XSDataString(self.code)
        if self.comments is not None:
            xsdSample.comments = xsDataResult.comments = XSDataString(
                self.comments)
        if self.concentration is not None:
            xsdSample.concentration = xsDataResult.concentration = XSDataDouble(
                self.concentration)

        xsDataResult.sample = xsdSample
        xsDataResult.experimentSetup = xsdExperiment
        self.setDataOutput(xsDataResult)