Skip to content

Commit

Permalink
allowing for two bands to be used for catalogues
Browse files Browse the repository at this point in the history
  • Loading branch information
Christoph Toennis committed Oct 23, 2024
1 parent a682e55 commit 4c34757
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/ctapipe/utils/astro.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@
class StarCatalogues(Enum):
Yale = {
"directory": "V/50/catalog",
"band": "V",
"band": ["V"],
"frame": "J2000",
"ID_type": "HR",
} #: Yale bright star catalogue
Hipparcos = {
"directory": "I/239/hip_main",
"band": "V",
"band": ["V", "B"],
"frame": "ICRS",
"ID_type": "HIP",
} #: hipparcos catalogue
Expand Down Expand Up @@ -115,10 +115,10 @@ def get_star_catalog(catalog, min_magnitude=0.0, max_magnitude=10.0, row_limit=1
catalog_dict = StarCatalogues[catalog].value

columns = ["pmRA", "pmDE", catalog_dict["ID_type"]]
if catalog_dict["band"] == "B":
if "B" in catalog_dict["band"]:
columns.append("Bmag")
columns.append("BTmag")
elif catalog_dict["band"] == "V":
elif "V" in catalog_dict["band"]:
columns.append("Vmag")
columns.append("VTmag")
if catalog_dict["frame"] == "J2000":
Expand Down

0 comments on commit 4c34757

Please sign in to comment.