From c35229dd5d54b64a30958efa1b494f282bf7af89 Mon Sep 17 00:00:00 2001
From: "raffaele.gaetano" <raffaele.gaetano@cirad.fr>
Date: Wed, 23 Jun 2021 15:02:12 +0200
Subject: [PATCH] FIX: mosaicking single date scenes using max (avoids
 artefacts).

---
 s1process.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/s1process.py b/s1process.py
index 362f298..3352a3e 100644
--- a/s1process.py
+++ b/s1process.py
@@ -495,7 +495,7 @@ def extractROI(infiles, outdir, roi, roiname=None, ncores=12, overwrite=False, v
             """
             mbm = otb.Registry.CreateApplication('BandMathX')
             mbm.SetParameterStringList('il', l)
-            mbm.SetParameterString('exp', 'vmax({' + ';'.join(['im%db1' % i for i in len(l)]) + '})')
+            mbm.SetParameterString('exp', 'vmax({' + ';'.join(['im%db1' % i for i in range(len(l))]) + '})')
             mbm.SetParameterString('out', outfile)
             mbm.ExecuteAndWriteOutput()
 
-- 
GitLab