Skip to content

Commit 0e01fde

Browse files
committed
Renamed query_sso_maps -> query_sso
1 parent 5f5abe0 commit 0e01fde

File tree

3 files changed

+20
-20
lines changed

3 files changed

+20
-20
lines changed

astroquery/esasky/core.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ def find_sso(self, sso_name, *, sso_type="ALL", cache=True):
444444
except (HTTPError, ConnectionError) as err:
445445
log.error("Connection failed with {}.".format(err))
446446

447-
def query_sso_maps(self, sso_name, *, sso_type="ALL", missions=__ALL_STRING,
447+
def query_sso(self, sso_name, *, sso_type="ALL", missions=__ALL_STRING,
448448
row_limit=DEFAULT_ROW_LIMIT):
449449
"""
450450
This method performs a crossmatch on the chosen solar system object
@@ -482,9 +482,9 @@ def query_sso_maps(self, sso_name, *, sso_type="ALL", missions=__ALL_STRING,
482482
483483
Examples
484484
--------
485-
query_sso_maps(sso_name="Pallas", missions="HST")
486-
query_sso_maps(sso_name="503", sso_type="SATELLITE")
487-
query_sso_maps(sso_name="503", sso_type="SATELLITE", missions=["XMM", "HST"])
485+
query_sso(sso_name="Pallas", missions="HST")
486+
query_sso(sso_name="503", sso_type="SATELLITE")
487+
query_sso(sso_name="503", sso_type="SATELLITE", missions=["XMM", "HST"])
488488
"""
489489
sso = self.find_sso(sso_name=sso_name, sso_type=sso_type)
490490
if len(sso) == 0:
@@ -560,7 +560,7 @@ def get_images_sso(self, *, sso_name=None, sso_type="ALL", table_list=None, miss
560560
table_list : `~astroquery.utils.TableList` or dict or list of (name, `~astropy.table.Table`) pairs
561561
A TableList or dict or list of name and Table pairs with all the
562562
missions wanted and their respective metadata. Usually the
563-
return value of query_sso_maps.
563+
return value of query_sso.
564564
missions : str or list, optional
565565
Can be either a specific mission or a list of missions (all mission
566566
names are found in list_sso()) or 'all' to search in all
@@ -593,7 +593,7 @@ def get_images_sso(self, *, sso_name=None, sso_type="ALL", table_list=None, miss
593593
get_images_sso(sso_name="503", sso_type="SATELLITE")
594594
get_images_sso(sso_name="503", sso_type="SATELLITE", missions=["XMM", "HST"])
595595
596-
table = ESASky.query_sso_maps(sso_name="503", sso_type="SATELLITE", missions=["XMM", "HST"])
596+
table = ESASky.query_sso(sso_name="503", sso_type="SATELLITE", missions=["XMM", "HST"])
597597
table["XMM"].remove_rows([1, 18, 23])
598598
get_images_sso(table_list=table, missions="XMM")
599599
@@ -605,7 +605,7 @@ def get_images_sso(self, *, sso_name=None, sso_type="ALL", table_list=None, miss
605605
sso_name = self._sanitize_input_sso_name(sso_name)
606606
sso_type = self._sanitize_input_sso_type(sso_type)
607607
if table_list is None:
608-
map_query_result = self.query_sso_maps(sso_name=sso_name, sso_type=sso_type, missions=sanitized_missions)
608+
map_query_result = self.query_sso(sso_name=sso_name, sso_type=sso_type, missions=sanitized_missions)
609609
else:
610610
map_query_result = self._sanitize_input_table_list(table_list)
611611

astroquery/esasky/tests/test_esasky_remote.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -290,30 +290,30 @@ def test_get_columns(self):
290290
assert isinstance(columns[0], TapColumn)
291291
assert len(column_names) == len(columns)
292292

293-
def test_esasky_query_sso_maps(self):
294-
result = ESASkyClass.query_sso_maps(sso_name="ceres")
293+
def test_esasky_query_sso(self):
294+
result = ESASkyClass.query_sso(sso_name="ceres")
295295
assert isinstance(result, TableList)
296296
assert "HST" in result.keys()
297297
assert "XMM" in result.keys()
298298
assert "HERSCHEL" in result.keys()
299299
assert len(result["HST"]) >= 176
300300

301-
result = ESASkyClass.query_sso_maps(sso_name="ceres", missions="HST", row_limit=1)
301+
result = ESASkyClass.query_sso(sso_name="ceres", missions="HST", row_limit=1)
302302
assert isinstance(result, TableList)
303303
assert "HST" in result.keys()
304304
assert "XMM" not in result.keys()
305305
assert "HERSCHEL" not in result.keys()
306306
assert len(result["HST"]) == 1
307307

308-
result = ESASkyClass.query_sso_maps(sso_name="io", sso_type="SATELLITE", missions=["HST", "XMM"])
308+
result = ESASkyClass.query_sso(sso_name="io", sso_type="SATELLITE", missions=["HST", "XMM"])
309309
assert isinstance(result, TableList)
310310
assert "HST" in result.keys()
311311
assert "XMM" in result.keys()
312312
assert "HERSCHEL" not in result.keys()
313313

314-
def test_esasky_query_sso_maps_ambiguous_name(self):
314+
def test_esasky_query_sso_ambiguous_name(self):
315315
try:
316-
ESASkyClass.query_sso_maps(sso_name="io")
316+
ESASkyClass.query_sso(sso_name="io")
317317
except ValueError as err:
318318
assert 'Try narrowing your search' in str(err)
319319
return
@@ -339,7 +339,7 @@ def test_esasky_get_images_sso(self):
339339
if not os.path.exists(download_directory):
340340
os.makedirs(download_directory)
341341

342-
table_list = ESASkyClass.query_sso_maps(sso_name="ceres")
342+
table_list = ESASkyClass.query_sso(sso_name="ceres")
343343
assert "HERSCHEL" in table_list.keys()
344344
fits_files = ESASkyClass.get_images_sso(table_list=table_list, missions="XMM",
345345
download_dir=download_directory)

docs/esasky/esasky.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ There are three very similar query objects methods in this module
8686
:meth:`~astroquery.esasky.ESASkyClass.query_object_maps`, and
8787
:meth:`~astroquery.esasky.ESASkyClass.query_object_spectra`.
8888
There is also a method for querying SSO object
89-
:meth:`~astroquery.esasky.ESASkyClass.query_sso_maps`
89+
:meth:`~astroquery.esasky.ESASkyClass.query_sso`
9090
which is covered in its own section further down.
9191

9292
For catalogs, the query returns a maximum of 10000 sources per mission by
@@ -408,14 +408,14 @@ time the images were being taken.
408408
`Read more about the ESASky SSO feature
409409
<https://www.cosmos.esa.int/web/esdc/esasky-interface#SSO>`__
410410
You can access the results of this crossmatch by using
411-
:meth:`astroquery.esasky.ESASkyClass.query_sso_maps` which
411+
:meth:`astroquery.esasky.ESASkyClass.query_sso` which
412412
works like the other query methods, but it takes an SSO
413413
name as input instead of a position.
414414
415415
.. code-block:: python
416416
417417
>>> from astroquery.esasky import ESASky
418-
>>> result = ESASky.query_sso_maps(sso_name="Pallas", missions=["XMM", "HST"])
418+
>>> result = ESASky.query_sso(sso_name="Pallas", missions=["XMM", "HST"])
419419
420420
In some cases an SSO name is ambiguous, in which case you
421421
may need to use a more precise SSO name or specify the
@@ -424,7 +424,7 @@ SSO type of the desired object. For example:
424424
.. code-block:: python
425425
426426
>>> from astroquery.esasky import ESASky
427-
>>> ESASky.query_sso_maps(sso_name="503")
427+
>>> ESASky.query_sso(sso_name="503")
428428
INFO: Found 4 SSO's with name: 503.
429429
Try narrowing your search by typing a more specific sso_name.
430430
You can also narrow your search by specifying the sso_type.
@@ -440,7 +440,7 @@ In this case, you can specify the sso_type
440440
441441
.. code-block:: python
442442
>>> from astroquery.esasky import ESASky
443-
>>> ESASky.query_sso_maps(sso_name="503", sso_type="SATELLITE")
443+
>>> ESASky.query_sso(sso_name="503", sso_type="SATELLITE")
444444
445445
446446
You can see the available missions with:
@@ -465,7 +465,7 @@ in get_maps by doing something like this:
465465
466466
.. code-block:: python
467467
>>> from astroquery.esasky import ESASky
468-
>>> table_list_from_query_maps=ESASky.query_sso_maps(sso_name="ganymede", missions="XMM")
468+
>>> table_list_from_query_maps=ESASky.query_sso(sso_name="ganymede", missions="XMM")
469469
>>> table_list_from_query_maps['XMM'].remove_rows(list(range(0, 32)))
470470
>>> images=ESASky.get_images_sso(table_list=table_list_from_query_maps)
471471

0 commit comments

Comments
 (0)