Skip to content

Commit

Permalink
Merge pull request #2721 from bsipocz/DOC_fixing_failing_doc_examples
Browse files Browse the repository at this point in the history
DOC: fixing examples that caused remote test failures
  • Loading branch information
bsipocz authored Apr 28, 2023
2 parents 6fe15b7 + 486a777 commit 88d4921
Show file tree
Hide file tree
Showing 10 changed files with 84 additions and 92 deletions.
34 changes: 17 additions & 17 deletions docs/casda/casda.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ For example:
obs_publisher_did s_ra s_dec obs_release_date
deg deg
----------------- --------------- ---------------- ------------------------
cube-11460 326.52250211117 -43.891190432671 2020-11-18T09:49:27.134Z
cube-11461 326.52250211117 -43.891190432671 2020-11-18T09:49:27.134Z
cube-11462 326.52250211117 -43.891190432671 2020-11-18T09:49:27.134Z
cube-11463 326.52250211117 -43.891190432671 2020-11-18T09:49:27.134Z
cube-11464 326.52250211117 -43.891190432671 2020-11-18T09:49:27.134Z
cube-1170 333.70448386919 -45.966341151806 2019-01-30T13:00:00.000Z
cube-60339 333.74878924962 -46.50601666028 2022-03-18T00:32:52.674Z
cube-60338 333.74878924962 -46.50601666028 2022-03-18T00:32:52.674Z
cube-60337 333.74878924962 -46.50601666028 2022-03-18T00:32:52.674Z
cube-60336 333.74878924962 -46.50601666028 2022-03-18T00:32:52.674Z


In most cases only public data is required. While most ASKAP data is public, some data products may not be released for quality reasons.
Expand All @@ -49,11 +49,11 @@ For example to filter out the 30 non-public results from the above data set:
obs_publisher_did s_ra s_dec obs_release_date
deg deg
----------------- --------------- ---------------- ------------------------
cube-11460 326.52250211117 -43.891190432671 2020-11-18T09:49:27.134Z
cube-11461 326.52250211117 -43.891190432671 2020-11-18T09:49:27.134Z
cube-11462 326.52250211117 -43.891190432671 2020-11-18T09:49:27.134Z
cube-11463 326.52250211117 -43.891190432671 2020-11-18T09:49:27.134Z
cube-11464 326.52250211117 -43.891190432671 2020-11-18T09:49:27.134Z
cube-1170 333.70448386919 -45.966341151806 2019-01-30T13:00:00.000Z
cube-60339 333.74878924962 -46.50601666028 2022-03-18T00:32:52.674Z
cube-60338 333.74878924962 -46.50601666028 2022-03-18T00:32:52.674Z
cube-60337 333.74878924962 -46.50601666028 2022-03-18T00:32:52.674Z
cube-60336 333.74878924962 -46.50601666028 2022-03-18T00:32:52.674Z


Authentication
Expand All @@ -71,7 +71,7 @@ date. To change user-registration details, or to request a new OPAL password,
use the link to 'Log in or reset password'.

To use download tasks, you should create an instance of the ``Casda`` class
and call the :meth:`~astroquery.casda.CasdaClass.login` method with a username. The password will either be taken
and call the :meth:`~astroquery.casda.CasdaClass.login` method with a username. The password will either be taken
from the keyring, or if in an interactive environment then it will be requested. e.g.:

.. doctest-skip::
Expand All @@ -90,14 +90,14 @@ Data Access

.. versionadded:: 0.4.4

In order to access data in CASDA you must first stage the data using the :meth:`~astroquery.casda.CasdaClass.stage_data`
In order to access data in CASDA you must first stage the data using the :meth:`~astroquery.casda.CasdaClass.stage_data`
method.
This is because only some of the data in CASDA is held on disc at any particular time.
The :meth:`~astroquery.casda.CasdaClass.stage_data` method should be passed an astropy Table object containing an
The :meth:`~astroquery.casda.CasdaClass.stage_data` method should be passed an astropy Table object containing an
'access_url' column.
This column should contain the datalink address of the data product.

Once the data has been assembled you can then download the data using the :meth:`~astroquery.casda.CasdaClass.download_files`
Once the data has been assembled you can then download the data using the :meth:`~astroquery.casda.CasdaClass.download_files`
method, or using tools such as wget.
Authentication is required when staging the data, but not for the download.

Expand Down Expand Up @@ -128,9 +128,9 @@ Cutouts

