sphDist

lsst.validate.drp.util.sphDist(ra_mean, dec_mean, ra, dec)

Calculate distance on the surface of a unit sphere.

Parameters
ra_meanfloat

Mean RA in radians.

dec_meanfloat

Mean Dec in radians.

ranumpy.array [float]

Array of RA in radians.

decnumpy.array [float]

Array of Dec 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.