angular_distance#

pygaia.astrometry.coordinates.angular_distance(phi1, theta1, phi2, theta2, return_posangle=False)#

Calculate the angular distance between pairs of sky coordinates.

Parameters:
  • phi1 (float) – Longitude of first coordinate (radians).

  • theta1 (float) – Latitude of first coordinate (radians).

  • phi2 (float) – Longitude of second coordinate (radians).

  • theta2 (float) – Latitude of second coordinate (radians).

  • return_posangle (boolean) – If true return the position angle of the point (phi2, theta2), as defined in the tangent plane at (phi1, theta1). Where the position angle is measured from local north over east and ranges between 0 and 2*pi. If the distance between the two points is 0 or pi to within floating point precision (as given by np.finfo(float).resolution) then 0 is returned for the position angle. This is a choice for the cases where mathematically the position angle is not defined. This resolution (1e-15) corresponds to about 0.2 nanoarcseconds.

Returns:

  • angdist (float) – Angular distance in radians.

  • posangle (float) – Position angle as defined above in radians.