Skip to content

Commit

Permalink
unit corrections fixes #57
Browse files Browse the repository at this point in the history
  • Loading branch information
sambit-giri committed Dec 30, 2024
1 parent 00c768c commit 1fc3ddc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/tools21cm/radio_telescope_layout.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def geographic_to_cartesian_coordinate_system(antll):
- Astropy is used to ensure unit consistency.
"""
Re = 6371 * u.km # Earth's radius
if isinstance(antll, u.quantity.Quantity):
if not isinstance(antll, u.quantity.Quantity):
antll *= u.deg
lon = antll[:, 0]
lat = antll[:, 1]
Expand Down Expand Up @@ -74,7 +74,7 @@ def cartesian_to_geographic_coordinate_system(antxyz):

# Extract Cartesian coordinates and attach units
if isinstance(antxyz, u.quantity.Quantity):
antxyz *= antxyz
antxyz *= u.m
x = antxyz[:, 0]
y = antxyz[:, 1]
z = antxyz[:, 2]
Expand Down

0 comments on commit 1fc3ddc

Please sign in to comment.