def process(self, _edObject=None): EDPluginControl.process(self) self.DEBUG("EDPluginControlH5ToCBFv1_0.process") imageNumber = self.dataInput.imageNumber.value if self.dataInput.hdf5ImageNumber is None: hdf5ImageNumber = imageNumber else: hdf5ImageNumber = self.dataInput.hdf5ImageNumber.value if self.dataInput.ispybDataCollection is None: xsDataInputRetrieveDataCollection = XSDataInputRetrieveDataCollection( ) xsDataImage = XSDataImage(self.dataInput.hdf5File.path) xsDataInputRetrieveDataCollection.image = xsDataImage self.edPluginISPyBRetrieveDataCollection.dataInput = xsDataInputRetrieveDataCollection self.edPluginISPyBRetrieveDataCollection.executeSynchronous() xsDataResultRetrieveDataCollection = self.edPluginISPyBRetrieveDataCollection.dataOutput dataCollection = xsDataResultRetrieveDataCollection.dataCollection else: dataCollection = self.dataInput.ispybDataCollection if dataCollection is not None: if dataCollection.overlap is None: overlap = 0.0 else: overlap = dataCollection.overlap axisStart = dataCollection.axisStart oscillationRange = dataCollection.axisRange axisStartNew = axisStart - (overlap + oscillationRange) * (imageNumber - 1) dataCollection.axisStart = axisStartNew xsDataISPyBDataCollection = XSDataISPyBDataCollection.parseString( dataCollection.marshal()) else: xsDataISPyBDataCollection = None xsDataInputH5ToCBF = XSDataInputH5ToCBF() xsDataInputH5ToCBF.hdf5File = self.dataInput.hdf5File xsDataInputH5ToCBF.imageNumber = self.dataInput.imageNumber xsDataInputH5ToCBF.hdf5ImageNumber = XSDataInteger(hdf5ImageNumber) xsDataInputH5ToCBF.dataCollection = xsDataISPyBDataCollection xsDataInputH5ToCBF.forcedOutputDirectory = self.dataInput.forcedOutputDirectory self.edPluginEDPluginH5ToCBF.dataInput = xsDataInputH5ToCBF self.edPluginEDPluginH5ToCBF.executeSynchronous() if self.edPluginEDPluginH5ToCBF.dataOutput is not None: self.dataOutput.outputCBFFile = self.edPluginEDPluginH5ToCBF.dataOutput.outputCBFFile if dataCollection is not None: self.dataOutput.ispybDataCollection = XSDataISPyBDataCollection.parseString( dataCollection.marshal())
def testGenerateMiniCBFHeader(self): edPluginH5ToCBF = self.createPlugin() xsDataInputH5ToCBF = XSDataInputH5ToCBF.parseFile(self.strReferenceInputFile) miniCBFHeader = edPluginH5ToCBF.generateMiniCBFHeader(xsDataInputH5ToCBF) print miniCBFHeader
def testGenerateCommands(self): edPluginH5ToCBF = self.createPlugin() xsDataInputH5ToCBF = XSDataInputH5ToCBF.parseFile(self.strReferenceInputFile) strCommandLine = edPluginH5ToCBF.generateCommands(xsDataInputH5ToCBF) print(strCommandLine)