[AstroPy] Parameter 'origin' in WCS-methods
Thomas Robitaille
thomas.robitaille at gmail.com
Fri May 8 07:32:47 EDT 2009
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
More information about the AstroPy
mailing list