As well as accessing full data products, the CASDA service can produce cutout images and cubes from larger data products.
The cutout support in AstroQuery allows both spatial and spectral cutouts.
To produce a spatial cutout, pass in a coordinate and either a radius or a height and a width to the
To produce a spatial cutout, pass in a coordinate and either a radius or a height and a width to the
:meth:`~astroquery.casda.CasdaClass.cutout` method.
To produce a spectral cutout, pass in either a band or a channel value.
To produce a spectral cutout, pass in either a band or a channel value.
For band, the value must be a list or tuple of two `astropy.units.Quantity` objects specifying a low and high frequency
or wavelength. For an open ended range use `None` as the open value.
For channel, the value must be a list or tuple of two integers specifying the low and high channels (i.e. planes of a
Expand Down Expand Up @@ -176,7 +176,7 @@ is shown below:
>>> url_list = casda.cutout(eridanus_cube, coordinates=centre, radius=9*u.arcmin, band=freq)
>>> filelist = casda.download_files(url_list, savedir='/tmp')

An example script to download a 3D cutout of a spectral channel range from the WALLABY Pre-Pilot Eridanus cube
An example script to download a 3D cutout of a spectral channel range from the WALLABY Pre-Pilot Eridanus cube
is shown below:

.. doctest-skip::
Expand Down
45 changes: 18 additions & 27 deletions docs/imcce/imcce.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ looks like this:
>>> epoch = Time('2019-05-29 21:42', format='iso')
>>> results = Skybot.cone_search(field, 5*u.arcmin, epoch)
>>> results.pprint(max_width=80) # doctest: +IGNORE_OUTPUT
Number Name RA ... vy vz epoch
deg ... AU / d AU / d d
Number Name RA ... vy vz epoch
deg ... AU / d AU / d d
------ ---------- -------------------- ... ----------- ----------- ---------
-- 2012 BO42 0.019414999999999998 ... 0.009345668 0.005003011 2458630.0
516566 2007 DH36 0.005546249999999999 ... 0.00855646 0.002875928 2458630.0
Expand Down Expand Up @@ -184,31 +184,22 @@ Pallas over an entire year with a time step of 1 day:
>>> from astroquery.imcce import Miriade
>>> Miriade.get_ephemerides('Pallas', epoch='2019-01-01',
... epoch_step='1d', epoch_nsteps=365)
<Table length=365>
target epoch RA ... DEC_rate delta_rate
d deg ... arcsec / min km / s
str20 float64 float64 ... float64 float64
------ -------------------- ------------------ ... ------------ ------------
Pallas 2458484.5 200.58650874999998 ... 0.15854 -19.3678463
Pallas 2458485.5 200.92693874999998 ... 0.16727 -19.4137948
Pallas 2458486.5 201.2641095833333 ... 0.17613 -19.4552689
Pallas 2458487.5 201.59795375 ... 0.18511 -19.4921153
Pallas 2458488.5 201.9284045833333 ... 0.19421 -19.5242013
Pallas 2458489.5 202.25539499999996 ... 0.20344 -19.5514142
Pallas 2458490.5 202.57885874999997 ... 0.21278 -19.5736602
Pallas 2458491.5 202.89872916666664 ... 0.22224 -19.5908624
Pallas 2458492.5 203.21494124999998 ... 0.23181 -19.6029579
... ... ... ... ... ...
Pallas 2458839.5 259.6145529166667 ... 0.0069182 -1.4120214
Pallas 2458840.5 259.9944454166666 ... 0.011429 -1.6321428
Pallas 2458841.5 260.37380541666664 ... 0.015948 -1.85224
Pallas 2458842.5 260.75260416666663 ... 0.020475 -2.0721423
Pallas 2458843.5 261.13081083333327 ... 0.025007 -2.2916829
Pallas 2458844.5 261.5083958333333 ... 0.029542 -2.5107107
Pallas 2458845.5 261.88532958333326 ... 0.034077 -2.729099
Pallas 2458846.5 262.2615825 ... 0.038612 -2.946749
Pallas 2458847.5 262.63712708333327 ... 0.043144 -3.1635882
Pallas 2458848.5 263.011935 ... 0.047672 -3.3795665
<Table length=365>
target epoch RA ... DEC_rate delta_rate
d deg ... arcsec / min km / s
str20 float64 float64 ... float64 float64
------ -------------------- ------------------ ... ------------ ------------
Pallas 2458484.5 200.58653041666665 ... 0.15854 -19.3678426
Pallas 2458485.5 200.92696041666662 ... 0.16727 -19.4137911
Pallas 2458486.5 201.2641308333333 ... 0.17613 -19.4552654
Pallas 2458487.5 201.59797541666663 ... 0.18511 -19.4921119
Pallas 2458488.5 201.92842624999997 ... 0.19421 -19.5241979
... ... ... ... ... ...
Pallas 2458844.5 261.5083995833333 ... 0.029542 -2.5107101
Pallas 2458845.5 261.8853333333333 ... 0.034077 -2.7290984
Pallas 2458846.5 262.26158625 ... 0.038612 -2.9467484
Pallas 2458847.5 262.63713083333334 ... 0.043144 -3.1635878
Pallas 2458848.5 263.01193875 ... 0.047672 -3.3795661


The observer location is defined through the ``location`` keyword,
Expand Down
8 changes: 4 additions & 4 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,10 @@ queries based on coordinates or object names. Some simple examples, using SIMBA
>>> from astroquery.simbad import Simbad
>>> result_table = Simbad.query_object("m1")
>>> result_table.pprint()
MAIN_ID RA DEC ... COO_WAVELENGTH COO_BIBCODE SCRIPT_NUMBER_ID
"h:m:s" "d:m:s" ...
------- -------- -------- ... -------------- ----------- ----------------
M 1 05 34 32 +22 00.8 ... R 1
MAIN_ID RA DEC ... COO_BIBCODE SCRIPT_NUMBER_ID
"h:m:s" "d:m:s" ...
------- ---------- --------- ... ------------------- ----------------
M 1 05 34 30.9 +22 00 53 ... 1995AuJPh..48..143S 1

All query tools allow coordinate-based queries:

Expand Down
37 changes: 19 additions & 18 deletions docs/ipac/ned/ned.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ instance if you want to query NGC 224
No. Object Name RA ... Redshift Points Diameter Points Associations
degrees ...
--- ----------- ---------- ... --------------- --------------- ------------
1 MESSIER 031 10.68479 ... 39 13 2
1 MESSIER 031 10.68479 ... 40 13 2


Query a region
Expand Down Expand Up @@ -58,11 +58,11 @@ specified. By default this is J2000.0 but can also be set to B1950.0.
3 SSTSL2 J122855.23+020341.5 187.23013 ... 0 0
4 SSTSL2 J122855.36+020346.9 187.23068 ... 0 0
... ... ... ... ... ...
863 SSTSL2 J122918.24+020330.7 187.326 ... 0 0
864 SDSS J122918.38+020323.4 187.3266 ... 4 0
865 SSTSL2 J122918.52+020338.9 187.32718 ... 0 0
866 SSTSL2 J122918.64+020326.7 187.32767 ... 0 0
Length = 866 rows
864 SSTSL2 J122918.24+020330.7 187.326 ... 0 0
865 SDSS J122918.38+020323.4 187.3266 ... 4 0
866 SSTSL2 J122918.52+020338.9 187.32718 ... 0 0
867 SSTSL2 J122918.64+020326.7 187.32767 ... 0 0
Length = 867 rows


Instead of using the name, the target may also be specified via
Expand Down Expand Up @@ -220,7 +220,8 @@ Similarly the list of URLs for spectra of a particular object may be fetched:
>>> spectra_list
['http://ned.ipac.caltech.edu/spc1/1992/1992ApJS...80..109B/PG_1226+023:S:B_V:bg1992.fits.gz',
'http://ned.ipac.caltech.edu/spc1/2009/2009A+A...495.1033B/3C_273:S:B:bcc2009.fits.gz',
'http://ned.ipac.caltech.edu/spc1/2009/2009A+A...495.1033B/3C_273:S:RI:bcc2009.fits.gz']
...
'http://ned.ipac.caltech.edu/spc1/2016/2016ApJS..226...19F/3C_273:S:CII158.3x3.fits.gz']


