Skip to content

Commit 18eee30

Browse files
committed
it is possible for a cutout to be missing; we need to allow for that.
Also, the hack I had before isn't needed when you appropriately query for multiple wavelengths
1 parent 67787b5 commit 18eee30

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

astroquery/higal/core.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -243,16 +243,15 @@ def get_image_list(self, coordinates, radius, get_query_payload=False,
243243
json_data = dataline.split('fitsHeaders = JSON.parse(\'')[1].strip('\');')
244244

245245
jdict = json.loads(json_data)
246-
filename = jdict['4048']['FILENAME']
247-
248-
assert self._session_id in filename
246+
filenames = {wlname: jdict[str(wlnum)]['FILENAME']
247+
for wlname, wlnum in self.HIGAL_CATALOGS.items()
248+
if str(wlnum) in jdict}
249249

250250
image_list = [urljoin(conf.server,
251-
filename
252-
.replace("PLW", wlname.upper())
253-
.replace("500", wlval)
254-
.replace('jpeg', 'fits'))
255-
for wlname, wlval in self.HIGAL_WAVELENGTHS.items()]
251+
filenames[wlname].replace('jpeg', 'fits'))
252+
for wlname in self.HIGAL_CATALOGS
253+
if wlname in filenames
254+
]
256255

257256
return image_list
258257

0 commit comments

Comments
 (0)