Skip to content

Commit 479d4de

Browse files
authored
Merge pull request #3351 from gpdf/patch-2
Improve subsection nesting; add detail to image search
2 parents 5606fd9 + 82cab62 commit 479d4de

File tree

1 file changed

+59
-37
lines changed

1 file changed

+59
-37
lines changed

docs/ipac/irsa/irsa.rst

Lines changed: 59 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
IRSA Queries (`astroquery.ipac.irsa`)
55
*************************************
66

7-
Getting started
7+
Getting Started
88
===============
99

1010
This module provides access to the public astrophysics catalogs,
@@ -16,7 +16,7 @@ ZTF.
1616
Below we provide examples of common searches.
1717

1818

19-
Catalog search
19+
Catalog Search
2020
--------------
2121

2222
Available IRSA catalogs
@@ -201,8 +201,8 @@ with the ``spatial`` parameter set to ``"All-Sky"``.
201201
.. TODO: add example, that is runnable, but still potentially useful.
202202
203203
204-
Selecting Columns
205-
-----------------
204+
Selecting columns
205+
^^^^^^^^^^^^^^^^^
206206

207207
The IRSA service allows to query either a subset of the default columns for
208208
a given table, or additional columns that are not present by default. This
@@ -246,7 +246,7 @@ available about the columns in a `~astropy.table.Table`.
246246

247247

248248
Async queries
249-
--------------
249+
^^^^^^^^^^^^^
250250

251251
For bigger queries it is recommended using the ``async_job`` keyword option. When used,
252252
the query is send in asynchronous mode.
@@ -262,7 +262,7 @@ the query is send in asynchronous mode.
262262
J000009.78-355736.9 0.0407905 -35.9602605 0.0454 ... 0.0005762523295116 -0.5872239888098030 100102010 8873706189183
263263

264264
Direct TAP query to the IRSA server
265-
-----------------------------------
265+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
266266

267267
The `~astroquery.ipac.irsa.IrsaClass.query_tap` method allows for a rich variety of queries. ADQL queries
268268
provided via the ``query`` parameter is sent directly to the IRSA TAP server, and the result is
@@ -293,8 +293,17 @@ returned as a `~pyvo.dal.TAPResults` object. Its ``to_table`` or ``to_qtable`` m
293293
202.809023 46.964558 15.874 0.081 ... 15.322 0.188 AAC 000
294294

295295

296+
Image Search
297+
------------
298+
299+
The `~astroquery.ipac.irsa` module provides an interface to image searches as well.
300+
This is primarily based on performing IVOA Simple Image Access, version 2 (SIAv2)
301+
queries against the IRSA services.
302+
An auxiliary interface is provided to allow users to identify subsets -- "collections" --
303+
of the available image data, typically associated with individual missions.
304+
296305
Simple image access queries
297-
---------------------------
306+
^^^^^^^^^^^^^^^^^^^^^^^^^^^
298307

299308
`~astroquery.ipac.irsa.IrsaClass.query_sia` provides a way to access IRSA's Simple
300309
Image Access VO service. In the following example we are looking for Spitzer
@@ -308,7 +317,7 @@ Enhanced Imaging products in the centre of the COSMOS field as a `~astropy.table
308317
`IRSA tutorials
309318
<https://caltech-ipac.github.io/irsa-tutorials/#accessing-irsa-s-on-premises-holdings-using-vo-protocols>`__.
310319

311-
For more info, visit the `IRSA documentation <https://irsa.ipac.caltech.edu/ibe/sia_v1.html>`__
320+
For more info, visit the `IRSA documentation <https://irsa.ipac.caltech.edu/ibe/sia_v1.html>`__.
312321

313322
.. doctest-remote-data::
314323

