Skip to content

Commit 8b24c19

Browse files
authored
Merge pull request #2648 from bsipocz/MAINT_fixing_23Q1_remotes
MAINT: fixing numerous remote test failures
2 parents d2d6529 + 2f73f46 commit 8b24c19

File tree

10 files changed

+78
-96
lines changed

10 files changed

+78
-96
lines changed

astroquery/eso/tests/test_eso_remote.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
u'hawki', u'isaac', u'naco', u'visir', u'vircam', u'apex',
1111
u'giraffe', u'uves', u'xshooter', u'muse', u'crires',
1212
u'kmos', u'sinfoni', u'amber', u'midi', u'pionier',
13-
u'gravity', u'espresso', u'wlgsu', u'matisse']
13+
u'gravity', u'espresso', u'wlgsu', u'matisse', u'eris']
1414

1515
# Some tests take too long, leading to travis timeouts
1616
# TODO: make this a configuration item

astroquery/mpc/tests/test_mpc_remote.py

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,31 +9,33 @@
99
@pytest.mark.remote_data
1010
class TestMPC:
1111

12-
@pytest.mark.parametrize('type, name', [
12+
@pytest.mark.parametrize('target_type, name', [
1313
('asteroid', 'ceres'),
1414
('asteroid', 'eros'),
15-
('asteroid', 'vesta')])
16-
def test_query_object_valid_object_by_name(self, type, name):
17-
response = mpc.MPC.query_object_async(target_type=type, name=name)
15+
('asteroid', 'vesta'),
16+
('asteroid', 'pallas'),
17+
('asteroid', 'piszkesteto')])
18+
def test_query_object_valid_object_by_name(self, target_type, name):
19+
# Keep all 3 of the objects in the tests, too that used to cause issue
20+
# https://github.com/astropy/astroquery/issues/2531
21+
response = mpc.MPC.query_object_async(target_type=target_type, name=name)
1822
assert response.status_code == requests.codes.ok
1923
assert len(response.json()) == 1
2024
assert response.json()[0]['name'].lower() == name
2125

