From e7cdb959df9596a86411920e6a3ccbdd7c8a158a Mon Sep 17 00:00:00 2001 From: Didier Vezinet Date: Tue, 17 Dec 2024 18:41:03 -0500 Subject: [PATCH] [#977] Debugged user_limits for vos computation --- tofu/data/_class8_vos.py | 7 +++++++ tofu/data/_class8_vos_broadband.py | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/tofu/data/_class8_vos.py b/tofu/data/_class8_vos.py index f517343e2..b2ca6ad54 100644 --- a/tofu/data/_class8_vos.py +++ b/tofu/data/_class8_vos.py @@ -732,6 +732,13 @@ def _get_user_limits( np.full(shape_cam, user_limits['Dphi'][1]), ]) + # ----------- + # clean-up + # ---------- + + if len(user_limits) == 0: + user_limits = None + return user_limits diff --git a/tofu/data/_class8_vos_broadband.py b/tofu/data/_class8_vos_broadband.py index c5491a0bc..c73e701db 100644 --- a/tofu/data/_class8_vos_broadband.py +++ b/tofu/data/_class8_vos_broadband.py @@ -119,6 +119,13 @@ def _vos( phor1 = user_limits['phor1'][key_cam] dphi = user_limits['dphi'][key_cam] + else: + msg = ( + "Something weird with pcross0:\n" + f"user_limits: {user_limits}\n" + ) + raise Exception(msg) + else: # get temporary vos