print 'Readig spectrum...' EigValForwardFile = '%s/eigval/eigValForward_nev%d%s.txt' % (cfg.general.specDir, nev, postfix) EigVecForwardFile = '%s/eigvec/eigVecForward_nev%d%s.txt' % (cfg.general.specDir, nev, postfix) EigValBackwardFile = '%s/eigval/eigValBackward_nev%d%s.txt' \ % (cfg.general.specDir, nev, postfix) EigVecBackwardFile = '%s/eigvec/eigVecBackward_nev%d%s.txt' \ % (cfg.general.specDir, nev, postfix) statDist = np.loadtxt('%s/transitionMatrix/initDist%s.txt' % (cfg.general.resDir, postfix)) (eigValForward, eigVecForward, eigValBackward, eigVecBackward) \ = ergoPlot.readSpectrum(nev, EigValForwardFile, EigVecForwardFile, EigValBackwardFile, EigVecBackwardFile, statDist, makeBiorthonormal=False) print 'Getting conditionning of eigenvectors...' eigenCondition = ergoPlot.getEigenCondition(eigVecForward, eigVecBackward, statDist) # Get generator eigenvalues eigValGen = (np.log(np.abs(eigValForward)) + np.angle(eigValForward)*1j) / tauConv # Plot eigenvectors alpha = 0.01 for ev in np.arange(nevPlot): print 'Plotting real part of eigenvector %d...' % (ev+1,) ergoPlot.plot2D(X, Y, eigVecForward[:, ev].real, ev_xlabel, ev_ylabel, alpha) plt.savefig('%s/spectrum/eigvec/eigVecForwardReal_nev%d_ev%03d%s.%s' \ % (cfg.general.plotDir, nev, ev+1, postfix, ergoPlot.figFormat), bbox_inches='tight', dpi=ergoPlot.dpi) if plotImag & (eigValForward[ev].imag != 0): print 'Plotting imaginary part of eigenvector %d...' % (ev+1,)
print 'Readig spectrum...' EigValForwardFile = '%s/eigval/eigValForward_nev%d%s.txt' % (cfg.general.specDir, nev, postfix) EigVecForwardFile = '%s/eigvec/eigVecForward_nev%d%s.txt' % (cfg.general.specDir, nev, postfix) EigValBackwardFile = '%s/eigval/eigValBackward_nev%d%s.txt' \ % (cfg.general.specDir, nev, postfix) EigVecBackwardFile = '%s/eigvec/eigVecBackward_nev%d%s.txt' \ % (cfg.general.specDir, nev, postfix) statDist = np.loadtxt('%s/transfer/initDist/initDist%s.txt' % (cfg.general.resDir, gridPostfix)) (eigValForward, eigVecForward, eigValBackward, eigVecBackward) \ = ergoPlot.readSpectrum(EigValForwardFile, EigVecForwardFile, EigValBackwardFile, EigVecBackwardFile, statDist, makeBiorthonormal=False) print 'Getting conditionning of eigenvectors...' eigenCondition = ergoPlot.getEigenCondition(eigVecForward, eigVecBackward, statDist) # Get generator eigenvalues eigValGen = (np.log(np.abs(eigValForward)) + np.angle(eigValForward)*1j) / tauConv # Plot eigenvectors alpha = 0.01 for ev in np.arange(nevPlot): print 'Plotting real part of eigenvector %d...' % (ev+1,) ergoPlot.plot2D(X, Y, eigVecForward[:, ev].real, ev_xlabel, ev_ylabel, alpha) plt.savefig('%s/spectrum/eigvec/eigVecForwardReal_nev%d_ev%03d%s.%s' \ % (cfg.general.plotDir, nev, ev+1, postfix, ergoPlot.figFormat), bbox_inches='tight', dpi=ergoPlot.dpi) if plotImag & (eigValForward[ev].imag != 0): print 'Plotting imaginary part of eigenvector %d...' % (ev+1,)