Skip to content

Commit

Permalink
A small fix that was causing unit tests to fail.
Browse files Browse the repository at this point in the history
  • Loading branch information
dsanmartim committed Feb 3, 2025
1 parent f1b589a commit 192be8d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions python/lsst/ts/observatory/control/base_tcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,13 @@ def object_list_get(self, name: str) -> ICRS:
self.log.warning(
f"Found more than one entry for {name}. Using first one."
)
ra = Angle(object_table[0]["RA"], unit=u.hourangle)
dec = Angle(object_table[0]["DEC"], unit=u.deg)

# Get RA and DEC keyword from table
ra_key = "RA" if "RA" in object_table.columns else "ra"
dec_key = "DEC" if "DEC" in object_table.columns else "dec"

ra = Angle(object_table[0][ra_key], unit=u.hourangle)
dec = Angle(object_table[0][dec_key], unit=u.deg)
radec_icrs = ICRS(
ra=Angle(round(ra.value, 8), unit=u.hourangle),
dec=Angle(round(dec.value, 8), unit=u.deg),
Expand Down

0 comments on commit 192be8d

Please sign in to comment.