From 3d7e4cd27bc9419f4b1e5880683733c7ec9e7b80 Mon Sep 17 00:00:00 2001 From: Marten van Kerkwijk Date: Wed, 27 May 2020 16:42:04 -0400 Subject: [PATCH] Become agnostic to the units of PINT phases --- scintillometry/phases/core.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scintillometry/phases/core.py b/scintillometry/phases/core.py index 87aea675..e443d927 100644 --- a/scintillometry/phases/core.py +++ b/scintillometry/phases/core.py @@ -63,7 +63,8 @@ def __call__(self, t): shape = getattr(toas, 'shape', ()) # TODO: Once PINT uses the Phase class, we can return the # result directly. - return Phase(ph.int, ph.frac).reshape(shape) + with u.add_enabled_equivalencies([(u.dimensionless_unscaled, u.cy)]): + return Phase(ph.int, ph.frac).reshape(shape) def apparent_spin_freq(self, t): """Compute the apparent spin frequency at one or more times.