Old code:
var L5_EVI2= function(image) {
var evi2 = image.expression( '2.5 * ((NIR - RED) / (NIR + 2.4 * RED + 1))',
{
'NIR': image.select('B4'), 'RED': image.select('B3')
}
).rename('EVI2');
var L5_SR1 = ee.ImageCollection("LANDSAT/LT05/C01/T1_SR")
.filterDate('1986-01-01', '1999-12-31')
.filter(ee.Filter.lt('CLOUD_COVER',30))
.select(['B3','B4','pixel_qa'])
.filterBounds(shpMask);
New code
var L5_EVI2= function(image) {
var evi2 = image.expression( '2.5 * ((NIR - RED) / (NIR + 2.4 * RED + 1))',
{
'NIR': image.select('SR_B4'), 'RED': image.select('SR_B3')
}
).rename('EVI2');
var L5_SR1 = ee.ImageCollection("LANDSAT/LT05/C02/T1_L2")
.filterDate('1986-01-01', '1999-12-31')
.filter(ee.Filter.lt('CLOUD_COVER',30))
.select(['SR_B3','SR_B4','QA_PIXEL'])
.filterBounds(shpMask);
Why do I have different EVI2 results calculated for the same region after going from collection 1 to collection 2? I only changed the corresponding band name and dataset name. The other code was not changed.