Using the landsat 8, tier 1, TOA Imagery.
I noticed that the thermal bands (B10, B11) are ranging from ~230K (Kelvin) to 320K. I need them to be between 0 and 1 instead.
Using the landsat 8, tier 1, TOA Imagery.
I noticed that the thermal bands (B10, B11) are ranging from ~230K (Kelvin) to 320K. I need them to be between 0 and 1 instead.
To normalize, you can use the unitScale
method. You need to pass the min/max range of the input.
var THERMAL_MIN = 230; // Kelvin.
var THERMAL_MAX = 320;
var normalized = landsat8
.select(['B10', 'B11'])
.unitScale(THERMAL_MIN, THERMAL_MAX);
Then you might want to replace the old bands with the normalized ones.
var OPTICAL_BANDS = ['B1', 'B2', 'B3', 'B4', 'B5', 'B6', 'B7'];
var THERMAL_BANDS = ['B10', 'B11'];
// Cat -> Concatenate.
var norm_landsat8 = ee.Image.cat([
landsat8.select(OPTICAL_BANDS),
normalized.select(THERMAL_BANDS)
]);