From 006e7c428c6c96924936ab714e600e00276eec42 Mon Sep 17 00:00:00 2001 From: Jan Petykiewicz Date: Thu, 30 Oct 2025 01:15:20 -0700 Subject: [PATCH] [ports] make port mismatch deltas more obvious --- masque/ports.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/masque/ports.py b/masque/ports.py index a8aaa0c..b56ad70 100644 --- a/masque/ports.py +++ b/masque/ports.py @@ -544,8 +544,11 @@ class PortList(metaclass=ABCMeta): translations = s_offsets - o_offsets if not numpy.allclose(translations[:1], translations): msg = 'Port translations do not match:\n' + common_translation = numpy.min(translations, axis=0) + msg += f'Common: {common_translation} \n' + msg += 'Deltas:\n' for nn, (kk, vv) in enumerate(map_in.items()): - msg += f'{kk} | {translations[nn]} | {vv}\n' + msg += f'{kk} | {translations[nn] - common_translation} | {vv}\n' raise PortError(msg) return translations[0], rotations[0], o_offsets[0]