[AstroPy] Bug in wcs_world2pix?
bgarwood at nrao.edu
Fri Sep 19 07:58:00 EDT 2014
I suspect what's going on here has to do with the specific CD matrix, which includes rotation. I think because of that rotation the world coordinate actually maps back in to the grid at the antipode. I haven't checked this by hand to see if that's the case.
On September 19, 2014 7:47:30 AM EDT, Howard Bushouse <bushouse at stsci.edu> wrote:
>Huh. But that’s not how astronomers measure RA and Dec, even when
>translated to degrees. If I’ve got an object with an RA of 17:45:00.0
>(hh:mm:ss.w) the RA in degrees is 266.25. We *never* use a negative RA.
>Instead of a range of -180 to 180, we use 0 to 360. Dec is the only one
>that ever goes negative (-90 to +90, as you indicated).
>On Sep 18, 2014, at 8:26 PM, Michael Droettboom <mdroe at stsci.edu>
>> The range of ra and dec is (-180, 180) and (-90, 90) respectively.
>> (211, -26) is equivalent to (31, 26).
>> On 09/18/2014 05:04 PM, Maik Riechert wrote:
>>> I'm having some great trouble currently and am a bit confused too:
>>> wcs = WCS(header)
>>> x,y = wcs.wcs_world2pix(211, -26, 0)
>>> print x,y # 836.316942718 658.26364248
>>> ra,dec = wcs.wcs_pix2world(x, y, 0)
>>> print ra, dec # 31.0 26.0
>>> It seems like world2pix gives me bogus results. I was expecting
>>> way outside my image area (image size is 4256x2832). Am I doing
>>> something obvious wrong?
>>> The WCS headers can be seen at http://pastebin.com/JrdiL949
>>> Thanks for the help,
>>> AstroPy mailing list
>>> AstroPy at scipy.org
>> Michael Droettboom
>> Science Software Branch
>> Space Telescope Science Institute
>> AstroPy mailing list
>> AstroPy at scipy.org
>AstroPy mailing list
>AstroPy at scipy.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the AstroPy