Repository navigation
Conversation
mcara
commented
Apr 9, 2014
Contributor
- 'pyregion.write' crashes when saving regions without comments [bug fix];
- 'pyregion.write' converts exclude ("-") DS9 regions to regular ("+") region when saving region files [bug fix];
- 'pyregion.write' cannot save region files that contain regions with mixed Coordinate Systems (e.g., image, sky, etc.) [enhancement];
- 'pyregion' computes the image rotation angle using as the angle between North and X-axis instead of typically adopted convention of using Y-axis (at least for HST images) for image orientation computations. This produces regions that are rotated compared to the regions produced by DS9 when image axes are non-orthogonal. This was fixed by introducing additional parameter 'rot_wrt_axis' (can be 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. [enhancement]
- Fixed a bug in 'get_mask' function where a header was passed to 'as_region_filter' as 'origin' argument [bug fix].
1. 'pyregion.write' crashes when saving regions without comments [bug
fix];
2. 'pyregion.write' converts exclude ("-") DS9 regions to regular ("+")
region when saving region files [bug fix];
3. 'pyregion.write' cannot save region files that contain regions with
mixed CS [enhancement];
4. 'pyregion' computes the rotation angle using X-axis instead of
adopted convention of using Y-axis (at least for HST images). This
produces regions that are rotated compared to the regions produced by
DS9. This was fixed by introducing additional parameter 'rot_wrt_axis'
(can be 1 or 2) to let users select what axis should be used for
computing 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.
[enhancement]
5. Fixed a bug in 'get_mask' function where a header was passed to
'as_region_filter' as 'origin' [bug fix].
Contributor
Author
|
Maybe, for point # 4 above, the axis with regard to which the angle to the North is measured can be hardcoded to be axis 2 (Y-axis) as, I think most use angle between Y-axis and North to compute image orientation. For images with orthogonal axes either axis will lead to identical results. However, for images with skewed axes (e.g., HST ACS/WFC) Y-axis should be used. |
Contributor
|
I apologize for my long silence. The changes seems all good. Thank you very much. |
Contributor
Author
|
Thank you very much for considering my proposed modifications! I will try to split this PR into 3PRs this weekend or earlier next week. |
This was referenced May 20, 2014
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.