From 13962862ee4f9320d46894a98c52e70a627f323e Mon Sep 17 00:00:00 2001 From: VChristiaens Date: Mon, 25 Nov 2024 17:55:04 +0100 Subject: [PATCH] Adapted wedge test in mu_sigma estimate --- vip_hci/fm/negfc_fmerit.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/vip_hci/fm/negfc_fmerit.py b/vip_hci/fm/negfc_fmerit.py index 614a6231..bea0dc4c 100644 --- a/vip_hci/fm/negfc_fmerit.py +++ b/vip_hci/fm/negfc_fmerit.py @@ -924,13 +924,14 @@ def _estimate_mu_sigma_3d(cube, angs, ncomp, annulus_width, aperture_radius, theta_ini = (theta_guess + delta_theta) % 360 theta_fin = theta_ini + (360 - 2 * delta_theta) wedge = (theta_ini, theta_fin) - if len(wedge) == 2: - if wedge[0] > wedge[1]: - msg = "2nd value of wedge smaller than first one => +360" - print(msg) - wedge = (wedge[0], wedge[1] + 360) - else: - raise TypeError("Wedge should have exactly 2 values") + if wedge is not None: + if len(wedge) == 2: + if wedge[0] > wedge[1]: + msg = "2nd value of wedge smaller than first one => +360" + print(msg) + wedge = (wedge[0], wedge[1] + 360) + else: + raise TypeError("Wedge should have exactly 2 values") # annulus to estimate mu & sigma should encompass the companion location indices = get_annular_wedge(pca_res, inner_radius=radius_int,