Mercurial > hg > pycsalgos
view scripts/utils.py @ 32:e1da5140c9a5
Count and display finished jobs in run_once_tuple()
Disabled "dictionary not normalized" message in OMP
Fixed bug that displayed same values for all algorithms
Made TST default iterations nsweep = 300
author | nikcleju |
---|---|
date | Fri, 11 Nov 2011 15:35:55 +0000 |
parents | 1a88766113a9 |
children | e8c4672e9de4 |
line wrap: on
line source
# -*- coding: utf-8 -*- """ Created on Wed Nov 09 12:28:55 2011 @author: ncleju """ import scipy.io import matplotlib.pyplot as plt import matplotlib.cm as cm def loadshowmatrices(filename, algostr = ('GAP','SL0_approx')): mdict = scipy.io.loadmat(filename) for strname in algostr: print strname if mdict['meanmatrix'][strname][0,0].ndim == 2: plt.figure() plt.imshow(mdict['meanmatrix'][strname][0,0], cmap=cm.gray, interpolation='nearest',origin='lower') elif mdict['meanmatrix'][strname][0,0].ndim == 3: for matrix in mdict['meanmatrix'][strname][0,0]: plt.figure() plt.imshow(matrix, cmap=cm.gray, interpolation='nearest',origin='lower') plt.show() print "Finished."