Skip to content

Commit 8f2f183

Browse files
committed
Add additional documentation
1 parent 2aeb51e commit 8f2f183

File tree

2 files changed

+41
-6
lines changed

2 files changed

+41
-6
lines changed

astroquery/sdss/core.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,10 @@ def query_region_async(self, coordinates, *, radius=None,
221221
When called with keyword ``width``, and optionally a different ``height``,
222222
a rectangular search is performed, centered on each of the given
223223
coordinates. In this mode, internally, this function is equivalent to
224-
a general SQL query (`query_sql`).
224+
a general SQL query (`query_sql`). The shape of the rectangle is
225+
not corrected for declination (*i.e.* no :math:`\cos \delta` correction);
226+
conceptually, this means that the rectangle will become increasingly
227+
trapezoidal-shaped at high declination.
225228
226229
In both radial and rectangular modes, this function returns all objects
227230
within the search area; this could potentially include duplicate observations

docs/sdss/sdss.rst

Lines changed: 37 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ images, are also included in DR17. Users may select alternate DR's.
1717
Getting started
1818
===============
1919

20-
This example shows how to perform an object cross-ID with SDSS. We'll start
21-
with the position of a source found in another survey, and search within a 5
22-
arcsecond radius for optical counterparts in SDSS. Note use of the keyword
23-
argument spectro, which requires matches to have spectroscopy, not just
24-
photometry:
20+
This example shows how to perform an individual object cross-ID with SDSS.
21+
We'll start with the position of a source found in another survey, and search
22+
within a 5 arcsecond radius (a "cone search") for optical counterparts in SDSS.
23+
Note use of the keyword argument spectro, which requires matches to have
24+
spectroscopy, not just photometry:
2525

2626
.. doctest-remote-data::
2727

@@ -36,6 +36,38 @@ photometry:
3636

3737
The result is an astropy.Table.
3838

39+
Searching regions and multiple objects
40+
======================================
41+
42+
You can use `~astroquery.sdss.SDSSClass.query_region` to search multiple
43+
locations; the input coordinates can be a single `astropy.coordinates` object
44+
or a `list` or `~astropy.table.Column` of coordinates.
45+
However, it is important to specify exactly what kind of search is
46+
desired. When `~astroquery.sdss.SDSSClass.query_region` is invoked with the
47+
``radius`` keyword, a circle around each point is searched. This is also
48+
called a "cone search". When invoked in this mode,
49+
`~astroquery.sdss.SDSSClass.query_region` is equivalent to
50+
`~astroquery.sdss.SDSSClass.query_crossid`. Because of this equivalence, there
51+
is a strict limit of 3 arcmin on the value of ``radius`` which is imposed
52+
by the SDSS servers.
53+
54+
`~astroquery.sdss.SDSSClass.query_region` can also be used to search a
55+
rectangular region centered on a coordinate or each coordinate in a list.
56+
This mode is invoked with the ``width`` keyword, which is the width in
57+
right ascension. Optionally, the ``height`` keyword can be used to specify
58+
a different range of declination. With these parameters,
59+
`~astroquery.sdss.SDSSClass.query_region` constructs a rectangle in RA, dec
60+
that does *not* correct for the geometry at high declination, also known as
61+
the :math:`\cos \delta` correction. At high declination, these rectangles
62+
would appear much more like trapezoids. However, this is the more intuitive
63+
interpretation of "this range of RA, that range of Dec" that many people use.
64+
Finally though, the constructed rectangles *do* account for RA wrap-around,
65+
so an appropriate region of the celestial sphere is searched, even if the
66+
central coordinate is very close to RA = 0.
67+
68+
Finally note that either ``radius`` or ``width`` must be specified.
69+
Specifying neither or both will raise an exception.
70+
3971
Downloading data
4072
================
4173
If we'd like to download spectra and/or images for our match, we have all

0 commit comments

Comments
 (0)