Skip to content

Commit 770949e

Browse files
authored
Merge pull request #2691 from esdc-esac-esa-int/ESA_eJWST-fix-instrument-search
eJWST - Instrument search updated and bugfixes
2 parents beaed40 + 5601454 commit 770949e

File tree

13 files changed

+62
-56
lines changed

13 files changed

+62
-56
lines changed

astroquery/esa/iso/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ class Conf(_config.ConfigNamespace):
1515
"""
1616
Configuration parameters for `astroquery.esa.iso`.
1717
"""
18-
DATA_ACTION = _config.ConfigItem("http://nida.esac.esa.int/nida-sl-tap/data?",
18+
DATA_ACTION = _config.ConfigItem("https://nida.esac.esa.int/nida-sl-tap/data?",
1919
"Main url for retrieving ISO Data Archive files")
2020

21-
METADATA_ACTION = _config.ConfigItem("http://nida.esac.esa.int/nida-sl-tap/tap/",
21+
METADATA_ACTION = _config.ConfigItem("https://nida.esac.esa.int/nida-sl-tap/tap/",
2222
"Main url for retrieving ISO Data Archive metadata")
2323

2424
TIMEOUT = 60

astroquery/esa/jwst/core.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1146,8 +1146,8 @@ def __get_plane_dataproducttype_condition(self, *, prod_type=None):
11461146
raise ValueError("prod_type must be one of: "
11471147
+ str(', '.join(self.PLANE_DATAPRODUCT_TYPES)))
11481148
else:
1149-
condition = " AND dataproducttype LIKE '"+prod_type.lower() + \
1150-
"' "
1149+
condition = " AND dataproducttype ILIKE '%"+prod_type.lower() + \
1150+
"%' "
11511151
return condition
11521152

11531153
def __get_instrument_name_condition(self, *, value=None):
@@ -1159,7 +1159,7 @@ def __get_instrument_name_condition(self, *, value=None):
11591159
raise ValueError("instrument_name must be one of: "
11601160
+ str(', '.join(self.INSTRUMENT_NAMES)))
11611161
else:
1162-
condition = " AND instrument_name LIKE '"+value.upper()+"' "
1162+
condition = " AND instrument_name ILIKE '%"+value.upper()+"%' "
11631163
return condition
11641164

11651165
def __get_filter_name_condition(self, *, value=None):
@@ -1191,7 +1191,7 @@ def __get_artifact_producttype_condition(self, *, product_type=None):
11911191
raise ValueError("product_type must be one of: "
11921192
+ str(', '.join(self.ARTIFACT_PRODUCT_TYPES)))
11931193
else:
1194-
condition = " AND producttype LIKE '"+product_type+"'"
1194+
condition = " AND producttype ILIKE '%"+product_type+"%'"
11951195
return condition
11961196

11971197
@staticmethod

astroquery/esa/jwst/tests/test_jwsttap.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1004,3 +1004,13 @@ def test_get_related_observations(self):
10041004
parameters['upload_resource'] = None
10051005
parameters['upload_table_name'] = None
10061006
dummyTapHandler.check_call('launch_job', parameters)
1007+
1008+
def test_load_async_job(self):
1009+
dummyTapHandler = DummyTapHandler()
1010+
tap = JwstClass(tap_plus_handler=dummyTapHandler, show_messages=False)
1011+
tap.load_async_job(jobid=101222)
1012+
parameters = {}
1013+
parameters['jobid'] = 101222
1014+
parameters['name'] = None
1015+
parameters['verbose'] = False
1016+
dummyTapHandler.check_call('load_async_job', parameters)

astroquery/esa/xmm_newton/__init__.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
"""
2-
3-
@author: Elena Colomo
4-
2+
===============
3+
XMM-Newton Init
4+
===============
55
66
European Space Astronomy Centre (ESAC)
77
European Space Agency (ESA)
88
9-
Created on 3 Sept. 2019
10-
119
"""
1210

1311
from astropy import config as _config

astroquery/esa/xmm_newton/core.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
# Licensed under a 3-clause BSD style license - see LICENSE.rst
22
"""
3-
4-
@author: Elena Colomo
5-
3+
============================
4+
XMM-Newton Astroquery Module
5+
============================
66
77
European Space Astronomy Centre (ESAC)
88
European Space Agency (ESA)
99
10-
Created on 3 Sept 2019
11-
12-
1310
"""
1411
import re
1512
import shutil
Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
# Licensed under a 3-clause BSD style license - see LICENSE.rst
22
"""
3-
4-
@author: Elena Colomo
5-
3+
====================
4+
XMM-Newton Test Init
5+
====================
66
77
European Space Astronomy Centre (ESAC)
88
European Space Agency (ESA)
99
10-
Created on 4 Sept. 2019
1110
"""

astroquery/esa/xmm_newton/tests/dummy_handler.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
"""
2-
3-
@author: Elena Colomo
4-
2+
===================
3+
eJWST Dummy Handler
4+
===================
55
66
European Space Astronomy Centre (ESAC)
77
European Space Agency (ESA)
88
9-
Created on 4 Sept. 2019
109
"""
1110

1211

astroquery/esa/xmm_newton/tests/dummy_tap_handler.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
# Licensed under a 3-clause BSD style license - see LICENSE.rst
22
"""
3-
4-
@author: Elena Colomo
5-
3+
============================
4+
XMM-Newton Dummy Tap Handler
5+
============================
66
77
European Space Astronomy Centre (ESAC)
88
European Space Agency (ESA)
99
10-
Created on 4 Sept. 2019
1110
"""
1211

1312
from ....utils.tap.model.taptable import TapTableMeta

astroquery/esa/xmm_newton/tests/setup_package.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
# Licensed under a 3-clause BSD style license - see LICENSE.rst
22
"""
3-
4-
@author: Elena Colomo
5-
3+
========================
4+
XMM-Newton Setup Package
5+
========================
66
77
European Space Astronomy Centre (ESAC)
88
European Space Agency (ESA)
99
10-
Created on 4 Sept. 2019
1110
"""
1211

1312

astroquery/esa/xmm_newton/tests/test_xmm_newton.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
# Licensed under a 3-clause BSD style license - see LICENSE.rst
22
"""
3-
@author: Elena Colomo
4-
3+
====================
4+
XMM-Newton Tap Tests
5+
====================
6+
57
European Space Astronomy Centre (ESAC)
68
European Space Agency (ESA)
7-
Created on 4 Sept. 2019
9+
810
"""
911
import errno
1012
import os

0 commit comments

Comments
 (0)