Hello...,
To effective utilize the fieldindex function from FIELDimageR-QGIS tool for calculating indices, it is crucial to ensure the accurate sequence of bands provided for raster. For instance, in case of tutorial image (EX1_RGB.tif) the correct band sequence is Red,Green,Blue. If your raster image has a band sequence of Blue,Green,Red, then same order (bands=Blue,Green,Red) should be provided. The same rule applies to multispectral images. For instance, if a multispectral mosaic has bands stacked in the order of Blue,Green,Red,RE,NIR, then the same sequence should be provided for the 'bands' input parameter of the fieldindex function.
Here some examples for 'bands' input parameter of fieldindex function
i. bands= Red,Green,Blue (For RGB stacked raster)
ii. bands=
Blue,Green,Red,RE (For mosaic with bands sequence of Blue,Green,Red,RE )
iii. bands= Green,Red,RE,NIR (For mosaic with bands sequence of Green,Red,RE,NIR)
etc.,
The stacked mosaic image can have any sequence of bands; However you must ensure that the sequence provided in the 'bands' input parameter of fieldindex function matches exactly with the bands sequence in your image. Also, ensure that the band names are case sensitive and match the nomenclature provided in the help content of function.
Based on your query, it appears that there might be issue with the sequence of bands provided for your raster image. I suggest double checking the bands sequence and trying fieldindex function again with correct order. If you face any more problems, please inform us. Thank you for reaching out us.