[AstroPy] numarray pdf 1.5 is broken. Using numdisplay, Python, PIL, and Tkinter
thomas.robitaille at gmail.com
Mon Apr 6 09:26:11 EDT 2009
Have you tried matplotlib? For example:
from matplotlib import figure
image = pyfits.getdata('lena.fits')
fig = figure()
ax = fix.add_subplot(111)
You can use matplotlib to do interactive stuff. If you really want to
use Tkinter to display FITS images, I can send you an example.
On 6 Apr 2009, at 08:32, Wayne Watson wrote:
> Hi, it must be than that the version of the pyfits user manual I found
> is out of date, since it talks about numarray.
> I just wanted to confirm that I understood the role of ds9, which is
> you essentially wrote, is a program and not a python module.
> I just found the numpy manual, Dec. 7, 2006, by Oliphant. Is that the
> current one? It mentions fits once, and image about 5 times (mostly as
> what seems to be a module). Here are a few lines from the manual:
> • nd image –> scipy.ndimage
> • convolve –> scipy.stsci.convolve
> • image –> scipy.stsci.image
> If you don’t want to install all of scipy, you can grab just these
> packages from SVN
> imshow is not found in it. The manual is close to 350 pages. I
> don't want to print it if it doesn't meet my needs. To put it in terms
> of Python, consider:
> import Image
> im = Image.open("lena.ppm")
> print im.format, im.size, im.mode
> I'm looking for a capability somewhat like that above for fits, and
> ppm. show is pretty primitive, but the the idea is that I want this
> little program to display lena.fits.
> Cohen-Tanugi Johann wrote:
>> hi Wayne, I am not sure I understand your request, but :
>> 1) numarray is obsolete, use numpy.
>> 2) ds9 is meant to display fits image, it has nothing to do with
>> internet AFAIK. You also have FV from HEASARC.
>> 3) if you need to just visualize a fits image as an array, you have
>> several possibilities in numpy : imshow, pcolor, etc.... check the
>> user(s guide.
>> Wayne Watson wrote:
>>> I tried downloading the numarray from the web and Acrobat burped. It
>>> came up with an error. Where is the official site for it?
>>> It appears to display a fits image one must either use numdisplay or
>>> some combo of numarray and Python's PIL and a GUI like Tkinter. I
>>> really want to use Python in such a manner if it is possible. From
>>> what little I know about DS9, it is an internet viewer.
>>> Wayne Watson (Watson Adventures, Prop., Nevada City, CA)
>>> (121.01 Deg. W, 39.26 Deg. N) GMT-8 hr std. time)****
>>> "Less than all cannot satisfy Man." -- William Blake
>>> AstroPy mailing list
>>> AstroPy at scipy.org
> Wayne Watson (Watson Adventures, Prop., Nevada City, CA)
> (121.01 Deg. W, 39.26 Deg. N) GMT-8 hr std. time)****
> "Less than all cannot satisfy Man." -- William Blake
> AstroPy mailing list
> AstroPy at scipy.org
More information about the AstroPy