Skip to content

Commit eb46cc8

Browse files
committed
Change to common argument order in AngularSeparation
1 parent c21600a commit eb46cc8

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

‎astropy/coordinates/angles.py‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -662,20 +662,20 @@ class AngularSeparation(Angle):
662662
663663
Parameters
664664
----------
665-
lat1 : float
666-
The value of the first latitudinal/elevation angle.
667665
lon1 : float
668666
The value of the first longitudinal/azimuthal angle.
669-
lat2 : float
670-
The value of the second latitudinal/elevation angle.
667+
lat1 : float
668+
The value of the first latitudinal/elevation angle.
671669
lon2 : float
672670
The value of the second longitudinal/azimuthal angle.
671+
lat2 : float
672+
The value of the second latitudinal/elevation angle.
673673
units : `~astropy.units`
674674
The units of the given angles.
675675
676676
677677
"""
678-
def __init__(self, lat1, lon1, lat2, lon2, units):
678+
def __init__(self, lon1, lat1, lon2, lat2, units):
679679

680680
units = u.Unit(units)
681681
lat1 = units.to(u.radian, lat1)

‎astropy/coordinates/coordsystems.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -388,11 +388,11 @@ def separation(self, other):
388388
"""
389389
other_in_self_system = other.transform_to(self.__class__)
390390

391-
lat1 = self.latangle.radians
392-
lat2 = other_in_self_system.latangle.radians
393391
lon1 = self.lonangle.radians
392+
lat1 = self.latangle.radians
394393
lon2 = other_in_self_system.lonangle.radians
395-
return AngularSeparation(lat1, lon1, lat2, lon2, u.radian)
394+
lat2 = other_in_self_system.latangle.radians
395+
return AngularSeparation(lon1, lat1, lon2, lat2, u.radian)
396396

397397
def separation_3d(self, other):
398398
"""

0 commit comments

Comments
 (0)