sphDist

lsst.validate.drp.util.sphDist(ra1, dec1, ra2, dec2)

Calculate distance on the surface of a unit sphere.

Input and Output are in radians.

Notes

Uses the Haversine formula to preserve accuracy at small angles.

Law of cosines approach doesn’t work well for the typically very small differences that we’re looking at here.