Skip to content

Commit

Permalink
Merge pull request #1927 from cds-astro/fix_imshow_hips2fits
Browse files Browse the repository at this point in the history
hips2fits remove imshow calls from remote tests
  • Loading branch information
bsipocz authored Apr 20, 2021
2 parents a3379c0 + 0d83917 commit 809fdfb
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
3 changes: 1 addition & 2 deletions astroquery/hips2fits/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,7 @@ def query_with_wcs(self, hips, wcs, format="fits", min_cut=0.5, max_cut=99.5, st
See the list of valid HiPS ids hosted by the CDS `here <http://aladin.unistra.fr/hips/list>`_.
wcs : `~astropy.wcs.WCS`
An astropy WCS defining the astrometry you wish.
Alternatively, you can pass lon, lat, fov, coordsys keywords (if so, please use the
:meth:`~astroquery.hips2fits.hips2fitsClass.query_with_user_defined_wcs` method).
Alternatively, you can pass lon, lat, fov, coordsys keywords.
format : str, optional
Format of the output image.
Allowed values are fits (default), jpg and png
Expand Down
8 changes: 4 additions & 4 deletions astroquery/hips2fits/tests/test_hips2fits_remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@ def test_query_jpg_no_wcs(self):
cmap=Colormap('viridis'),
)

import matplotlib.cm as cm
import matplotlib.pyplot as plt
# import matplotlib.cm as cm
# import matplotlib.pyplot as plt

im = plt.imshow(result)
plt.show(im)
# im = plt.imshow(result)
# plt.show(im)

# We must get a numpy array with 3 dimensions, and the last one should be of size 3 (RGB)
assert isinstance(result, np.ndarray) and result.shape[2] == 3
Expand Down
7 changes: 3 additions & 4 deletions docs/hips2fits/hips2fits.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Query the `CDS hips2fits service <http://alasky.u-strasbg.fr/hips-image-services

The `CDS hips2fits service <http://alasky.u-strasbg.fr/hips-image-services/hips2fits>`_ offers a way
to extract FITS images from HiPS sky maps. HiPS is an IVOA standard that combines individual images in
order to produce a progressive hierarchical sky map describing the whole survey. Please refer to the
order to produce a progressive hierarchical sky map describing the whole survey. Please refer to the
`IVOA paper <http://www.ivoa.net/documents/HiPS/20170519/REC-HIPS-1.0-20170519.pdf>`_ for more info.

Given an astropy user-defined WCS with a HiPS name,
Expand All @@ -35,7 +35,7 @@ Examples
========

With a user defined astropy WCS
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-------------------------------

.. code-block:: python
Expand Down Expand Up @@ -75,7 +75,7 @@ With a user defined astropy WCS
.. image:: ./query_wcs.png

Without WCS
~~~~~~~~~~~
-----------

>>> from astroquery.hips2fits import hips2fits
>>> import matplotlib.pyplot as plt
Expand Down Expand Up @@ -110,4 +110,3 @@ Reference/API


.. _hips2fits: http://alasky.u-strasbg.fr/hips-image-services/hips2fits

0 comments on commit 809fdfb

Please sign in to comment.