Пример #1
0
    else:
        ffx = FullFieldXas()
        if os.path.isfile(".XSDataInputFullFieldXAS.xml"):
            ffx.load(".XSDataInputFullFieldXAS.xml")

        ffx.dontAlign = dontAlign
        if dontAlign:
            print ("*" * 80)
            print ("*" + "Skipping image alignement part".center(78) + "*")
            print ("*" * 80)
        ffx.setup(_listInput=paths, _mode=mode)
    if not isinstance(ffx.reference, int):
        ffx.uploadReferenceFrame(ffx.reference)
    ffx.save(".XSDataInputFullFieldXAS.xml")
    ffx.dump("analysis-%s.json" % time.strftime("%Y%m%d-%Hh%Mm%Ss"))
    edna = EDParallelExecute(
        ffx.pluginName, ffx.makeXML, _functXMLerr=ffx.error, _bVerbose=True, _bDebug=debug, _iNbThreads=iNbCPU
    )
    edna.runEDNA(ffx.listInput, ffx.strMode, ffx.bNewerOnly)
    EDVerbose.WARNING("Back to main !")
    EDJob.synchronizeAll()
    ffx.updateAttrRefImage()
    EDPluginControlAlignStackv1_0.showData()
    if keepShare:
        EDShare.close()
    elif (ffx.getNrErrors() == 0) and (not EDVerbose.isVerboseDebug()):
        EDVerbose.WARNING("All processing finished successfully: Remove EDShare's big HDF5 file")
        EDShare.close(remove=True)
    else:
        EDShare.close()
Пример #2
0
            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 with image alignment, \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)
    EDVerbose.screen("Back in main")
    EDPluginControlAlignStackv1_0.showData()
#    EDPluginHDF5StackImagesv10.closeAll()