[Numpy-discussion] display numpy array as image

Joe Harrington jh@physics.ucf....
Thu Nov 29 20:03:39 CST 2007


If you want to explore the array interactively, blink images, mess with
colormaps using the mouse, rescale the image values, mark regions, add
labels, look at dynamic plots of rows and columns, etc., get the ds9
image viewer and the xpa programs that come with it that allow it to
communicate with other programs:

ftp://sao-ftp.harvard.edu/pub/rd/ds9
http://hea-www.harvard.edu/RD/ds9/index.html

Then get the Python numdisplay package, which uses xpa.  You have to get
numdisplay from inside the stsci_python package:

http://www.stsci.edu/resources/software_hardware/pyraf/stsci_python/current/download

Just grab the numdisplay directory from within that.  Older versions of
numdisplay are standalone but don't work perfectly.  Beware, there are
outdated web sites about numdisplay on the stsci site.  Don't google!

Run ds9 before you load numdisplay.  Then you can send your python
arrays to a real interactive data viewer at will.  There are even
mechanisms to define physical coordinates mapped from the image
coordinates.

--jh--




More information about the Numpy-discussion mailing list