Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion astroquery/skyview/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ def get_images_async(self, position, survey, coordinates=None,
gridlabels, radius=radius,
height=height, width=width,
cache=cache)
return [commons.FileContainer(url) for url in image_urls]
return [commons.FileContainer(url, encoding='binary') for url in image_urls]

@prepend_docstr_noreturns(get_images.__doc__)
def get_image_list(self, position, survey, coordinates=None,
Expand Down
7 changes: 3 additions & 4 deletions astroquery/skyview/tests/test_skyview_remote.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Licensed under a 3-clause BSD style license - see LICENSE.rst
from astropy.tests.helper import remote_data
from astropy.io.fits import HDUList

from ...skyview import SkyView
from .test_skyview import data_path
Expand All @@ -15,11 +16,9 @@ def test_get_image_list():

@remote_data
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How big are the files? If they're more than a few MB, could you add a second decorator here, @pytest.mark.bigdata?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The file is relatively small, about 360 KB, since the images get (down)sampled to 300 by 300 pixels by default (and could be reduced further server-side if wanted).

def test_get_images():
images = SkyView().get_image_list(position='Eta Carinae',
survey=['2MASS-K'])
images = SkyView().get_images(position='Eta Carinae', survey=['2MASS-J'])
assert len(images) == 1
for im in images:
assert im.startswith('http://skyview.gsfc.nasa.gov/')
assert isinstance(images[0], HDUList)

@remote_data
def test_survey_list():
Expand Down