Skip to content

Commit 405058b

Browse files
committed
Added support for JWST and other missions using zip files
1 parent 404fa41 commit 405058b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

astroquery/esasky/core.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1488,7 +1488,8 @@ def _get_maps_for_mission(self, maps_table, mission, download_dir, cache, json,
14881488

14891489
response.raise_for_status()
14901490

1491-
if mission.lower() == "integral":
1491+
if ('Content-Type' in response.headers
1492+
and response.headers['Content-Type'] == 'application/zip'):
14921493
with ZipFile(file=BytesIO(response.content)) as zip:
14931494
for info in zip.infolist():
14941495
if self._ends_with_fits_like_extentsion(info.filename):
@@ -1733,7 +1734,7 @@ def _build_id_query(self, ids, row_limit, json):
17331734
from_query = " FROM {}".format(json[self.__TAP_TABLE_STRING])
17341735
id_column = json["uniqueIdentifierField"]
17351736
if "observations" in json["tapTable"] or "spectra" in json["tapTable"]:
1736-
if id_column == "observation_oid":
1737+
if id_column in ("observation_oid", "plane_id"):
17371738
id_column = "observation_id"
17381739
if id_column == "designation":
17391740
id_column = "obsid"

0 commit comments

Comments
 (0)