Fetching other data tables for an object
Expand Down Expand Up @@ -251,17 +252,17 @@ for the specified object. We look at a simple example:
8 12h29m06.7001s ... Uncertain origin
9 12h29m06.7001s ... Uncertain origin
... ... ... ... ...
138 12h29m06.05s ... Broad-band measurement From new, raw data
139 12h29m06.5s ... Broad-band measurement From new, raw data
140 12h29m06.5s ... Broad-band measurement From reprocessed raw data
141 12h29m09.0s ... Uncertain origin
142 12h29m08.9s ... Uncertain origin
143 12h29m07.9s ... Uncertain origin
144 12h29m04s ... Uncertain origin
145 12h29m06s ... Uncertain origin
146 12h29m08s ... Uncertain origin
147 12h29m06s ... Uncertain origin
Length = 148 rows
144 12h29m06.05s ... Broad-band measurement From new, raw data
145 12h29m06.5s ... Broad-band measurement From new, raw data
146 12h29m06.5s ... Broad-band measurement From reprocessed raw data
147 12h29m09.0s ... Uncertain origin
148 12h29m08.9s ... Uncertain origin
149 12h29m07.9s ... Uncertain origin
150 12h29m04s ... Uncertain origin
151 12h29m06s ... Uncertain origin
152 12h29m08s ... Uncertain origin
153 12h29m06s ... Uncertain origin
Length = 154 rows


