예제 #1
0
def getMappingDict(imgList,varList, MODEL , const):
    mappingDict = {}

    for index in range(len(imgList)):
        i, j, imgBrightNess, type = imgList[index]
        _, _, srcX, srcY = deflection.getDeflection(i+0.5, j+0.5, MODEL, const=const)
        mappingDict[(i,j)]= (srcX, srcY, imgBrightNess, type, varList[index][2])
    #commons.plotMappingDict(mappingDict, const)

    return mappingDict
예제 #2
0
def testWholeGridMapping(const):
    imgXm, imgYm = commons.getGrid(-50, 50, 2, -50,  50,2, 0.05)
    deflXm = []
    deflYm = []

    for i in range(srcDimX):
        deflx, defly, _, _ = deflection.getDeflection(imgXm[i], imgYm[i],'SIE',const)
        deflXm.append(deflx)
        deflYm.append(defly)
    new_deflXm = np.asarray(deflXm)
    new_deflYm = np.asarray(deflYm)
    srcXm = imgXm - new_deflXm
    srcYm = imgYm - new_deflYm

    commons.plotGrid(srcXm, srcYm)