After applying a scaling factor to my LANDSAT collection 2 level 2 data the values seem to be off.
var addNDVI = function(image) {
var ndvi = image.normalizedDifference(['SR_B4', 'SR_B5']).rename('NDVI');
return image.addBands(ndvi);
};
var collection1 = ee.ImageCollection('LANDSAT/LC08/C02/T1_L2')
.filterBounds(sch)
.filterDate('2013-01-01', '2023-01-01')
.select(['SR_B4', 'SR_B5'])
.map(addNDVI).select('NDVI');
collection1 = collection1.map(
function(img){
var rescaled_NDVI = img.select('NDVI').multiply(0.0000275).add(-0.2)
.rename('NDVI_rescaled')
return img.addBands(rescaled_NDVI);
}
);
var series1 = ui.Chart.image.seriesByRegion(
collection1, sch, ee.Reducer.mean(), 'NDVI_rescaled', 30, 'system:time_start', 'label')
.setChartType('ScatterChart')
.setOptions({
title: 'L5_SCH_1984-01-01_1986-12-31',
vAxis: {title: 'NDVI'},
lineWidth: 1,
pointSize: 4,
});
Map.addLayer(sch, {color: 'FF0000'});
print(series1);
//var palette = {min: -1, max: 1, palette: ['blue', 'white', 'green']};
Map.addLayer(collection1);
0.0000275
is very small value to multiply.-1*0.0000275-0.2 = -0.20000275
and1*0.0000275-0.2 = -0.1999725
. So NDVI_rescaled range would be [-0.20000275, -0.1999725]. You need to define proper number to multiply and add.viewWindow: {min: -0.20001, max: -0.19999}
intovAxis
option. Result -> i.sstatic.net/YqprG.png