BandMathX vmax for negative values
Description
Using Sentinel-1 backscatter in decibel, I was looking for the VH max. BandMathX vmax function return zero for all pixels, whereas vmin return the min value. To be sure that it is a bug, I did the following
Steps to reproduce
gdal_create -outsize 20 20 -bands 3 -a_ullr 0 20 20 0 -a_nodata -10000 /work/CESBIO/users/ferrants/toto.tif
otbcli_BandMathX -il /work/CESBIO/users/ferrants/toto.tif -out /work/CESBIO/users/ferrants/toto.tif -exp "im1b1 - 10; im1b2 -5; im1b3 -3" otbcli_PixelValue -in /work/CESBIO/users/ferrants/toto.tif -coordx 10 -coordy 10 2023-03-27 15:29:59 (INFO) PixelValue: Default RAM limit for OTB is 256 MB 2023-03-27 15:29:59 (INFO) PixelValue: GDAL maximum cache size is 19314 MB 2023-03-27 15:29:59 (INFO) PixelValue: OTB will use at most 80 threads 2023-03-27 15:29:59 (INFO) PixelValue: [-10, -5, -3] Output parameters value: value: [-10, -5, -3] otbcli_BandMathX -il /work/CESBIO/users/ferrants/toto.tif -out /work/CESBIO/users/ferrants/totomax.tif -exp "vmax(im1)" otbcli_PixelValue -in /work/CESBIO/users/ferrants/totomax.tif -coordx 10 -coordy 10 2023-03-27 15:30:55 (INFO) PixelValue: Default RAM limit for OTB is 256 MB 2023-03-27 15:30:55 (INFO) PixelValue: GDAL maximum cache size is 19314 MB 2023-03-27 15:30:55 (INFO) PixelValue: OTB will use at most 80 threads 2023-03-27 15:30:55 (INFO) PixelValue: [0] Output parameters value: value: [0]
otbcli_BandMathX -il /work/CESBIO/users/ferrants/toto.tif -out /work/CESBIO/users/ferrants/totomin.tif -exp "vmin(im1)" otbcli_PixelValue -in /work/CESBIO/users/ferrants/totomin.tif -coordx 10 -coordy 10 2023-03-27 15:31:36 (INFO) PixelValue: Default RAM limit for OTB is 256 MB 2023-03-27 15:31:36 (INFO) PixelValue: GDAL maximum cache size is 19314 MB 2023-03-27 15:31:36 (INFO) PixelValue: OTB will use at most 80 threads 2023-03-27 15:31:36 (INFO) PixelValue: [-10] Output parameters value: value: [-10]
Configuration information
Hal.cnes.fr cluster, with module load otb