Skip to content

Commit b62cc03

Browse files
committed
Document that #66 is fixed and Headers are required
Also closes #87
1 parent d594f17 commit b62cc03

2 files changed

Lines changed: 11 additions & 11 deletions

File tree

‎CHANGES.rst‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ API Changes
66

77
- Removed ``rot_wrt_axis`` parameter from ``ShapeList`` and internal methods.
88

9+
- ``ShapeList.as_imagecoord`` no longer accepts a ``asropy.wcs.WCS`` object. The
10+
conversion from pixel to image coordinates depends on the center of the
11+
image defined in ``astropy.io.fits.Header`` in order to agree with DS9.
12+
913
- ``pyregion.ds9_region_parser``
1014

1115
- ``RegionParser.sky_to_image`` now calls its first parameter ``shape_list``
@@ -15,7 +19,7 @@ API Changes
1519

1620
- ``kapteyn_celestial`` removed.
1721

18-
- ``pyregion.wcs_converter``
22+
- ``pyregion.wcs_converter``
1923

2024
- ``convert_to_imagecoord`` changed signature with the switch to Astropy
2125
and takes a ``Shape`` object.
@@ -37,6 +41,9 @@ Other Changes and Additions
3741
and `distortion paper <http://www.atnf.csiro.au/people/mcalabre/WCS/dcs_20040422.pdf>`_
3842
corrections are now used if present in the FITS file.
3943

44+
- Headers with more then 2 axes are now supported; only the celestial axes are
45+
used.
46+
4047
- Rotation angles are measured from the Y-axis instead of the X-axis, in order
4148
to agree with DS9 and potentially other astronomy software. This is a change
4249
from previous behavior, but only affects images with non-orthogonal axes.

‎docs/getting_started.rst‎

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -135,16 +135,9 @@ converted to image coordinates. ::
135135
>>> print r2[0].coord_list
136136
[482.27721401429852, 472.76641383805912, 18.811792596807045]
137137

138-
`ShapeList.as_imagecoord <pyregion.ShapeList.as_imagecoord>` can take a `astropy.wcs.WCS` object instead of a header.
139-
This is useful if your FITS file is not a simple 2D image, as you can then use only the celestial
140-
subset of the co-ordinates to parse the region: ::
141-
142-
from astropy.io import fits
143-
from astropy.WCS import WCS
144-
f = fits.open("t1.fits")
145-
w = WCS(f[0].header)
146-
w_im = w.celestial
147-
r2 = pyregion.parse(region_string).as_imagecoord(w_im)
138+
`ShapeList.as_imagecoord <pyregion.ShapeList.as_imagecoord>` will use the
139+
subset of the header defining a celestial coordinate system, ignoring any
140+
velocity or channel components.
148141

149142
Draw Regions with Matplotlib
150143
============================

0 commit comments

Comments
 (0)