Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow selection of the axis for angle measurement to the North #34

Merged
merged 1 commit into from
May 27, 2014

Conversation

mcara
Copy link
Contributor

@mcara mcara commented May 20, 2014

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.

`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.
leejjoon added a commit that referenced this pull request May 27, 2014
Allow selection of the axis for angle measurement to the North
@leejjoon leejjoon merged commit 146a27e into astropy:master May 27, 2014
sargas added a commit to sargas/pyregion that referenced this pull request Nov 16, 2014
Needs test cases
I'm not too sure how well the approximation in estimate_angle works for
non-orthagonal axes, but it is identical to what was used before in pull
request astropy#34

Also add a test for loading some imagecoords with WCS instead of Header
sargas added a commit to sargas/pyregion that referenced this pull request Mar 30, 2016
Needs test cases
I'm not too sure how well the approximation in estimate_angle works for
non-orthagonal axes, but it is identical to what was used before in pull
request astropy#34

Also add a test for loading some imagecoords with WCS instead of Header
@cdeil cdeil mentioned this pull request Aug 3, 2016
sargas added a commit to sargas/pyregion that referenced this pull request Aug 8, 2016
Needs test cases
I'm not too sure how well the approximation in estimate_angle works for
non-orthagonal axes, but it is identical to what was used before in pull
request astropy#34

Also add a test for loading some imagecoords with WCS instead of Header
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants