Skip to content

Commit

Permalink
Allow sm read source_array
Browse files Browse the repository at this point in the history
  • Loading branch information
dstorer authored and bhazelton committed Feb 9, 2024
1 parent f3f91ce commit 6ddfe01
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/pyradiosky/skymodel.py
Original file line number Diff line number Diff line change
Expand Up @@ -4351,7 +4351,13 @@ def read_fhd_catalog(
"""
catalog = scipy.io.readsav(filename_sav)["catalog"]
catalog = scipy.io.readsav(filename_sav)
if "catalog" in catalog.keys():
catalog = catalog["catalog"]
elif "source_array" in catalog.keys():
catalog = catalog["source_array"]
else:
raise KeyError(f"File {filename_sav} does not contain a known catalog name")
ids = catalog["id"].astype(str)
ra = catalog["ra"]
dec = catalog["dec"]
Expand Down

0 comments on commit 6ddfe01

Please sign in to comment.