From 20da21c3eb77d49b7dd00dd943c0060ee2b3c412 Mon Sep 17 00:00:00 2001 From: JLatour Date: Thu, 30 Nov 2023 11:42:39 +0100 Subject: [PATCH] Made contrast_curve function more robust to classes with inherited attributes --- vip_hci/metrics/contrcurve.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vip_hci/metrics/contrcurve.py b/vip_hci/metrics/contrcurve.py index 8a311566..4eca7452 100644 --- a/vip_hci/metrics/contrcurve.py +++ b/vip_hci/metrics/contrcurve.py @@ -730,7 +730,7 @@ def throughput( mod = algo.__module__[:idx] tmp = __import__(mod, fromlist=[algo_name.upper()+'_Params']) algo_params = getattr(tmp, algo_name.upper()+'_Params') - argl = [attr for attr in vars(algo_params)] + argl = [attr for attr in dir(algo_params)] if "cube" in argl and "angle_list" in argl and "verbose" in argl: # (ii) a VIP postproc algorithm [OK] pass @@ -870,7 +870,7 @@ def throughput( tmp = __import__( mod, fromlist=[algo_name.upper()+'_Params']) algo_params = getattr(tmp, algo_name.upper()+'_Params') - arg = [attr for attr in vars(algo_params)] + arg = [attr for attr in dir(algo_params)] if "cube" in arg and "angle_list" in arg and "verbose" in arg: # (ii) a VIP postproc algorithm [OK] pass @@ -996,7 +996,7 @@ def throughput( tmp = __import__( mod, fromlist=[algo_name.upper()+'_Params']) algo_params = getattr(tmp, algo_name.upper()+'_Params') - arg = [attr for attr in vars(algo_params)] + arg = [attr for attr in dir(algo_params)] if "cube" in arg and "angle_list" in arg and "verbose" in arg: # (ii) a VIP postproc algorithm [OK] pass