[AstroPy] Parameter 'origin' in WCS-methods

Michael Droettboom mdroe at stsci.edu
Fri May 8 08:34:04 EDT 2009


Thomas is correct.

I will produce a new tarball to include the correct test.py -- that was 
just an oversight on my part.

Cheers,
Mike

Thomas Robitaille wrote:
> Hi Martin,
>
> The various ways to call the pix2sky or sky2pix methods are
>
> wcs.wcs_pix2sky(x,y,0)
> wcs.wcs_pix2sky(x,y,1)
> wcs.wcs_pix2sky(xy,0)
> wcs.wcs_pix2sky(xy,1)
>
> where x and y are 1D numpy arrays and xy is a 2D array. The API is  
> described here: http://stsdas.stsci.edu/astrolib/pywcs-1.4-4.3_api/
>
> In the FITS standard, the bottom left pixel is defined as (1,1)  
> whereas numpy arrays are zero-based, so the bottom left pixel in the  
> image is (0,0). Basically, the origin argument specifies whether you  
> want to assume the bottom left pixel is (1,1) (origin=1) or (0,0)  
> (origin=0). Does this make any sense?
>
> Cheers,
>
> Thomas
>
> On 8 May 2009, at 07:07, Martin Kuemmel wrote:
>
>   
>> Hi all,
>>
>> I installed the newest version of pywcs (v1.4-4.3). The 'test.py' in
>> the tarball complains since there is no parameter 'origin' given
>> in the various methods (e.g. wcs_pix2sky(origin, *args)).
>>
>> The 'test.py' in the repository works, good.
>>
>> But what's the meaning of this parameter, anyway??
>> It's an integer, and learning-by-doing tells me that it matters
>> whether it is a 0 or a 1? Is there some documentation somewhere?
>>
>> Cheers,
>> Martin
>>
>> -- 
>> + 
>> ----------------------------------------------------------------------+
>> | Martin Kuemmel                              E-mail:  
>> mkuemmel at eso.org |
>> | Space Telescope European Co-ordinating  
>> Facility                      |
>> | European Southern Observatory                          Room: ESO  
>> 264 |
>> | Karl-Schwarzschild-Strasse 2                 Phone: +49 89  
>> 32006-817 |
>> | D-85748 Garching                             FAX:   +49 89  
>> 32006-703 |
>> | Germany                         WWW: http://www.stecf.org/ 
>> ~mkuemmel/ |
>> |     
>> __o                                                               |
>> |  _  
>> \<._                                                              |
>> +_(_)/ 
>> _(_)_____________________________________________________________+
>> _______________________________________________
>> AstroPy mailing list
>> AstroPy at scipy.org
>> http://mail.scipy.org/mailman/listinfo/astropy
>>     
>
> _______________________________________________
> AstroPy mailing list
> AstroPy at scipy.org
> http://mail.scipy.org/mailman/listinfo/astropy
>   

-- 
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA




More information about the AstroPy mailing list