Skip to content

Commit

Permalink
Check if catalog is present in VizieR output
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasstolker committed Jun 20, 2024
1 parent 7aa09b9 commit 93b0244
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions calistar/calistar.py
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,12 @@ def target_star(

# 2MASS data from VizieR

vizier_2mass = vizier_result["II/246/out"]
print(vizier_result.keys())
print("II/246/out" in vizier_result.keys())
if "II/246/out" in vizier_result.keys():
vizier_2mass = vizier_result["II/246/out"]
else:
vizier_2mass = None

if vizier_2mass is not None:
vizier_2mass = vizier_2mass[0]
Expand Down Expand Up @@ -632,10 +637,14 @@ def target_star(

# WISE data from VizieR

vizier_wise = None

if allwise_catalog:
vizier_wise = vizier_result["II/328/allwise"]
if "II/328/allwise" in vizier_result.keys():
vizier_wise = vizier_result["II/328/allwise"]
else:
vizier_wise = vizier_result["II/311/wise"]
if "II/311/wise" in vizier_result.keys():
vizier_wise = vizier_result["II/311/wise"]

if vizier_wise is not None:
vizier_wise = vizier_wise[0]
Expand Down

0 comments on commit 93b0244

Please sign in to comment.