From 1f8f9bbc6b146a4a7fad2143d1a99359cd72c846 Mon Sep 17 00:00:00 2001 From: Simo Tukiainen Date: Tue, 3 Dec 2024 09:48:16 +0200 Subject: [PATCH] Adjust LDR test --- cloudnetpy_qc/quality.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cloudnetpy_qc/quality.py b/cloudnetpy_qc/quality.py index 7169e5c..9196e29 100644 --- a/cloudnetpy_qc/quality.py +++ b/cloudnetpy_qc/quality.py @@ -516,7 +516,9 @@ def run(self): ) v_count = ma.count(v) ldr_count = ma.count(ldr) - if v_count > 0 and (ldr_count / v_count * 100) < 0.1: + if v_count > 0 and ldr_count == 0: + self._add_warning("All LDR are masked.") + elif v_count > 0 and (ldr_count / v_count * 100) < 0.1: self._add_warning("LDR exists in less than 0.1 % of pixels.")