Skip to content

Commit a226142

Browse files
authored
Merge pull request #1922 from keflavich/minor_docfix
Minor docstring/whitespace fixes
2 parents d2664cc + 549b327 commit a226142

File tree

2 files changed

+16
-12
lines changed

2 files changed

+16
-12
lines changed

astroquery/esasky/core.py

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,8 @@ def list_spectra(self):
9696
self._get_spectra_json(), self.__MISSION_STRING)
9797

9898
def query_object_maps(self, position, missions=__ALL_STRING,
99-
get_query_payload=False, cache=True, row_limit=DEFAULT_ROW_LIMIT):
99+
get_query_payload=False, cache=True,
100+
row_limit=DEFAULT_ROW_LIMIT):
100101
"""
101102
This method queries a chosen object or coordinate for all available maps
102103
which have observation data on the chosen position. It returns a
@@ -201,7 +202,8 @@ def query_object_catalogs(self, position, catalogs=__ALL_STRING,
201202
cache=cache)
202203

203204
def query_object_spectra(self, position, missions=__ALL_STRING,
204-
get_query_payload=False, cache=True, row_limit=DEFAULT_ROW_LIMIT):
205+
get_query_payload=False, cache=True,
206+
row_limit=DEFAULT_ROW_LIMIT):
205207
"""
206208
This method queries a chosen object or coordinate for all available missions
207209
which have spectral data on the chosen position. It returns a
@@ -253,7 +255,8 @@ def query_object_spectra(self, position, missions=__ALL_STRING,
253255
row_limit=row_limit)
254256

255257
def query_region_maps(self, position, radius, missions=__ALL_STRING,
256-
get_query_payload=False, cache=True, row_limit=DEFAULT_ROW_LIMIT):
258+
get_query_payload=False, cache=True,
259+
row_limit=DEFAULT_ROW_LIMIT):
257260
"""
258261
This method queries a chosen region for all available maps and returns a
259262
TableList with all the found maps metadata for the chosen missions and
@@ -387,7 +390,8 @@ def query_region_catalogs(self, position, radius, catalogs=__ALL_STRING,
387390
return commons.TableList(query_result)
388391

389392
def query_region_spectra(self, position, radius, missions=__ALL_STRING,
390-
row_limit=DEFAULT_ROW_LIMIT, get_query_payload=False, cache=True):
393+
row_limit=DEFAULT_ROW_LIMIT,
394+
get_query_payload=False, cache=True):
391395
"""
392396
This method queries a chosen region for all available spectra and returns a
393397
TableList with all the found spectra metadata for the chosen missions and
@@ -524,8 +528,9 @@ def get_maps(self, query_table_list, missions=__ALL_STRING,
524528
log.info("No maps found.")
525529
return maps
526530

527-
def get_images(self, position, radius=__ZERO_ARCMIN_STRING, missions=__ALL_STRING,
528-
download_dir=_MAPS_DOWNLOAD_DIR, cache=True):
531+
def get_images(self, position, radius=__ZERO_ARCMIN_STRING,
532+
missions=__ALL_STRING, download_dir=_MAPS_DOWNLOAD_DIR,
533+
cache=True):
529534
"""
530535
This method gets the fits files available for the selected position and
531536
mission and downloads all maps to the the selected folder.
@@ -569,7 +574,6 @@ def get_images(self, position, radius=__ZERO_ARCMIN_STRING, missions=__ALL_STRIN
569574
Examples
570575
--------
571576
get_images("m101", "14'", "all")
572-
573577
"""
574578
sanitized_position = self._sanitize_input_position(position)
575579
sanitized_radius = self._sanitize_input_radius(radius)
@@ -601,8 +605,9 @@ def get_images(self, position, radius=__ZERO_ARCMIN_STRING, missions=__ALL_STRIN
601605
log.info("No maps found.")
602606
return maps
603607

604-
def get_spectra(self, position, radius=__ZERO_ARCMIN_STRING, missions=__ALL_STRING,
605-
download_dir=_SPECTRA_DOWNLOAD_DIR, cache=True):
608+
def get_spectra(self, position, radius=__ZERO_ARCMIN_STRING,
609+
missions=__ALL_STRING, download_dir=_SPECTRA_DOWNLOAD_DIR,
610+
cache=True):
606611
"""
607612
This method gets the fits files available for the selected position and
608613
mission and downloads all spectra to the the selected folder.
@@ -677,7 +682,7 @@ def get_spectra(self, position, radius=__ZERO_ARCMIN_STRING, missions=__ALL_STRI
677682
return spectra
678683

679684
def get_spectra_from_table(self, query_table_list, missions=__ALL_STRING,
680-
download_dir=_SPECTRA_DOWNLOAD_DIR, cache=True):
685+
download_dir=_SPECTRA_DOWNLOAD_DIR, cache=True):
681686
"""
682687
This method takes the dictionary of missions and metadata as returned by
683688
query_region_spectra and downloads all spectra to the selected folder.
@@ -723,7 +728,6 @@ def get_spectra_from_table(self, query_table_list, missions=__ALL_STRING,
723728
--------
724729
table = query_region_spectra("m101", "14'", ["HST-IR", "XMM-NEWTON", "HERSCHEL"])
725730
get_spectra_from_table(table)
726-
727731
"""
728732
sanitized_query_table_list = self._sanitize_input_table_list(query_table_list)
729733
sanitized_missions = [m.lower() for m in self._sanitize_input_spectra(missions)]

docs/esasky/esasky.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ To see the result:
104104
.. code-block:: python
105105
106106
>>> print(result)
107-
TableList with 9 tables:
107+
TableList with 9 tables:
108108
'0:ALLWISE' with 13 column(s) and 1 row(s)
109109
'1:TWOMASS' with 9 column(s) and 3 row(s)
110110
'2:CHANDRA-SC2' with 41 column(s) and 9 row(s)

0 commit comments

Comments
 (0)