From 579345c48d48008b5ddaab4ab8aceb730a3ae2a4 Mon Sep 17 00:00:00 2001 From: VChristiaens Date: Mon, 7 Oct 2024 20:00:28 +0200 Subject: [PATCH] Contrast curve check for scale_list adapted to allow for ADI contrast curve on 4D cubes --- vip_hci/metrics/contrcurve.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/vip_hci/metrics/contrcurve.py b/vip_hci/metrics/contrcurve.py index 8aa5a350..953cbb6b 100644 --- a/vip_hci/metrics/contrcurve.py +++ b/vip_hci/metrics/contrcurve.py @@ -703,12 +703,12 @@ def throughput( raise TypeError(msg) if psf_template.ndim != 3: raise TypeError("Template PSF is not a frame, 3d array") - if "scale_list" not in algo_dict: - raise ValueError("Vector of wavelength not found") - else: + if "scale_list" in algo_dict: + # raise ValueError("Vector of wavelength not found") + # else: if algo_dict["scale_list"].shape[0] != array.shape[0]: raise TypeError("Input wavelength vector has wrong length") - if isinstance(fwhm, float) or isinstance(fwhm, int): + if np.isscalar(fwhm): maxfcsep = int((array.shape[2] / 2.0) / fwhm) - 1 else: maxfcsep = int((array.shape[2] / 2.0) / np.amin(fwhm)) - 1