-
-
Notifications
You must be signed in to change notification settings - Fork 400
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
Hips2fits new service #1734
Hips2fits new service #1734
Conversation
Hello @bmatthieu3! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found: There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2020-11-24 14:55:14 UTC |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks really good. Could you fix up the PEP formatting, though? I found a few small corrections that need to be handled.
astroquery/hips2fits/core.py
Outdated
# The WCS header does not contain the NAXISx keywords | ||
# We can get them from the WCS directly and add them | ||
# to the header | ||
nx, ny = wcs.pixel_shape |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you may not be able to rely on this being present; if a wcs was created not from a fits Header (i.e., from scratch), it won't have this attribute populated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The hips2fits service asks for the size of the result image (width and height), it is mandatory. I changed the code, if the wcs has no pixel shape (pixel_shape None) then I raise an AttributeError saying either to give your wcs the pixel size of the image or to use the other query method
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @adamginsburg, I have seen a test is failing because it runs tests from the doc api (https://travis-ci.org/github/astropy/astroquery/jobs/695927179) which are remote tests. How to say these doc tests are remote and thus can be skipped ? Thanks PS: I also added a changelog |
Add |
I don't have permission to push to this branch. It needs a simple rebase to handle changelog conflicts. |
@keflavich - Does this need another round of review, or mergeable pending resolving the conflict and getting an all green CI? |
afaict, this was ready to go once those minor fixes (changelog, rebase, CI pass) were completed. |
Hi @keflavich @bsipocz, I added |
I'm going to merge this on the command line - we need to put the changelog entry into the right section, but otherwise it's good to go. |
The remote tests pop up a blocking |
@@ -10,6 +10,7 @@ | |||
from astropy import wcs | |||
|
|||
__all__ = ['hips2fits', 'hips2fitsClass'] | |||
__doctest_skip__ = ['hips2fitsClass.*'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tinumide - when we get here, we should also look for doctest skips like this in the code files, and turn on the remote testing for them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, noted
@bmatthieu3 @keflavich - Please open a follow-up PR for fixing the imshow issue or skip the test, as we want to turn back on the remote CI testing soonish. |
Retrospect I think this should have been a new module under cds, as part of our upcoming restructure. |
Hi @bsipocz @adamginsburg @tboch
I have implemented a new package responsible for querying hips2fits: http://alasky.u-strasbg.fr/hips-image-services/hips2fits
This service take a HiPS name + astropy WCS and return a FITS/JPG/PNG image cutout of the HiPS for that WCS. The list of valid hips name is here: http://aladin.unistra.fr/hips/list
There are two methods:
I added a simple doc containing 2 examples with the corresponding output plot images that can be obtained thanks to hips2fits. Some tests (remote too) have also been added.
Thank you very much for your reviews.