def updateAttrRefImage(self, data=None): h5grp = EDPluginHDF5StackImagesv10.createStructure(ffx.HDF5, str(self.internalHdf5)) with EDPluginHDF5StackImagesv10.getFileLock(ffx.HDF5): if (self.REFERENCE_FRAME_NAME not in h5grp) and (data is not None): h5grp[self.REFERENCE_FRAME_NAME] = data if self.REFERENCE_FRAME_NAME in h5grp: referenceDS = h5grp[self.REFERENCE_FRAME_NAME] if isinstance(self.reference, int): referenceDS.attrs["origin"] = self.reference else: referenceDS.attrs["origin"] = str(self.reference) else: EDVerbose.WARNING("Reference frame is not in %s:%s attr not updated" % (self.HDF5, self.internalHdf5))
def updateAttrRefImage(self, data=None): h5grp = EDPluginHDF5StackImagesv10.createStructure(ffx.HDF5, str(self.internalHdf5)) with EDPluginHDF5StackImagesv10.getFileLock(ffx.HDF5): if (self.REFERENCE_FRAME_NAME not in h5grp) and (data is not None): h5grp[self.REFERENCE_FRAME_NAME] = data if self.REFERENCE_FRAME_NAME in h5grp: referenceDS = h5grp[self.REFERENCE_FRAME_NAME ] if isinstance(self.reference, int): referenceDS.attrs["origin"] = self.reference else: referenceDS.attrs["origin"] = str(self.reference) else: EDVerbose.WARNING("Reference frame is not in %s:%s attr not updated" % (self.HDF5, self.internalHdf5))
newerOnly = True debug = False for i in sys.argv[1:]: if i.lower().find("-online") in [0, 1]: mode = "dirwatch" elif i.lower().find("-all") in [0, 1]: newerOnly = False elif i.lower().find("-debug") in [0, 1]: debug = True if os.path.exists(i): paths.append(os.path.abspath(i)) if len(paths) == 0: if mode == "OffLine": print "This is the HDF5 3D image stacker application of EDNA, \nplease give a path to process offline or the option:\n\ --online to process online incoming data in the given directory.\n\ --all to process all existing files (unless they will be excluded)\n\ --debug to turn on debugging mod in EDNA" sys.exit() else: paths = [os.getcwd()] edna = EDParallelExecute(EDNAPluginName, fileName2xml, _functXMLerr=XMLerr, _bVerbose=True, _bDebug=debug) edna.runEDNA(paths, mode, newerOnly) print "Back in main" EDPluginHDF5StackImagesv10.closeAll()
newerOnly = True debug = False iNbCPU = None for i in sys.argv[1:]: if i.lower().find("-online") in [0, 1]: mode = "dirwatch" elif i.lower().find("-all") in [0, 1]: newerOnly = False elif i.lower().find("-debug") in [0, 1]: debug = True elif i.lower().find("-ncpu") in [0, 1]: iNbCPU = int(i.split("=", 1)[1]) elif os.path.exists(i): paths.append(os.path.abspath(i)) if len(paths) == 0: if mode == "OffLine": print "This is the HDF5 3D image stacker application of EDNA, \nplease give a path to process offline or the option:\n\ --online to process online incoming data in the given directory.\n\ --all to process all existing files (unless they will be excluded)\n\ --debug to turn on debugging mod in EDNA" sys.exit() else: paths = [os.getcwd()] edna = EDParallelExecute(EDNAPluginName, fileName2xml, _functXMLerr=XMLerr, _bVerbose=True, _bDebug=debug, _iNbThreads=iNbCPU) edna.runEDNA(paths, mode , newerOnly) print "Back in main" EDPluginHDF5StackImagesv10.closeAll()