diff --git a/src/pint/models/astrometry.py b/src/pint/models/astrometry.py index 7750e269f..b4e81bb5d 100644 --- a/src/pint/models/astrometry.py +++ b/src/pint/models/astrometry.py @@ -453,9 +453,11 @@ def ssb_to_psb_xyz_ICRS(self, epoch=None): ra = ra0 + pmra * dt / np.cos(dec0) dec = dec0 + pmdec * dt - return u.Quantity( - [np.cos(dec) * np.cos(ra), np.cos(dec) * np.sin(ra), np.sin(dec)] - ).T + ra = ra.to_value(u.rad) + dec = dec.to_value(u.rad) + + cos_dec = np.cos(dec) + return u.Quantity([cos_dec * np.cos(ra), cos_dec * np.sin(ra), np.sin(dec)]).T def get_params_as_ICRS(self): return {