Reference/API
Expand Down
1 change: 1 addition & 0 deletions docs/ipac/nexsci/nasa_exoplanet_archive.rst
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ A list of accessible tables can be found in the ``TAP_TABLES`` attribute:
>>> NasaExoplanetArchive.TAP_TABLES
['superwasptimeseries',
'kelttimeseries',
'DI_STARS_EXEP',
'transitspec',
'emissionspec',
'ps',
Expand Down
28 changes: 14 additions & 14 deletions docs/jplhorizons/jplhorizons.rst
Original file line number Diff line number Diff line change
Expand Up @@ -434,19 +434,19 @@ We can select several columns at a time, for instance RA and DEC for each epoch
.. code-block:: python
>>> print(eph['datetime_str', 'RA', 'DEC']) # doctest: +REMOTE_DATA
datetime_str RA DEC
--- deg deg
----------------- --------- --------
2010-Jan-01 00:00 345.50204 13.43621
2011-Jan-01 00:00 78.77158 61.48831
2012-Jan-01 00:00 119.85659 54.21955
2013-Jan-01 00:00 136.60021 45.8241
2014-Jan-01 00:00 147.44947 37.79876
2015-Jan-01 00:00 156.58967 29.23058
2016-Jan-01 00:00 166.32129 18.48174
2017-Jan-01 00:00 180.6992 1.20453
2018-Jan-01 00:00 232.11974 -37.9554
2019-Jan-01 00:00 16.1066 45.50296
datetime_str RA DEC
--- deg deg
----------------- --------- --------
2010-Jan-01 00:00 345.50204 13.43621
2011-Jan-01 00:00 78.77158 61.48831
2012-Jan-01 00:00 119.85659 54.21955
2013-Jan-01 00:00 136.60021 45.82409
2014-Jan-01 00:00 147.44947 37.79876
2015-Jan-01 00:00 156.58967 29.23058
2016-Jan-01 00:00 166.32129 18.48174
2017-Jan-01 00:00 180.6992 1.20453
2018-Jan-01 00:00 232.11974 -37.9554
2019-Jan-01 00:00 16.1066 45.50296
We can use the same representation to do math with these columns. For instance,
Expand Down Expand Up @@ -646,4 +646,4 @@ Reference/API
.. _astropy units: http://docs.astropy.org/en/stable/units/index.html
.. _Definition of Observer Table Quantities: https://ssd.jpl.nasa.gov/horizons/manual.html#observer-table
.. _Horizons documentation: https://ssd.jpl.nasa.gov/horizons/manual.html#observer-table
.. _this section of the Horizons manual: <https://ssd.jpl.nasa.gov/horizons/manual.html#center>
.. _this section of the Horizons manual: <https://ssd.jpl.nasa.gov/horizons/manual.html#center>
4 changes: 2 additions & 2 deletions docs/linelists/cdms/cdms.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ each setting yields:
... get_query_payload=False)
>>> response.pprint(max_width=120)
FREQ ERR LGINT DR ELO GUP MOLWT TAG QNFMT Ju Ku vu F1u F2u F3u Jl Kl vl F1l F2l F3l name Lab
MHz MHz MHz nm2 1 / cm u
MHz MHz nm2 MHz 1 / cm u
----------- ------ ------- --- -------- --- ----- --- ----- --- --- --- --- --- --- --- --- --- --- --- --- ------- ----
115271.2018 0.0005 -5.0105 2 0.0 3 28 503 101 1 -- -- -- -- -- 0 -- -- -- -- -- CO, v=0 True
230538.0 0.0005 -4.1197 2 3.845 5 28 503 101 2 -- -- -- -- -- 1 -- -- -- -- -- CO, v=0 True
Expand Down Expand Up @@ -76,7 +76,7 @@ The units of the columns of the query can be displayed by calling
----- ------- ------- ------------ -----
FREQ float64 MHz Column 0
ERR float64 MHz Column 0
LGINT float64 MHz nm2 Column 0
LGINT float64 nm2 MHz Column 0
DR int64 Column 0
ELO float64 1 / cm Column 0
GUP int64 Column 0
Expand Down
Loading

0 comments on commit 88d4921

Please sign in to comment.