Skip to content

Commit d9ebaa2

Browse files
committed
Fix sphinx warnings
1 parent 0ffa05c commit d9ebaa2

File tree

5 files changed

+84
-75
lines changed

5 files changed

+84
-75
lines changed

astroquery/alma/core.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
from bs4 import BeautifulSoup
1313
import pyvo
1414

15-
1615
from six.moves.urllib_parse import urljoin
1716
import six
1817
from astropy.table import Table, Column, vstack
@@ -545,18 +544,19 @@ def get_data_info(self, uids, expand_tarfiles=False,
545544

546545
"""
547546
Return information about the data associated with ALMA uid(s)
547+
548548
Parameters
549549
----------
550-
uids: list or str
550+
uids : list or str
551551
A list of valid UIDs or a single UID.
552552
UIDs should have the form: 'uid://A002/X391d0b/X7b'
553-
expand_tarfiles: bool
553+
expand_tarfiles : bool
554554
False to return information on the tarfiles packages containing
555555
the data or True to return information about individual files in
556556
these packages
557-
with_auxiliary: bool
557+
with_auxiliary : bool
558558
True to include the auxiliary packages, False otherwise
559-
with_rawdata: bool
559+
with_rawdata : bool
560560
True to include raw data, False otherwise
561561
562562
Returns

astroquery/esa/xmm_newton/core.py

Lines changed: 52 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -311,23 +311,14 @@ def get_epic_spectra(self, filename, source_number, *,
311311
instrument=[], path="", verbose=False):
312312
"""Extracts in path (when set) the EPIC sources spectral products from a
313313
given TAR file.
314-
For a given TAR file obtained with:
315-
XMM.download_data(OBS_ID,level="PPS",extension="FTZ",filename=tarfile)
314+
316315
This function extracts the EPIC sources spectral products in a given
317316
instrument (or instruments) from it
318317
The result is a dictionary containing the paths to the extracted EPIC
319318
sources spectral products with key being the instrument
320319
If the instrument is not specified this function will
321320
return all the available instruments
322321
323-
Examples:
324-
Extracting all bands and instruments:
325-
result = XMM.get_epic_spectra(tarfile,83,
326-
instrument=['M1','M2','PN'])
327-
If we want to retrieve the source spectrum of the instrument PN
328-
fits_image = result['PN']
329-
fits_image will be the full path to the extracted FTZ file
330-
331322
Parameters
332323
----------
333324
filename : string, mandatory
@@ -354,6 +345,18 @@ def get_epic_spectra(self, filename, source_number, *,
354345
The structure and the content of the extracted compressed FITS files
355346
are described in details in the Pipeline Products Description
356347
[XMM-SOC-GEN-ICD-0024](https://xmm-tools.cosmos.esa.int/external/xmm_obs_info/odf/data/docs/XMM-SOC-GEN-ICD-0024.pdf).
348+
349+
Examples
350+
--------
351+
Extracting all bands and instruments:
352+
353+
>>> result = XMM.get_epic_spectra(tarfile,83, instrument=['M1','M2','PN'])
354+
355+
To retrieve the source spectrum of the instrument PN.
356+
(The full path of the extracted FTZ file is returned.)
357+
358+
>>> fits_image = result['PN']
359+
357360
"""
358361
_instrument = ["M1", "M2", "PN", "EP"]
359362
_product_type = ["SRSPEC", "BGSPEC", "SRCARF"]
@@ -445,9 +448,6 @@ def get_epic_images(self, filename, band=[], instrument=[],
445448

446449
"""Extracts the EPIC images from a given TAR file
447450
448-
For a given TAR file obtained with:
449-
XMM.download_data(OBS_ID,level="PPS",extension="FTZ",filename=tarfile)
450-
451451
This function extracts the EPIC images in a given band (or bands) and
452452
instrument (or instruments) from it
453453
@@ -461,30 +461,6 @@ def get_epic_images(self, filename, band=[], instrument=[],
461461
If so, this function will also extract the exposure maps and detector
462462
masks within the specified bands and instruments
463463
464-
Examples
465-
--------
466-
467-
Extract all bands and instruments::
468-
result = XMM.get_epic_images(tarfile,band=[1,2,3,4,5,8],
469-
instrument=['M1','M2','PN'],**kwargs)
470-
471-
If we want to retrieve the band 3 for the instrument PN (p-n junction)::
472-
fits_image = result[3]['PN']
473-
474-
``fits_image`` will be the full path to the extracted FTZ file
475-
476-
Extract the exposure and detector maps::
477-
result = XMM.get_epic_images(tarfile,band=[1,2,3,4,5,8],
478-
instrument=['M1','M2','PN'],
479-
get_detmask=True,
480-
get_exposure_map=True)
481-
482-
If we want to retrieve exposure map in the band 3 for the instrument PN::
483-
fits_image = result[3]['PN_expo']
484-
485-
For retrieving the detector mask in the band 3 for the instrument PN::
486-
fits_image = result[3]['PN_det']
487-
488464
Parameters
489465
----------
490466
filename : string, mandatory
@@ -511,6 +487,33 @@ def get_epic_images(self, filename, band=[], instrument=[],
511487
The structure and the content of the extracted compressed FITS files
512488
are described in details in the Pipeline Products Description
513489
[XMM-SOC-GEN-ICD-0024](https://xmm-tools.cosmos.esa.int/external/xmm_obs_info/odf/data/docs/XMM-SOC-GEN-ICD-0024.pdf).
490+
491+
Examples
492+
--------
493+
494+
Extract all bands and instruments:
495+
496+
>>> result = XMM.get_epic_images(tarfile, band=[1,2,3,4,5,8], instrument=['M1','M2','PN'])
497+
498+
To retrieve the band 3 for the instrument PN (p-n junction):
499+
500+
>>> fits_image = result[3]['PN']
501+
502+
Extract the exposure and detector maps:
503+
504+
>>> result = XMM.get_epic_images(tarfile, band=[1, 2, 3, 4, 5, 8],
505+
instrument=['M1', 'M2', 'PN'],
506+
get_detmask=True,
507+
get_exposure_map=True)
508+
509+
To retrieve exposure map in the band 3 for the instrument PN:
510+
511+
>>> fits_image = result[3]['PN_expo']
512+
513+
To retrieve the detector mask in the band 3 for the instrument PN:
514+
515+
>>> fits_image = result[3]['PN_det']
516+
514517
"""
515518

516519
_product_type = ["IMAGE_"]
@@ -673,17 +676,6 @@ def get_epic_lightcurve(self, filename, source_number, *,
673676
If the instrument is not specified, this function will
674677
return all available instruments
675678
676-
Examples:
677-
678-
Extracting all instruments:
679-
result = XMM.get_epic_lightcurve(tarfile,146,
680-
instrument=['M1','M2','PN'])
681-
682-
If we want to retrieve the light curve of the instrument PN
683-
fits_image = result['PN']
684-
685-
fits_image will be the full path to the extracted FTZ file
686-
687679
Parameters
688680
----------
689681
filename : string, mandatory
@@ -708,6 +700,18 @@ def get_epic_lightcurve(self, filename, source_number, *,
708700
The structure and the content of the extracted compressed FITS files
709701
are described in details in the Pipeline Products Description
710702
[XMM-SOC-GEN-ICD-0024](https://xmm-tools.cosmos.esa.int/external/xmm_obs_info/odf/data/docs/XMM-SOC-GEN-ICD-0024.pdf).
703+
704+
Examples
705+
--------
706+
707+
Extracting all instruments:
708+
709+
>>> result = XMM.get_epic_lightcurve(tarfile, 146, instrument=['M1','M2', 'PN'])
710+
711+
To retrieve the light curve of the instrument PN:
712+
713+
>>> fits_image = result['PN']
714+
711715
"""
712716
_instrumnet = ["M1", "M2", "PN", "EP"]
713717
_band = [8]

astroquery/esasky/core.py

Lines changed: 24 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -599,10 +599,12 @@ def query_ids_maps(self, observation_ids, *, missions=__ALL_STRING, row_limit=DE
599599
600600
Examples
601601
--------
602-
query_ids_maps(observation_ids=['lbsk03vbq', 'ieag90010'], missions="HST-UV")
603-
query_ids_maps(observation_ids='lbsk03vbq')
604-
query_ids_maps(observation_ids=['lbsk03vbq', 'ieag90010', '1342221275', '1342221848'],
605-
missions=["Herschel", "HST-UV"])
602+
>>> query_ids_maps(observation_ids=['lbsk03vbq', 'ieag90010'], missions="HST-UV")
603+
604+
>>> query_ids_maps(observation_ids='lbsk03vbq')
605+
606+
>>> query_ids_maps(observation_ids=['lbsk03vbq', 'ieag90010', '1342221275', '1342221848'],
607+
... missions=["Herschel", "HST-UV"])
606608
"""
607609
sanitized_observation_ids = self._sanitize_input_ids(observation_ids)
608610
sanitized_missions = self._sanitize_input_mission(missions)
@@ -653,10 +655,12 @@ def query_ids_catalogs(self, source_ids, *, catalogs=__ALL_STRING, row_limit=DEF
653655
654656
Examples
655657
--------
656-
query_ids_catalogs(source_ids=['2CXO J090341.1-322609', '2CXO J090353.8-322642'], catalogs="CHANDRA-SC2")
657-
query_ids_catalogs(source_ids='2CXO J090341.1-322609')
658-
query_ids_catalogs(source_ids=['2CXO J090341.1-322609', '2CXO J090353.8-322642', '44899', '45057'],
659-
catalogs=["CHANDRA-SC2", "Hipparcos-2"])
658+
>>> query_ids_catalogs(source_ids=['2CXO J090341.1-322609', '2CXO J090353.8-322642'], catalogs="CHANDRA-SC2")
659+
660+
>>> query_ids_catalogs(source_ids='2CXO J090341.1-322609')
661+
662+
>>> query_ids_catalogs(source_ids=['2CXO J090341.1-322609', '2CXO J090353.8-322642', '44899', '45057'],
663+
... catalogs=["CHANDRA-SC2", "Hipparcos-2"])
660664
"""
661665
sanitized_catalogs = self._sanitize_input_catalogs(catalogs)
662666
sanitized_row_limit = self._sanitize_input_row_limit(row_limit)
@@ -847,13 +851,13 @@ def get_images(self, *, position=None, observation_ids=None, radius=__ZERO_ARCMI
847851
848852
Examples
849853
--------
850-
get_images(position="m101", radius="14'", missions="all")
854+
>>> get_images(position="m101", radius="14'", missions="all")
851855
852-
missions = ["SUZAKU", "ISO-IR", "Chandra", "XMM-OM-OPTICAL", "XMM", "XMM-OM-UV", "HST-IR", "Herschel",
853-
"Spitzer", "HST-UV", "HST-OPTICAL"]
854-
observation_ids = ["100001010", "01500403", "21171", "0852000101", "0851180201", "0851180201", "n3tr01c3q",
855-
"1342247257", "30002561-25100", "hst_07553_3h_wfpc2_f160bw_pc", "ocli05leq"]
856-
get_images(observation_ids=observation_ids, missions=missions)
856+
>>> missions = ["SUZAKU", "ISO-IR", "Chandra", "XMM-OM-OPTICAL", "XMM", "XMM-OM-UV", "HST-IR", "Herschel",
857+
... "Spitzer", "HST-UV", "HST-OPTICAL"]
858+
>>> observation_ids = ["100001010", "01500403", "21171", "0852000101", "0851180201", "0851180201", "n3tr01c3q",
859+
... "1342247257", "30002561-25100", "hst_07553_3h_wfpc2_f160bw_pc", "ocli05leq"]
860+
>>> get_images(observation_ids=observation_ids, missions=missions)
857861
"""
858862
if position is None and observation_ids is None:
859863
raise ValueError("An input is required for either position or observation_ids.")
@@ -943,12 +947,13 @@ def get_spectra(self, *, position=None, observation_ids=None, radius=__ZERO_ARCM
943947
944948
Examples
945949
--------
946-
get_spectra(position="m101", radius="14'", missions=["HST-IR", "XMM-NEWTON", "HERSCHEL"])
947950
948-
missions = ["ISO-IR", "Chandra", "IUE", "XMM-NEWTON", "HST-IR", "Herschel", "HST-UV", "HST-OPTICAL"]
949-
observation_ids = ["02101201", "1005", "LWR13178", "0001730201", "ibh706cqq", "1342253595", "z1ax0102t",
950-
"oeik2s020"]
951-
get_spectra(observation_ids=observation_ids, missions=missions)
951+
>>> get_spectra(position="m101", radius="14'", missions=["HST-IR", "XMM-NEWTON", "HERSCHEL"])
952+
953+
>>> missions = ["ISO-IR", "Chandra", "IUE", "XMM-NEWTON", "HST-IR", "Herschel", "HST-UV", "HST-OPTICAL"]
954+
>>> observation_ids = ["02101201", "1005", "LWR13178", "0001730201", "ibh706cqq",
955+
... "1342253595", "z1ax0102t", "oeik2s020"]
956+
>>> get_spectra(observation_ids=observation_ids, missions=missions)
952957
953958
"""
954959
if position is None and observation_ids is None:

docs/index.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ The following modules have been completed using a common API:
189189
hitran/hitran.rst
190190
ibe/ibe.rst
191191
irsa/irsa.rst
192-
irsa/irsa_dust.rst
192+
irsa_dust/irsa_dust.rst
193193
jplspec/jplspec.rst
194194
magpis/magpis.rst
195195
mast/mast.rst
@@ -260,7 +260,7 @@ for each source)
260260
gama/gama.rst
261261
ibe/ibe.rst
262262
irsa/irsa.rst
263-
irsa/irsa_dust.rst
263+
irsa_dust/irsa_dust.rst
264264
mast/mast.rst
265265
nasa_exoplanet_archive/nasa_exoplanet_archive.rst
266266
ned/ned.rst

docs/nasa_exoplanet_archive/nasa_exoplanet_archive.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ More information about the development of a more integrated NASA Exoplanet Archi
1414
fully TAP supported services can be found at [3]_.
1515

1616
*NOTE*: the ``exoplanet`` and ``exomultpars`` tables are no longer available and have been replaced by the
17-
Planetary Systems table (``ps``). Likewise, the `compositepars` table has been replaced by the
17+
Planetary Systems table (``ps``). Likewise, the ``compositepars`` table has been replaced by the
1818
Planetary Systems Composite Parameters table (``pscomppars``). Both the ``ps`` and ``pscomppars`` tables are accessible
1919
through the Exoplanet Archive TAP service. Database column names have changed;
2020
`this document <https://exoplanetarchive.ipac.caltech.edu/docs/API_PS_columns.html>`_ contains the current definitions

0 commit comments

Comments
 (0)