Skip to content

Commit 2eeada5

Browse files
committed
Addressing review
1 parent 900c4ad commit 2eeada5

File tree

3 files changed

+13
-14
lines changed

3 files changed

+13
-14
lines changed

astroquery/ipac/irsa/core.py

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,7 @@ def query_sia(self, *, pos=None, band=None, time=None, pol=None,
128128

129129
query_sia.__doc__ = query_sia.__doc__.replace('_SIA2_PARAMETERS', SIA2_PARAMETERS_DESC)
130130

131-
def query_ssa(self, *, pos=None, diameter=None, band=None, time=None, format=None,
132-
collection=None):
131+
def query_ssa(self, *, pos=None, radius=None, band=None, time=None, collection=None):
133132
"""
134133
Use standard SSA attributes to query the IRSA SSA service.
135134
@@ -138,8 +137,8 @@ def query_ssa(self, *, pos=None, diameter=None, band=None, time=None, format=Non
138137
pos : `~astropy.coordinates.SkyCoord` class or sequence of two floats
139138
the position of the center of the circular search region.
140139
assuming icrs decimal degrees if unit is not specified.
141-
diameter : `~astropy.units.Quantity` class or scalar float
142-
the diameter of the circular region around pos in which to search.
140+
raidus : `~astropy.units.Quantity` class or scalar float
141+
the radius of the circular region around pos in which to search.
143142
assuming icrs decimal degrees if unit is not specified.
144143
band : `~astropy.units.Quantity` class or sequence of two floats
145144
the bandwidth range the observations belong to.
@@ -149,20 +148,20 @@ def query_ssa(self, *, pos=None, diameter=None, band=None, time=None, format=Non
149148
assuming iso 8601 if format is not specified.
150149
collection : str
151150
Name of the collection that the data belongs to.
152-
format : str
153-
the image format(s) of interest. "all" indicates
154-
all available formats; "graphic" indicates
155-
graphical images (e.g. jpeg, png, gif; not FITS);
156-
"metadata" indicates that no images should be
157-
returned--only an empty table with complete metadata.
158151
159152
Returns
160153
-------
161154
Results in `pyvo.dal.SSAResults` format.
162-
result.table in Astropy table format
155+
result.to_table() in Astropy table format
163156
"""
157+
158+
if radius is None:
159+
diameter = None
160+
else:
161+
diameter = 2 * radius
162+
164163
return self.ssa.search(pos=pos, diameter=diameter, band=band, time=time,
165-
format=format, collection=collection)
164+
format='all', collection=collection)
166165

167166
def list_collections(self, servicetype=None):
168167
"""

astroquery/ipac/irsa/tests/test_irsa_remote.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,5 +92,5 @@ def test_ssa(self):
9292
coord = SkyCoord.from_name("Eta Carina")
9393
result = Irsa.query_ssa(pos=coord)
9494
assert len(result) > 260
95-
collections = set(unique(result.to_table(), keys='dataid_collection')['dataid_collection'])
95+
collections = set(result.to_table()['dataid_collection'])
9696
assert {'champ', 'iso_sws', 'sofia_forcast', 'sofia_great', 'spitzer_sha'}.issubset(collections)

docs/ipac/irsa/irsa.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ Enhanced Imaging products in the centre of the COSMOS field as an `~astropy.tabl
334334
>>> arp220_spectra = Irsa.query_ssa(pos=coord).to_table()
335335

336336
Without specifying the collection, the query returns results from multiple
337-
collections. For example this target has spectra from Sofia as well as from
337+
collections. For example this target has spectra from SOFIA as well as from
338338
Spitzer.
339339

340340
.. doctest-remote-data::

0 commit comments

Comments
 (0)