Skip to content

Commit 6547d69

Browse files
committed
move UCD to saner place, and add some missing keyword definitions (that
need docstrings...)
1 parent a32fcad commit 6547d69

File tree

1 file changed

+17
-9
lines changed

1 file changed

+17
-9
lines changed

astroquery/vizier/core.py

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,21 @@ class VizierClass(BaseQuery):
4848
def __init__(self, columns=["*"], column_filters={}, catalog=None,
4949
keywords=None, ucd="", timeout=conf.timeout,
5050
vizier_server=conf.server, row_limit=conf.row_limit):
51+
"""
52+
Parameters
53+
----------
54+
columns : list
55+
List of strings
56+
column_filters : dict
57+
catalog : str or None
58+
keywords : str or None
59+
ucd : string
60+
"Unified Content Description" column descriptions. Specifying
61+
these will select only catalogs that have columns matching the
62+
column descriptions defined on the Vizier web pages.
63+
See http://vizier.u-strasbg.fr/vizier/vizHelp/1.htx#ucd and
64+
http://cds.u-strasbg.fr/w/doc/UCD/
65+
"""
5166

5267
super(VizierClass, self).__init__()
5368
self.columns = columns
@@ -154,7 +169,7 @@ def keywords(self):
154169
self._keywords = None
155170

156171
def find_catalogs(self, keywords, include_obsolete=False, verbose=False,
157-
ucd='', max_catalogs=None, return_type='votable'):
172+
max_catalogs=None, return_type='votable'):
158173
"""
159174
Search Vizier for catalogs based on a set of keywords, e.g. author name
160175
@@ -165,12 +180,6 @@ def find_catalogs(self, keywords, include_obsolete=False, verbose=False,
165180
From `Vizier <http://vizier.u-strasbg.fr/doc/asu-summary.htx>`_:
166181
"names or words of title of catalog. The words are and'ed, i.e.
167182
only the catalogues characterized by all the words are selected."
168-
ucd : string
169-
"Unified Content Description" column descriptions. Specifying
170-
these will select only catalogs that have columns matching the
171-
column descriptions defined on the Vizier web pages.
172-
See http://vizier.u-strasbg.fr/vizier/vizHelp/1.htx#ucd and
173-
http://cds.u-strasbg.fr/w/doc/UCD/
174183
include_obsolete : bool, optional
175184
If set to True, catalogs marked obsolete will also be returned.
176185
max_catalogs : int or None
@@ -201,8 +210,7 @@ def find_catalogs(self, keywords, include_obsolete=False, verbose=False,
201210

202211
data_payload = {'-words': keywords, '-meta.all': 1}
203212

204-
ucd_ = self._schema_ucd.validate(ucd)
205-
data_payload['-ucd'] = ucd_
213+
data_payload['-ucd'] = self.ucd
206214

207215
if max_catalogs is not None:
208216
data_payload['-meta.max'] = max_catalogs

0 commit comments

Comments
 (0)