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

Refactor coordinates API to use APE 14 #2079

Merged
merged 21 commits into from
Jan 27, 2020

Conversation

astrofrog
Copy link
Member

@astrofrog astrofrog commented Jan 24, 2020

This PR changes the Coordinates infrastructure to now operate on coordinate objects compliant with the universal APE 14 WCS API developed by the Astropy project (but not specific to astronomy). This will make it easier to make use of e.g. GWCS, and also means that we no longer need to rely on the hack of trying to translate various coordinate classes to WCS objects for the purposes of display in WCSAxes (which can work with any APE 14-compatible coordinates). We can also then leverage any utilities developed for this API for free without having to write our own versions.

This is not yet finished - in particular, I need to:

  • Try and remove the pixel2world and world2pixel methods from the various classes
  • Re-work AffineCoordinates to no longer use the WCS class
  • Update the documentation
  • Check for untested uses of the coordinates API
  • Check the impact for other plugin packages
  • Write a 'What's new' entry to explain the changes in case it impacts users

Fixes #2061

@astrofrog astrofrog added this to the v0.16.0 milestone Jan 24, 2020
@astrofrog astrofrog changed the title Switch APE 14 Refactor coordinates API to use APE 14 Jan 24, 2020
@codecov
Copy link

codecov bot commented Jan 24, 2020

Codecov Report

Merging #2079 into master will decrease coverage by 2.31%.
The diff coverage is 90.83%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2079      +/-   ##
==========================================
- Coverage   90.27%   87.95%   -2.32%     
==========================================
  Files         394      243     -151     
  Lines       39190    22090   -17100     
==========================================
- Hits        35377    19430   -15947     
+ Misses       3813     2660    -1153
Impacted Files Coverage Δ
glue/_deps.py 66.38% <ø> (+7.93%) ⬆️
glue/core/data_factories/fits.py 88.88% <ø> (+1.29%) ⬆️
glue/plugins/wcs_autolinking/__init__.py 100% <ø> (+14.28%) ⬆️
glue/plugins/coordinate_helpers/link_helpers.py 100% <ø> (ø) ⬆️
glue/viewers/image/qt/standalone_image_viewer.py 94.89% <ø> (-0.35%) ⬇️
glue/core/component.py 97% <100%> (+0.5%) ⬆️
glue/core/data_exporters/gridded_fits.py 90.69% <100%> (ø) ⬆️
glue/core/component_link.py 86.48% <100%> (+0.05%) ⬆️
glue/viewers/profile/state.py 98.82% <100%> (ø) ⬆️
glue/core/state.py 92.06% <100%> (+0.36%) ⬆️
... and 188 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 80e5a3f...ecd9845. Read the comment docs.

@astrofrog astrofrog merged commit e8689ac into glue-viz:master Jan 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor Coordinates class to follow Astropy's APE 14 interface
1 participant