Skip to content

Commit 9e646ee

Browse files
authored
Merge pull request #2530 from imbasimba/jwst-support
Added support for JWST and future missions using zip files
2 parents 0caebf0 + 405058b commit 9e646ee

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
@@ -1489,7 +1489,8 @@ def _get_maps_for_mission(self, maps_table, mission, download_dir, cache, json,
14891489

14901490
response.raise_for_status()
14911491

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

0 commit comments

Comments
 (0)