I want to get a band mean across images from NDMI data but I don't find the correct pattern or the right script to print it in the console. How can I do this?
My script here:
// CALCULO DE INDICES DE HUMEDAD DE DIFERENCIA NORMALIZADA EN EARTH ENGINE
// Coleccion Sentinel 2 nivel 2
var ColeccionSentinel = ee.ImageCollection("COPERNICUS/S2_SR")
.filterDate ('2022-06-01' ,'2022-06-30') //Definir fecha
.filterBounds (geometry) //Definir geometria
.filterMetadata ('CLOUDY_PIXEL_PERCENTAGE', 'Less_Than', 20);
var Moisture = ee.Image(ColeccionSentinel.mean());
// NDMI (Normalized Difference Moisture Index)
var NDMI = Moisture.expression ('float ((NIR - SWIR) / (NIR + SWIR))',{
'NIR': Moisture.select ('B8'),
'SWIR': Moisture.select ('B11')});
// Simbologia comun para los indices
var Simbologia = {max: 1.0,
min: -0.5,
'palette': ['1A3678', '2955BC', '5699FF','8DBAE9', 'ACD1FF', 'CAEBFF', 'E5F9FF',
'FDFFB4', 'FFE6A2', 'FFC969', 'FFA12D', 'FF7C1F', 'CA531A', 'FF0000', 'AB0000']};
Map.centerObject (geometry, 15); //Ajustar zoom
// Representacion de indice
Map.addLayer (NDMI, Simbologia, 'NDMI',1);