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

Remove Non-functional Overlay Args from Skyview #2979

Merged
merged 3 commits into from
May 9, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@ vizier
from ``IndexError`` to ``EmptyResponseError`` [#2980]


skyview
^^^^^^^

- Overlay arguments `lut`, `grid`, and `gridlabel` are removed, as they
bsipocz marked this conversation as resolved.
Show resolved Hide resolved
only apply to output types not returned by Astroquery [#2979]


Infrastructure, Utility and Other Changes and Additions
-------------------------------------------------------

Expand Down
31 changes: 8 additions & 23 deletions astroquery/skyview/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,7 @@ def _submit_form(self, input=None, cache=True):

def get_images(self, position, survey, *, coordinates=None, projection=None,
pixels=None, scaling=None, sampler=None, resolver=None,
deedger=None, lut=None, grid=None, gridlabels=None,
radius=None, height=None, width=None, cache=True,
deedger=None, radius=None, height=None, width=None, cache=True,
show_progress=True):
"""
Query the SkyView service, download the FITS file that will be
Expand Down Expand Up @@ -164,13 +163,6 @@ def get_images(self, position, survey, *, coordinates=None, projection=None,
de-edging algorithm. The supported values are: ``"_skip_"`` to
use the survey default, ``"skyview.process.Deedger"`` (for
enabling de-edging), and ``"null"`` to disable.
lut : str
Choose from the color table selections to display the data in
false color.
grid : bool
overlay a coordinate grid on the image if True
gridlabels : bool
annotate the grid with coordinates positions if True
radius : `~astropy.units.Quantity` or None
The angular radius of the specified field.
Overrides the ``width`` and ``height`` parameters.
Expand Down Expand Up @@ -204,38 +196,34 @@ def get_images(self, position, survey, *, coordinates=None, projection=None,
readable_objects = self.get_images_async(position, survey, coordinates=coordinates,
projection=projection, pixels=pixels, scaling=scaling,
sampler=sampler, resolver=resolver, deedger=deedger,
lut=lut, grid=grid, gridlabels=gridlabels,
radius=radius, height=height, width=width,
cache=cache, show_progress=show_progress)
return [obj.get_fits() for obj in readable_objects]

@prepend_docstr_nosections(get_images.__doc__)
def get_images_async(self, position, survey, *, coordinates=None,
projection=None, pixels=None, scaling=None,
sampler=None, resolver=None, deedger=None, lut=None,
grid=None, gridlabels=None, radius=None, height=None,
width=None, cache=True, show_progress=True):
sampler=None, resolver=None, deedger=None,
radius=None, height=None, width=None,
cache=True, show_progress=True):
"""
Returns
-------
A list of context-managers that yield readable file-like objects
"""
image_urls = self.get_image_list(position, survey, coordinates=coordinates,
projection=projection, pixels=pixels, scaling=scaling, sampler=sampler,
resolver=resolver, deedger=deedger, lut=lut, grid=grid,
gridlabels=gridlabels, radius=radius,
height=height, width=width,
cache=cache)
resolver=resolver, deedger=deedger, radius=radius,
height=height, width=width, cache=cache)
return [commons.FileContainer(url, encoding='binary',
show_progress=show_progress)
for url in image_urls]

@prepend_docstr_nosections(get_images.__doc__, sections=['Returns', 'Examples'])
def get_image_list(self, position, survey, *, coordinates=None,
projection=None, pixels=None, scaling=None,
sampler=None, resolver=None, deedger=None, lut=None,
grid=None, gridlabels=None, radius=None, width=None,
height=None, cache=True):
sampler=None, resolver=None, deedger=None,
radius=None, width=None, height=None, cache=True):
"""
Returns
-------
Expand Down Expand Up @@ -267,12 +255,9 @@ def get_image_list(self, position, survey, *, coordinates=None,
'Position': parse_coordinates(position),
'survey': survey,
'Deedger': deedger,
'lut': lut,
'projection': projection,
'gridlabels': '1' if gridlabels else '0',
'coordinates': coordinates,
'scaling': scaling,
'grid': grid,
'resolver': resolver,
'Sampler': sampler,
'imscale': size_deg,
Expand Down