leejjoon/pyregion — pull request #34 by mcara (2014-05-20 05:08:59+00:00)
Title: Allow selection of the axis for angle measurement to the North

`pyregion` computes the image rotation angle using as the angle between North and X-axis instead of typically adopted convention of using Y-axis for image orientation computations. This produces regions that are rotated compared to the regions produced by DS9 when image axes are non-orthogonal (at least for HST images). The proposed here fix consists in introducing an additional parameter `rot_wrt_axis` (can take values 1 or 2) to let users select what axis should be used for computing image rotations (-> rotations of regions). For example, by setting `rot_wrt_axis=2`, `pyregion` now will use `rot2` (angle between Y-axis and North) instead of `rot1` (in ``wcs_converter.py``) in computing region rotations.

This replaces a part of the PR #29.