import numpy as np
#http://jaspar.genereg.net/matrix/MA0833.1/
ATF4 = np.array([[210,169,639,0,19,888,2,1,40,897,888,0,414,1],
[71,117,202,0,0,0,372,0,838,21,3,266,272,1],
[442,409,127,7,1090,0,9,1104,16,0,1,62,101,1],
[170,213,3,981,11,25,470,4,113,3,4,714,78,1]],  dtype="float32")


ATF4 = (ATF4 / np.sum(ATF4, axis=0)).T

#http://jaspar.genereg.net/matrix/MA0162.2/
EGR1 = np.array([[1098, 1506,1160,1335,233,2911,0,0,0,3652,0,2368,0,3026],
 [5728,6847,6049,10431,11574,0,12256,11852,10154,8361,11952,0,9849,5595],
 [3083,1359,2250,0,0,6840,0,0,611,0,0,6599,1420,1913],
 [2347,2544,2797,490,449,2505,0,404,1491,243,304,3289,987,1722]], dtype="float32")

EGR1 = (EGR1 / np.sum(EGR1, axis=0)).T

filters = np.stack([ATF4, EGR1, EGR1[::-1,::-1], ATF4[::-1,::-1]], axis=2)






if __name__ == "__main__":
    print ("Ideal filter matrix shape")
    print (filters.shape)