@@ -319,35 +328,17 @@ Enhanced Imaging products in the centre of the COSMOS field as a `~astropy.table
319328
>>> coord = SkyCoord('150.01d 2.2d', frame='icrs')
320329
>>> spitzer_images = Irsa.query_sia(pos=(coord, 1 * u.arcmin), collection='spitzer_seip')
321330

322-
To list available collections for SIA queries, the
323-
`~astroquery.ipac.irsa.IrsaClass.list_collections` method is provided, and
324-
will return a `~astropy.table.Table`. You can use the ``servicetype``
325-
argument to filter for image or spectral collections using ``'SIA'`` or
326-
``'SSA'`` respectively. You can also use the ``filter`` argument to show
327-
only the collections with the given filter strings in the collection names.
331+
The collection name, ``spitzer_seip`` in this example,
332+
can be obtained from the collection-query API detailed below.
328333

329-
.. doctest-remote-data::
334+
The result, in this case in ``spitzer_images``, is a table of image metadata in the IVOA "ObsCore" format
335+
(see the `ObsCore v1.1 documentation
336+
<https://www.ivoa.net/documents/ObsCore/20170509/index.html>`__).
330337

331-
>>> from astroquery.ipac.irsa import Irsa
332-
>>> Irsa.list_collections(servicetype='SIA', filter='spitzer')
333-
<Table length=38>
334-
collection
335-
object
336-
-------------------
337-
spitzer_abell1763
338-
spitzer_clash
339-
spitzer_cosmic_dawn
340-
spitzer_cygx
341-
spitzer_deepdrill
342-
...
343-
spitzer_spuds
344-
spitzer_srelics
345-
spitzer_ssdf
346-
spitzer_swire
347-
spitzer_taurus
348-
349-
Now open a cutout image for one of the science images. You could either use
350-
the the IRSA on-premise data or the cloud version of it using the
338+
Now you can open the FITS image and, if desired, make a cutout from
339+
one of the science images.
340+
You could either use
341+
the the IRSA on-premises data or the cloud version of it using the
351342
``access_url`` or ``cloud_access`` columns. For more info about fits
352343
cutouts, please visit :ref:`astropy:fits_io_cloud`.
353344

@@ -360,7 +351,7 @@ cutouts, please visit :ref:`astropy:fits_io_cloud`.
360351
>>> with fits.open(science_image['access_url'], use_fsspec=True) as hdul:
361352
... cutout = Cutout2D(hdul[0].section, position=coord, size=2 * u.arcmin, wcs=WCS(hdul[0].header))
362353

363-
Now plot the cutout.
354+
Now you can plot the cutout.
364355

365356
.. doctest-skip::
366357

@@ -386,8 +377,39 @@ Now plot the cutout.
386377
plt.imshow(cutout.data, cmap='grey')
387378
plt.show()
388379

380+
Collection queries
381+
^^^^^^^^^^^^^^^^^^
382+
383+
To list available collections for SIA queries, the
384+
`~astroquery.ipac.irsa.IrsaClass.list_collections` method is provided, and
385+
will return a `~astropy.table.Table`.
386+
You can use the ``filter`` argument to show
387+
only collections with a given search string in the collection names.
388+
The ``servicetype`` argument is used to filter for image collections, using ``'SIA'``,
389+
or spectral collections (also see below), using ``'SSA'``.
390+
391+
.. doctest-remote-data::
392+
393+
>>> from astroquery.ipac.irsa import Irsa
394+
>>> Irsa.list_collections(servicetype='SIA', filter='spitzer')
395+
<Table length=38>
396+
collection
397+
object
398+
-------------------
399+
spitzer_abell1763
400+
spitzer_clash
401+
spitzer_cosmic_dawn
402+
spitzer_cygx
403+
spitzer_deepdrill
404+
...
405+
spitzer_spuds
406+
spitzer_srelics
407+
spitzer_ssdf
408+
spitzer_swire
409+
spitzer_taurus
410+
389411

390-
Simple spectral access queries
412+
Simple Spectral Access Queries
391413
------------------------------
392414

393415
`~astroquery.ipac.irsa.IrsaClass.query_ssa` provides a way to access IRSA's Simple

0 commit comments

Comments
 (0)