stupid mistake I made that someone else will probably also make

197 views
Skip to first unread message

Chris

unread,
Sep 24, 2007, 12:44:14 PM9/24/07
to wcs2kml
Hi,

When testing my numpy/pyfits code changes with wcs2kml.py I made a
very stupid mistake running the script that I expect other people will
make also. I did not have a raster image to provide as input so, as
the doc string says I can, I was going to allow PIL to handle the
conversion of my FITS file. Here is what I got:

[family:devCode/acs/hrc_test] chanley% wcs2kml.py --
imagefile="test_ext_1.fits" --fitsfile="test_ext_1.fits"
Reading WCS from test_ext_1.fits... done
Traceback (most recent call last):
File "/Users/chanley/dev/site-packages/bin/wcs2kml.py", line 961, in
<module>
main(sys.argv)
File "/Users/chanley/dev/site-packages/bin/wcs2kml.py", line 907, in
main
projection = SkyProjection(image, wcs)
File "/Users/chanley/dev/site-packages/bin/wcs2kml.py", line 546, in
__init__
self._image = image.convert("RGBA")
File "/usr/stsci/pyssgdev/Python-2.5.1/lib/python2.5/site-packages/
PIL/Image.py", line 653, in convert
self.load()
File "/usr/stsci/pyssgdev/Python-2.5.1/lib/python2.5/site-packages/
PIL/ImageFile.py", line 257, in load
raise IOError("cannot find loader for this %s file" % self.format)
IOError: cannot find loader for this FITS file

This can of course be avoided by leaving off the --fitfile flag.
However, this doesn't seem very intuitive to me. Something to think
about changing for a future release.

Chris

Reply all
Reply to author
Forward
0 new messages