Skip to content

Commit 396ea8b

Browse files
committed
Use maximum of LDR and non-LDR insect probabilities
1 parent d5d1aef commit 396ea8b

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

cloudnetpy/categorize/insects.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -151,10 +151,7 @@ def _fill_missing_pixels(
151151
prob_from_ldr: npt.NDArray,
152152
prob_from_others: npt.NDArray,
153153
) -> npt.NDArray:
154-
prob_combined = np.copy(prob_from_ldr)
155-
no_ldr = np.where(prob_from_ldr == 0)
156-
prob_combined[no_ldr] = prob_from_others[no_ldr]
157-
return prob_combined
154+
return np.maximum(prob_from_ldr, prob_from_others)
158155

159156

160157
def _screen_insects(

0 commit comments

Comments
 (0)