Skip to content

PseudoPy computes and visualizes the pseudospectrum of a matrix

License

Notifications You must be signed in to change notification settings

andrenarchy/pseudopy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

author
André Gaul
Mar 5, 2014
418fda5 · Mar 5, 2014

History

37 Commits
Mar 5, 2014
Feb 1, 2014
Feb 3, 2014
Jan 31, 2014
Feb 1, 2014
Feb 3, 2014
Feb 1, 2014
Mar 5, 2014

Repository files navigation

PseudoPy Build Status

PseudoPy computes and visualizes the pseudospectrum of a matrix. It is a Python version of the original eigtool by Thomas G. Wright. The algorithms used in this package can be found in the book Spectra and pseudospectra by Nick Trefethen and Mark Embree.

Example

The pseudospectrum of the Grcar matrix looks like this:

Pseudospectrum of Grcar matrix

The above figure can be created with the following lines of code:

from pseudopy import NonnormalMeshgrid, demo
from matplotlib import pyplot
from scipy.linalg import eigvals

# get Grcar matrix
A = demo.grcar(32).todense()

# compute pseudospectrum
pseudo = NonnormalMeshgrid(A,
                           real_min=-1, real_max=3, real_n=400,
                           imag_min=-3.5, imag_max=3.5, imag_n=400)
# plot
pseudo.plot([10**k for k in range(-4, 0)], spectrum=eigvals(A))
pyplot.show()

Installation

pip install pseudopy

Note that you may need to add sudo if you want to install it system-wide.

License

PseudoPy is free software licensed under the MIT License.

About

PseudoPy computes and visualizes the pseudospectrum of a matrix

Resources

License

Stars

Watchers

Forks

Packages

No packages published