diff --git a/CHANGELOG-unreleased.md b/CHANGELOG-unreleased.md index c199d6083..b19c612ae 100644 --- a/CHANGELOG-unreleased.md +++ b/CHANGELOG-unreleased.md @@ -32,4 +32,5 @@ the released changes. - Fixed bug in `model.compare()` where it failed for `PosixPath` objects - Fixed bug in printing of parameter correlation/covariance matrices - `make_fake_toas_fromMJDs` now does not assume `PLANET_SHAPIRO` is in the model - it checks. +- Make VLBI frame rotation work correctly when proper motion is present. ### Removed diff --git a/src/pint/models/astrometry.py b/src/pint/models/astrometry.py index 0697d6755..a10b12a11 100644 --- a/src/pint/models/astrometry.py +++ b/src/pint/models/astrometry.py @@ -709,7 +709,7 @@ def ssb_to_psb_xyz_ICRS(self, epoch: Optional[time_like] = None) -> u.Quantity: # Reference: Madison+ 2023, The Astrophysical Journal 777 104 (Equations 9, 10) Omega = self.vlbi_coord_rotation() Khat = self.xyz_from_radec(ra, dec) - result = Omega @ Khat if Omega is not None else Khat + result = (Omega @ Khat.T).T if Omega is not None else Khat if self.use_ssb_cache: self._ssb_cache_icrs = result.copy() self._ssb_cache_key_icrs = key diff --git a/tests/test_vlbi_rotation.py b/tests/test_vlbi_rotation.py index 66db2b8bc..b91d00e82 100644 --- a/tests/test_vlbi_rotation.py +++ b/tests/test_vlbi_rotation.py @@ -12,6 +12,8 @@ PSR VLBITEST1 RAJ 05:00:00 1 DECJ 15:00:00 1 + PMRA 1e-6 + PMDEC 1e-6 POSEPOCH 55000 VLBIAX -0.15 VLBIAY 0.05