I need to assess TSM in a river using Sentinel-2. Which is why I need to add the function of TSM as a new band. I used Adding multiple indices as bands to image as a guide but it is not working for my script. It doesn't show any error, but it also doesn't add the band after I map it to the collection.
Below you can find my code:
//Programar SST usando una expresion
var SST = function (image){
var addSST =image.expression(
'-229.34 * ((GREEN/NIR) ** 3 )+ 1001.65 * ((GREEN/NIR) ** 2) - 1422.7 * (GREEN/NIR) +665.7',{
'GREEN': image.select('B3'),
'NIR':image.select('B8')
}).rename('SST');
return image.addBands(SST);
};
//SE DEBE AÑADIR LA PROPIEDAD SYSTEM:TIME_START
SST = function (image){
return image.copyProperties(image,['system:time_start']);
};
var SST_IC = S2Clipped.map(SST);
print (SST_IC,'Colección Sólidos Suspendidos Totales');