# Using scaling factor for collection 2 level 2 with Roy et al constants

I am using the Landsat ETM+ to OLI harmonization tutorial but I need it for Landsat collection 2 L2 data, this means the scaling factors have changed. I am not sure how to apply the scaling factors in this case. The tutorial multiplies the y-intercept constants by the scaling factor (10,000, see below) but I'm not sure how would that apply to the scaling factor and offset for collection 2 (0.0000275 + -0.2).

``````var coefficients = {itcps: ee.Image.constant([0.0003, 0.0088, 0.0061, 0.0412, 0.0254, 0.0172])
.multiply(10000), slopes: ee.Image.constant([0.8474, 0.8483, 0.9047, 0.8462, 0.8937, 0.9071])};
``````

I noticed some one already asked this question here, but I am wondering if any one could expand with code on how to actually use the new scaling factors for collection 2 in this case?

• Are you able to load ETM+ Collection 2 Tier 2 data in GEE? I tried but there are no images available yet, or maybe I have done something wrong. I know some images (like L7 T1 T2 SR) are loaded with reflectance values, not DN. Check it for me, please. If it's loaded with a 0 - 1 range, there is no need to add `.multiply(10000)` or apply scale factor Dec 16, 2021 at 21:13
• Hi @aldo_tapia, I am using Landsat collection 2 Level 2 (for corrected SR) and T1, I've been able to use the collection in GEE no problem (eg: 'LANDSAT/LE07/C02/T1_L2'). The min and max values for the bands with SR are 1-65455. That's why I am assuming I still need to apply the scaling factor. Dec 16, 2021 at 21:42

To compute reflectance value using scale factor for both collections (1 and 2) use the following functions:

``````var col1_DN = ee.ImageCollection("LANDSAT/LE07/C01/T2_SR");
var col2_DN = ee.ImageCollection("LANDSAT/LE07/C02/T1_L2");

var col1_SR = col1_DN.map(function(image){return image.multiply(0.0001)})
``````

Given the example you mentioned, you can avoid the use `.multiply(10000)` and harmonize over reflectance values instead of DN values.

You can add an extra step for this purpose:

``````var coefficients = {
itcps: ee.Image.constant([0.0003, 0.0088, 0.0061, 0.0412, 0.0254, 0.0172])
slopes: ee.Image.constant([0.8474, 0.8483, 0.9047, 0.8462, 0.8937, 0.9071])
};

// Here goes the other code skipped in this snipet

function etmToOli(img) {
return img.select(['Blue', 'Green', 'Red', 'NIR', 'SWIR1', 'SWIR2'])
.multiply(0.0000275)
Since this works with reflectance data, `.round()` and `.toShort()` are out because output is float. You can apply also a 10000 factor for matching Collection 1 scheme after computing reflectance as well, but it all depends on your needs (if integer values made this code faster for instance).