Пример #1
0
def parseTomoFolderAndCreateRefFiles(folderpath):
    scanName = os.path.basename(folderpath)
    parametersScanFilename = folderpath + '/' + scanName + '.xml'
    print(parametersScanFilename)
    tomoExperiment = esrfTomo.FastTomoExperiment(parametersScanFilename)
    print('numberFlatField: ')
    print(tomoExperiment.numberFlatField)
    referenceFileNames = tomoExperiment.getReferencesFileNames()

    if referenceFileNames == None:
        tomoExperiment.createAverageWfandDf()
        tomoExperiment.findCenterOfRotation()
        print('Cor Found at ' + str(tomoExperiment.cor))
        referenceFileNames = tomoExperiment.getReferencesFileNames()

    projectionsFileNames = tomoExperiment.getProjectionsName()
    projectionsFileNames.sort()
    darkFieldFilename = tomoExperiment.getDarkFilename()
    print(darkFieldFilename)
    referenceFileNames.sort()
    print(referenceFileNames)
    ddict = {}
    ddict['tomoFileName'] = parametersScanFilename
    ddict['projections'] = projectionsFileNames
    ddict['references'] = referenceFileNames
    ddict['darkField'] = darkFieldFilename
    ddict['COR'] = tomoExperiment.cor
    return ddict
Пример #2
0
def parseESRFTomoFolder(folderpath):
    print('ESRFTomoFolder')
    scanName = os.path.basename(folderpath)
    parametersScanFilename = folderpath + '/' + scanName + '.xml'
    print(parametersScanFilename)
    tomoExperiment = esrfTomo.FastTomoExperiment(parametersScanFilename)
    print('numberFlatField: ')
    print(tomoExperiment.numberFlatField)
    tomoExperiment.createAverageWfandDf()
    tomoExperiment.findCenterOfRotation()
    print('Cor Found at ' + str(tomoExperiment.cor))
    projectionsFileNames = tomoExperiment.getProjectionsName()
    projectionsFileNames.sort()
    darkFieldFilename = tomoExperiment.darkOutputFile
    referenceFileNames = tomoExperiment.getReferencesFileNames()
    referenceFileNames.sort()
    print(referenceFileNames)
    return projectionsFileNames, referenceFileNames, darkFieldFilename