Skip to content

Commit

Permalink
Merge pull request #2530 from imbasimba/jwst-support
Browse files Browse the repository at this point in the history
Added support for JWST and future missions using zip files
  • Loading branch information
bsipocz authored Sep 16, 2022
2 parents 0caebf0 + 405058b commit 9e646ee
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions astroquery/esasky/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1489,7 +1489,8 @@ def _get_maps_for_mission(self, maps_table, mission, download_dir, cache, json,

response.raise_for_status()

if mission.lower() == "integral":
if ('Content-Type' in response.headers
and response.headers['Content-Type'] == 'application/zip'):
with ZipFile(file=BytesIO(response.content)) as zip:
for info in zip.infolist():
if self._ends_with_fits_like_extentsion(info.filename):
Expand Down Expand Up @@ -1734,7 +1735,7 @@ def _build_id_query(self, ids, row_limit, json):
from_query = " FROM {}".format(json[self.__TAP_TABLE_STRING])
id_column = json["uniqueIdentifierField"]
if "observations" in json["tapTable"] or "spectra" in json["tapTable"]:
if id_column == "observation_oid":
if id_column in ("observation_oid", "plane_id"):
id_column = "observation_id"
if id_column == "designation":
id_column = "obsid"
Expand Down

0 comments on commit 9e646ee

Please sign in to comment.