Skip to content

Commit b2de3e1

Browse files
committed
ENH: adding list_collections method to Irsa
1 parent 893eae2 commit b2de3e1

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

astroquery/ipac/irsa/core.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,19 @@ def query_sia(self, *, pos=None, band=None, time=None, pol=None,
126126
f'pyvo.dam.obscore.{var}')
127127
query_sia.__doc__ = query_sia.__doc__.replace('_SIA2_PARAMETERS', SIA2_PARAMETERS_DESC)
128128

129+
def list_collections(self):
130+
"""
131+
Return information of available IRSA SIAv2 collections to be used in ``query_sia`` queries.
132+
133+
Returns
134+
-------
135+
collections : A `~astropy.table.Table` object.
136+
A table listing all the possible collections for IRSA SIA queries.
137+
"""
138+
query = "SELECT DISTINCT collection from caom.observation ORDER by collection"
139+
collections = self.query_tap(query=query)
140+
return collections.to_table()
141+
129142
@deprecated_renamed_argument(("selcols", "cache", "verbose"), ("columns", None, None), since="0.4.7")
130143
def query_region(self, coordinates=None, *, catalog=None, spatial='Cone',
131144
radius=10 * u.arcsec, width=None, polygon=None,

0 commit comments

Comments
 (0)