def postProcess(self, _edObject=None):
     EDPluginExec.postProcess(self)
     self.DEBUG("EDPluginExecStitchOffsetedImagev1_0.postProcess")
     # Create some output data
     xsDataResult = XSDataResultStitchOffsetedImage()
     if self._strOutFile is not None:
         edf = edfimage(data=self._ndaResult, header={"Dummy":str(self._fDummy), "Blending":self._strBlending, "Autoscale":str(self._bAutoscale)})
         edf.write(self._strOutFile)
         xsDataResult.setOutputImage(XSDataImageExt(path=XSDataString(self._strOutFile)))
     else:
         xsDataResult.setOutputArray(EDUtilsArray.arrayToXSData(self._ndaResult))
     self.setDataOutput(xsDataResult)
    def testExecute(self):
        """
        """
        self.run()
        xsdout = self.getPlugin().getDataOutput().marshal()
        print self.getReferenceDataOutputFile()
        xsdRef = XSDataResultStitchOffsetedImage.parseString(self.readAndParseFile(self.getReferenceDataOutputFile())).marshal()
        EDAssert.strAlmostEqual(xsdRef, xsdout, "Xsd are the same")
#        fabio.edfimage.edfimage(data=fabio.open(self.outFile).data - fabio.open(self.refFile).data).write("/tmp/delta.edf")
        EDAssert.arraySimilar(fabio.open(self.outFile).data, fabio.open(self.refFile).data, "Arrays are the same", _fAbsMaxDelta=1)
 def testExecute(self):
     """
     """
     self.run()
     xsdout = self.getPlugin().getDataOutput().marshal()
     print self.getReferenceDataOutputFile()
     xsdRef = XSDataResultStitchOffsetedImage.parseString(
         self.readAndParseFile(
             self.getReferenceDataOutputFile())).marshal()
     EDAssert.strAlmostEqual(xsdRef, xsdout, "Xsd are the same")
     #        fabio.edfimage.edfimage(data=fabio.open(self.outFile).data - fabio.open(self.refFile).data).write("/tmp/delta.edf")
     EDAssert.arraySimilar(fabio.open(self.outFile).data,
                           fabio.open(self.refFile).data,
                           "Arrays are the same",
                           _fAbsMaxDelta=1)
コード例 #4
0
 def postProcess(self, _edObject=None):
     EDPluginExec.postProcess(self)
     self.DEBUG("EDPluginExecStitchOffsetedImagev1_0.postProcess")
     # Create some output data
     xsDataResult = XSDataResultStitchOffsetedImage()
     if self._strOutFile is not None:
         edf = edfimage(data=self._ndaResult,
                        header={
                            "Dummy": str(self._fDummy),
                            "Blending": self._strBlending,
                            "Autoscale": str(self._bAutoscale)
                        })
         edf.write(self._strOutFile)
         xsDataResult.setOutputImage(
             XSDataImageExt(path=XSDataString(self._strOutFile)))
     else:
         xsDataResult.setOutputArray(
             EDUtilsArray.arrayToXSData(self._ndaResult))
     self.setDataOutput(xsDataResult)