From faa48a98eda78458a6b65a292c52777cdcd83a37 Mon Sep 17 00:00:00 2001
From: Raffaele Gaetano <raffaele.gaetano@cirad.fr>
Date: Fri, 2 Apr 2021 19:01:48 +0200
Subject: [PATCH] FIX: Replaced MultitempFilteringFilter (causing stream
 artifacts) with a sequence of mean smoothing and bandmath.

---
 s1process.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/s1process.py b/s1process.py
index eb74d84..949fc6c 100644
--- a/s1process.py
+++ b/s1process.py
@@ -354,8 +354,9 @@ def MultitempFilteringFilter(infiles, outdir, window_radius, outcore_file, enl_f
         pipe[-1].SetParameterString('ram', str(ram))
         pipe[-1].Execute()
         pipe.append(otb.Registry.CreateApplication('BandMath'))
-        pipe[-1].SetParameterStringList('il', [f, outcore_file])
-        pipe[-1].SetParameterString('exp', 'im1b1*im2b1/im2b2')
+        pipe[-1].SetParameterStringList('il', [outcore_file])
+        pipe[-1].AddImageToParameterInputImageList('il', pipe[-2].GetParameterOutputImage('out'))
+        pipe[-1].SetParameterString('exp', 'im2b1*im1b1/im1b2')
         pipe[-1].SetParameterString('ram', str(ram))
         pipe[-1].SetParameterString('out', outfiles[i])
         pipe[-1].ExecuteAndWriteOutput()
-- 
GitLab