22-
@pytest.mark.parametrize('type, number', [
26+
@pytest.mark.parametrize('target_type, number', [
2327
('comet', '103P')])
24-
def test_query_object_valid_object_by_number(self, type, number):
25-
response = mpc.MPC.query_object_async(
26-
target_type=type, number=number)
28+
def test_query_object_valid_object_by_number(self, target_type, number):
29+
response = mpc.MPC.query_object_async(target_type=target_type, number=number)
2730
assert response.status_code == requests.codes.ok
2831
assert len(response.json()) == 1
2932
assert str(response.json()[0]['number']) + \
3033
response.json()[0]['object_type'] == number
3134

32-
@pytest.mark.parametrize('type, designation', [
35+
@pytest.mark.parametrize('target_type, designation', [
3336
('comet', 'C/2012 S1')])
34-
def test_query_object_valid_object_by_designation(self, type, designation):
35-
response = mpc.MPC.query_object_async(
36-
target_type=type, designation=designation)
37+
def test_query_object_valid_object_by_designation(self, target_type, designation):
38+
response = mpc.MPC.query_object_async(target_type=target_type, designation=designation)
3739
assert response.status_code == requests.codes.ok
3840
assert len(response.json()) == 1
3941
assert response.json()[0]['designation'].lower() == designation.lower()

astroquery/utils/commons.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,7 @@
3636
ASTROPY_LT_4_3 = not minversion('astropy', '4.3')
3737
ASTROPY_LT_5_0 = not minversion('astropy', '5.0')
3838

39-
ASTROPY_LT_5_1 = not minversion('astropy', '5.1dev197')
40-
# Update the line above once 5.1 is released
41-
# ASTROPY_LT_5_1 = not minversion('astropy', '5.1')
39+
ASTROPY_LT_5_1 = not minversion('astropy', '5.1')
4240

4341

4442
def radius_to_unit(radius, unit='degree'):

docs/cadc/cadc.rst

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ these collections:
4141
TESS : {'Description': 'The TESS collection at the CADC', 'Bands': ['Optical']}
4242
UKIRT : {'Description': 'The UKIRT collection at the CADC', 'Bands': ['Infrared|Optical', '', 'Optical', 'Infrared']}
4343
VGPS : {'Description': 'The VGPS collection at the CADC', 'Bands': ['Radio']}
44-
VLASS : {'Description': 'The VLASS collection at the CADC', 'Bands': ['', 'Radio']}
44+
VLASS : {'Description': 'The VLASS collection at the CADC', 'Bands': ['Radio']}
4545
WALLABY : {'Description': 'The WALLABY collection at the CADC', 'Bands': ['Radio']}
4646
XMM : {'Description': 'The XMM collection at the CADC', 'Bands': ['Optical', 'UV', 'X-ray']}
4747

@@ -51,7 +51,7 @@ region or by name. The following example queries CADC for Canada
5151
France Hawaii Telescope (CFHT) data for a given region and resolves
5252
the URLs for downloading the corresponding data.
5353

54-
54+
.. Remove IGNORE_WARNINGS once https://github.com/astropy/astroquery/issues/2523 is fixed
5555
.. doctest-remote-data::
5656

5757
>>> from astroquery.cadc import Cadc
@@ -73,7 +73,7 @@ the URLs for downloading the corresponding data.
7373
caom:CFHT/2583703 2583703 ... 2021-02-26T10:37:42.355
7474
caom:CFHT/2376828 2376828 ... 2021-09-01T23:48:18.790
7575
caom:CFHT/2376828 2376828 ... 2021-09-01T23:48:18.790
76-
>>> urls = cadc.get_data_urls(result)
76+
>>> urls = cadc.get_data_urls(result) # doctest: +IGNORE_WARNINGS
7777
>>> for url in urls:
7878
... print(url) #doctest: +IGNORE_OUTPUT
7979
...
@@ -92,14 +92,14 @@ the results on the name of the target (as an example - any other
9292
filtering possible) and resolves the URLs for both the primary and
9393
auxiliary data (in this case preview files)
9494

95-
95+
.. Remove IGNORE_WARNINGS once https://github.com/astropy/astroquery/issues/2523 is fixed
9696
.. doctest-remote-data::
9797

9898
>>> from astroquery.cadc import Cadc
9999
>>> cadc = Cadc()
100100
>>> result = cadc.query_region('08h45m07.5s +54d18m00s')
101101
>>> urls = cadc.get_data_urls(result[result['target_name'] == 'Nr3491_1'],
102-
... include_auxiliaries=True)
102+
... include_auxiliaries=True) # doctest: +IGNORE_WARNINGS
103103
>>> for url in urls:
104104
... print(url) # doctest: +IGNORE_OUTPUT
105105
...
@@ -136,15 +136,15 @@ the CADC metadata.
136136
If only a subsection of the FITS file is needed, CADC can query an
137137
area and resolve the cutout of a result.
138138

139-
139+
.. Remove IGNORE_WARNINGS once https://github.com/astropy/astroquery/issues/2523 is fixed
140140
.. doctest-remote-data::
141141

142142
>>> from astropy import units as u
143143
>>> from astroquery.cadc import Cadc
144144
>>> cadc = Cadc()
145145
>>> coords = '01h45m07.5s +23d18m00s'
146146
>>> radius = 0.01*u.deg
147-
>>> images = cadc.get_images(coords, radius, collection='CFHT')
147+
>>> images = cadc.get_images(coords, radius, collection='CFHT') # doctest: +IGNORE_WARNINGS
148148
>>> images # doctest: +IGNORE_OUTPUT
149149
[<astropy.io.fits.hdu.image.PrimaryHDU object at 0x7f3805a06ef0>]
150150
[<astropy.io.fits.hdu.image.PrimaryHDU object at 0x7f3805b23b38>]
@@ -153,7 +153,7 @@ area and resolve the cutout of a result.
153153
Alternatively, if the query result is large and data does not need to be
154154
in memory, lazy access to the downloaded FITS file can be used.
155155

156-
156+
.. Remove IGNORE_WARNINGS once https://github.com/astropy/astroquery/issues/2523 is fixed
157157
.. doctest-remote-data::
158158

159159
>>> from astropy import units as u
@@ -162,7 +162,7 @@ in memory, lazy access to the downloaded FITS file can be used.
162162
>>> cadc = Cadc()
163163
>>> coords = SkyCoord(10, 20, unit='deg')
164164
>>> radius = 0.01*u.deg
165-
>>> readable_objs = cadc.get_images_async(coords, radius, collection='CFHT')
165+
>>> readable_objs = cadc.get_images_async(coords, radius, collection='CFHT') # doctest: +IGNORE_WARNINGS
166166
>>> readable_objs # doctest: +IGNORE_OUTPUT
167167
Downloaded object from URL https://www.cadc-ccda.hia-iha.nrc-cnrc.gc.ca/caom2ops/sync?ID=ad%3ACFHT%2F2234132o.fits.fz&RUNID=pot39nwwtaht03wc&POS=CIRCLE+26.2812589776878+23.299999818906816+0.01 with ID 140045451168112
168168
Downloaded object from URL https://www.cadc-ccda.hia-iha.nrc-cnrc.gc.ca/caom2ops/sync?ID=ad%3ACFHT%2F2368279p.fits.fz&RUNID=pot39nwwtaht03wc&POS=CIRCLE+26.2812589776878+23.299999818906816+0.01 with ID 140045451142576
@@ -181,7 +181,7 @@ are needed, the result table can be passed into the
181181
`~astroquery.cadc.CadcClass.get_image_list` function, along with the
182182
cutout coordinates and radius.
183183

184-
184+
.. Remove IGNORE_WARNINGS once https://github.com/astropy/astroquery/issues/2523 is fixed
185185
.. doctest-remote-data::
186186

187187
>>> from astroquery.cadc import Cadc
@@ -191,7 +191,7 @@ cutout coordinates and radius.
191191
>>> radius = 0.1*u.deg
192192
>>> results = cadc.query_region(coords, radius, collection='CFHT')
193193
>>> filtered_results = results[results['time_exposure'] > 120.0]
194-
>>> image_list = cadc.get_image_list(filtered_results, coords, radius)
194+
>>> image_list = cadc.get_image_list(filtered_results, coords, radius) # doctest: +IGNORE_WARNINGS
195195
>>> print(image_list) # doctest: +IGNORE_OUTPUT
196196
['https://www.cadc-ccda.hia-iha.nrc-cnrc.gc.ca/caom2ops/sync?ID=ad%3ACFHT%2F2368278o.fits.fz&RUNID=dbuswaj4zwruzi92&POS=CIRCLE+26.2812589776878+23.299999818906816+0.1',
197197
'https://www.cadc-ccda.hia-iha.nrc-cnrc.gc.ca/caom2ops/sync?ID=ad%3ACFHT%2F2368278p.fits.fz&RUNID=dbuswaj4zwruzi92&POS=CIRCLE+26.2812589776878+23.299999818906816+0.1',

docs/esa/iso/iso.rst

Lines changed: 22 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
.. _astroquery.esa.iso:
22

3-
****************************************
3+
**************************************
44
ESA ISO Archive (`astroquery.esa.iso`)
5-
****************************************
5+
**************************************
66
The Infrared Space Observatory (ISO) was a space telescope for infrared light designed and
77
operated by the European Space Agency (ESA), in cooperation with ISAS (now part of JAXA) and NASA.
88
The ISO was designed to study infrared light at wavelengths of 2.5 to 240 micrometres and operated
@@ -20,9 +20,9 @@ ESA experts at ESAC.
2020
Examples
2121
========
2222

23-
------------------------------
23+
--------------------
2424
1. Querying ISO data
25-
------------------------------
25+
--------------------
2626

2727
.. doctest-remote-data::
2828

@@ -79,9 +79,9 @@ print(table).
7979
Once we have the observations identifiers (TDT) we can invoke the data download. To discover the tables
8080
provided by this service, see section 'Getting Tables Details'.
8181

82-
------------------------------
82+
-------------------
8383
2. Getting ISO data
84-
------------------------------
84+
-------------------
8585

8686
.. doctest-remote-data::
8787

@@ -153,33 +153,27 @@ we can loop on the observations to download the best products (DEFAULT_DATA_SET)
153153
INFO: http://nida.esac.esa.int/...
154154

155155

156-
-------------------------------
157-
2. Getting ISO postcards
158-
-------------------------------
156+
------------------------
157+
3. Getting ISO postcards
158+
------------------------
159+
160+
This will download the ISO postcard for the observation '80001538' and it will stored in a PNG called
161+
'postcard.png'.
159162

160163
.. doctest-remote-data::
161164

162165
>>> from astroquery.esa.iso import ISO
163-
>>> from IPython.display import Image
164-
>>> from IPython.core.display import HTML
165-
>>>
166166
>>> ISO.get_postcard('80001538', filename="postcard") # doctest: +IGNORE_OUTPUT
167167
Downloading URL http://nida.esac.esa.int/nida-sl-tap/data?retrieval_type=POSTCARD&DATA_RETRIEVAL_ORIGIN=astroquery&tdt=80001538 to /Users...
168-
>>> Image(filename = "postcard.png", width=400, height=100)
169-
<IPython.core.display.Image object>
170-
171168

172169
.. figure:: images/campostcard.png
173170
:scale: 100%
174171
:alt: Postcard image for observation 80001538
175172

176-
The resulting plot from the example above
177-
178-
This will download the ISO postcard for the observation '80001538' and it will stored in a PNG called
179-
'postcard.png'. Then, we display the postcard inside the python interface.
173+
The postcard downloaded in the example above
180174

181175
------------------------------------------
182-
3. Getting ISO Tables Details through TAP
176+
4. Getting ISO Tables Details through TAP
183177
------------------------------------------
184178

185179
.. doctest-remote-data::
@@ -207,7 +201,7 @@ This will download the ISO postcard for the observation '80001538' and it will s
207201
This will show the available tables in ISO TAP service in the ISO Data Archive.
208202

209203
-------------------------------------
210-
4. Getting columns details of ISO TAP
204+
5. Getting columns details of ISO TAP
211205
-------------------------------------
212206

213207
.. doctest-remote-data::
@@ -231,9 +225,9 @@ This will show the column details of the table 'ida.observations' in ISO TAP ser
231225
in the ISO Data Archive.
232226

233227

234-
-------------------------------------
235-
4. Working with ISO VO tables
236-
-------------------------------------
228+
-----------------------------
229+
6. Working with ISO VO tables
230+
-----------------------------
237231

238232
ISO provides Virtual Observatory compatible products and tables. Three different VO
239233
compatible tables are provided:
@@ -298,9 +292,10 @@ Same can be done to discover images M31 images:
298292
ISO CAM01 Image Target: M31_LW6 10.68375 41.26945 http://nida.esac.esa.int/nida-sl-tap/data?RETRIEVAL_TYPE=STANDALONE&obsno=583023050
299293
ISO CAM01 Image Target: M31_LW3 10.68375 41.26945 http://nida.esac.esa.int/nida-sl-tap/data?RETRIEVAL_TYPE=STANDALONE&obsno=583027030
300294

301-
-------------------------------------
302-
4. Working with ISO VO products
303-
-------------------------------------
295+
-------------------------------
296+
7. Working with ISO VO products
297+
-------------------------------
298+
304299
Either by invocation of the URL provided in every row of previous section or using the STANDALONE retrieval level, VO compatible products can be open using python astropy FITS module.
305300

306301
Images can be displayed by using the following code:

docs/esasky/esasky.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ If you know the names of all the available catalogs you can use :meth:`~astroque
3636
'XMM-EPIC-STACK', 'XMM-EPIC', 'XMM-OM', 'XMM-SLEW', 'Tycho-2', 'Gaia-DR3', 'Hipparcos-2', 'HSC',
3737
'Herschel-HPPSC-070', 'Herschel-HPPSC-100', 'Herschel-HPPSC-160', 'Herschel-SPSC-250', 'Herschel-SPSC-350',
3838
'Herschel-SPSC-500', 'Planck-PGCC', 'Planck-PCCS2E-HFI', 'Planck-PCCS2-HFI', 'Planck-PCCS2-LFI', 'Planck-PSZ2',
39-
'Icecube', 'Fermi_4FGL-DR2', 'Fermi_3FHL', 'Fermi_4LAC-DR2', '2WHSP', '2RXS', 'OU_Blazars']
39+
'Icecube', 'Fermi_4FGL-DR2', 'Fermi_3FHL', 'Fermi_4LAC-DR2', '2WHSP', '2RXS', 'OU_Blazars',
40+
'eROSITA-eFEDS-hard', 'eROSITA-eFEDS-main', 'eROSITA-etaCha-hard', 'eROSITA-etaCha-main']
4041

4142
Get the available maps mission names
4243
------------------------------------
@@ -48,7 +49,7 @@ If you know the names of all the available maps missions you can use :meth:`~ast
4849
>>> maps_list = ESASky.list_maps()
4950
>>> print(maps_list)
5051
['INTEGRAL', 'XMM', 'Chandra', 'SUZAKU', 'XMM-OM-OPTICAL', 'XMM-OM-UV', 'HST-UV', 'HST-OPTICAL', 'HST-IR',
51-
'ISO-IR', 'Herschel', 'AKARI', 'JWST-MID-IR', 'JWST-NEAR-IR', 'Spitzer', 'ALMA']
52+
'ISO-IR', 'Herschel', 'AKARI', 'JWST-MID-IR', 'JWST-NEAR-IR', 'Spitzer', 'ALMA', 'eROSITA']
5253

5354
Get the available spectra mission names
5455
---------------------------------------

docs/eso/eso.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ list of available instrument-specific queries can be obtained with the
110110
>>> from astroquery.eso import Eso
111111
>>> eso = Eso()
112112
>>> eso.list_instruments()
113-
['fors1', 'fors2', 'sphere', 'vimos', 'omegacam', 'hawki', 'isaac', 'naco', 'visir',
113+
['fors1', 'fors2', 'sphere', 'vimos', 'omegacam', 'eris', 'hawki', 'isaac', 'naco', 'visir',
114114
'vircam', 'apex', 'giraffe', 'uves', 'xshooter', 'espresso', 'muse', 'crires',
115115
'kmos', 'sinfoni', 'amber', 'gravity', 'matisse', 'midi', 'pionier', 'wlgsu']
116116

docs/ipac/ned/ned.rst

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ instance if you want to query NGC 224
2727
>>> result_table = Ned.query_object("NGC 224")
2828
>>> print(result_table) # an astropy.table.Table
2929
No. Object Name RA ... Redshift Points Diameter Points Associations
30-
degrees ...
30+
degrees ...
3131
--- ----------- ---------- ... --------------- --------------- ------------
32-
1 MESSIER 031 10.68479 ... 38 13 2
32+
1 MESSIER 031 10.68479 ... 39 13 2
3333

3434

3535
Query a region
@@ -240,7 +240,7 @@ for the specified object. We look at a simple example:
240240
No. RA ... Published Frequence Mode Qualifiers
241241
...
242242
--- -------------- ... ------------------------ -------------------------
243-
0 12h29m06.6997s ...
243+
0 12h29m06.6997s ...
244244
1 12h29m06.7000s ... Uncertain origin
245245
2 12h29m06.7000s ... Uncertain origin
246246
3 12h29m06.7000s ... Uncertain origin
@@ -251,17 +251,17 @@ for the specified object. We look at a simple example:
251251
8 12h29m06.7001s ... Uncertain origin
252252
9 12h29m06.7001s ... Uncertain origin
253253
... ... ... ... ...
254-
123 12h29m07.55s ... Broad-band measurement From reprocessed raw data
255-
124 12h29m06.05s ... Broad-band measurement From new, raw data
256-
125 12h29m06.5s ... Broad-band measurement From new, raw data
257-
126 12h29m06.5s ... Broad-band measurement From reprocessed raw data
258-
127 12h29m09.0s ... Uncertain origin
259-
128 12h29m08.9s ... Uncertain origin
260-
129 12h29m07.9s ... Uncertain origin
261-
130 12h29m04s ... Uncertain origin
262-
131 12h29m06s ... Uncertain origin
263-
132 12h29m08s ... Uncertain origin
264-
Length = 133 rows
254+
138 12h29m06.05s ... Broad-band measurement From new, raw data
255+
139 12h29m06.5s ... Broad-band measurement From new, raw data
256+
140 12h29m06.5s ... Broad-band measurement From reprocessed raw data
257+
141 12h29m09.0s ... Uncertain origin
258+
142 12h29m08.9s ... Uncertain origin
259+
143 12h29m07.9s ... Uncertain origin
260+
144 12h29m04s ... Uncertain origin
261+
145 12h29m06s ... Uncertain origin
262+
146 12h29m08s ... Uncertain origin
263+
147 12h29m06s ... Uncertain origin
264+
Length = 148 rows
265265

266266

267267
Reference/API

0 commit comments

Comments
 (0)