[AstroPy] Curious bug in Pywcs?

Michael Droettboom mdroe at stsci.edu
Tue Sep 6 20:09:19 EDT 2011


I'm also having trouble reproducing this, even with the exact versions 
you specify.  What version of numpy are you running?  Which matplotlib 
backend are you using?

One thing that might be useful to get to the bottom of this might be the 
output from valgrind -->

 > valgrind --tool=memcheck --leak-check=yes python script.py

(where script.py is the name of the minimal example script you provided).

Mike

On 09/06/2011 11:54 AM, Erik Bray wrote:
> On 09/06/2011 11:33 AM, Nicolas Gaudin wrote:
>> Hi,
>>
>> I think there is a bug in Pywcs (package pywcs-1.10-4.7.tar.gz,
>> python2.7.1-0ubuntu5, matplotlib0.99.3-1ubuntu4).  A minimal exemple :
>>
>> --
>> import pyfits
>> import pywcs
>> from matplotlib import pyplot
>>
>> fits = pyfits.open('/home/gaudin/thesis/data/things/DDO154_NA_MOM0_THINGS.FITS')
>> head = fits[0].header
>> pyplot.figure()
>> wcs = pywcs.WCS(head)
>> print wcs.all_pix2sky([[0., 0., 0., 0.],], 0)
>> --
>>
>> The .FITS can be found here: http://www.mpia.de/THINGS/Data.html, it prints
>> (always? the bad result):
>> [[ 17.74922799 -14.30123514   1.          29.        ]]
>>
>> If I comment the line pyplot.figure() I have the good result:
>> [[  1.93759669e+02   2.69403525e+01   1.00000000e+00   1.44255606e+09]]
>>
>> I don't understand why the call pyplot.figure(), only *before* the call to
>> pywcs.WCS(head), produces a bug in pywcs.all_pix2sky.
>>
>> Could you confirm this strange behaviour?  Is it a bug?
> I can't offer any answers on this, unfortunately.  But for what it's
> worth I can't reproduce this behavior.  I tried it with PyFITS 2.3.2 and
> PyFITS from trunk, pywcs 1.9 and 1.10, and matplotlib 1.0.
>
> Erik B.
> _______________________________________________
> AstroPy mailing list
> AstroPy at scipy.org
> http://mail.scipy.org/mailman/listinfo/astropy




More information about the AstroPy mailing list