By default, calculation of spectral indices (band math) is performed without any rescaling of product pixel values. For Landsat-8 scenes in some cases this can lead to unsatisfactory results and fail to distinguish snow from clouds or identify vegetation.

It is recommended to convert band data to TOA planetary reflectance using reflectance rescaling coefficients (provided in Landsat-8 metadata) prior to performing the band math. For example, here is a fragment of snowy area with water and clouds present (coast of Greenland):

Landsat-8 users are cautioned against requesting spectral indices for areas in high latitudes (>65 degrees North or South). Nevertheless, you are justified in expecting some sort of result, even if not precisely accurate. Here is NDSI (snow index) of the same said area:

While snow and ice are clearly distinguished from the water, the main objective is not satisfied - differentiating snow/ice objects from the clouds. Also you may note that spectral index values for snow/ice area isn’t high enough (less than 0.6) and isn’t marked in blue as result. As a possible alternative, we offer to perform the band math on rescaled band data (as described above) instead of original:

If calculated after data conversion, NDSI may help to identify objects better than before. In this case snow, ice and water are not differentiated, but clouds can be identified with higher precision.

## How to use¶

Conversion can be evoked when requesting bandmath or virtual band web tiles from EOS API by using the query parameter CALIBRATE (see Image tile).

Examples:
GET /L8/LC80440342015224LGN00/ndvi/11/328/794?CALIBRATE=1
GET /L8/LC80440342015224LGN00/(B5-B4)/(B5+B4)/11/328/794?CALIBRATE=1


## Landsat 8¶

### OLI and TIRS at Sensor Spectral Radiance¶

Images are processed in units of absolute radiance using 32-bit floating-point calculations. These values are then converted to 16-bit integer values in the finished Level-1 product. These values can then be converted to spectral radiance using the radiance scaling factors provided in the metadata file:

$$L_{\lambda}=M_{L}*Q_{cal}+A_{L}$$

where:

$$L_{\lambda}$$ - Spectral radiance (W/(m2 * sr * μm))

$$M_{L}$$ - Radiance multiplicative scaling factor for the band (RADIANCE_MULT_BAND_n from the metadata).

$$A_{L}$$ - Radiance additive scaling factor for the band (RADIANCE_ADD_BAND_n from the metadata).

$$Q_{cal}$$ - L1 pixel value in DN

### OLI Top of Atmosphere Reflectance¶

Similar to the conversion to radiance, the 16-bit integer values in the L1 product can also be converted to TOA reflectance. The following equation is used to convert Level-1 DN values to TOA reflectance:

$$\rho \lambda '=M_{\rho }*Q_{cal}+A_{\rho }$$

where:

$$\rho \lambda '$$ - TOA Planetary Spectral Reflectance, without correction for solar angle (Unitless).

$$M_{\rho }$$ - Reflectance multiplicative scaling factor for the band (REFLECTANCE_MULT_BAND_n from the metadata).

$$Q_{cal}$$ - L1 pixel value in DN

$$A_{\rho }$$ - Reflectance additive scaling factor for the band (REFLECTANCE_ADD_BAND_n from the metadata).

Note that $$\rho \lambda '$$ is not true TOA Reflectance, because it does not contain a correction for the solar elevation angle. This correction factor is left out of the L1 scaling at the users’ request; some users are content with the scene-center solar elevation angle in the metadata, while others prefer to calculate their own per-pixel solar elevation angle across the entire scene. Once a solar elevation angle is chosen, the conversion to true TOA Reflectance is as follows:

$$\rho \lambda=\frac{\rho \lambda '}{sin(\theta )}$$

where:

$$\rho \lambda$$ - TOA Planetary Reflectance (Unitless).

$$\theta$$ - Solar Elevation Angle (SUN_ELEVATION in the metadata).

### TIRS Top of Atmosphere Brightness Temperature¶

TIRS data can also be converted from spectral radiance (as described above) to brightness temperature, which is the effective temperature viewed by the satellite under an assumption of unity emissivity. The conversion formula is as follows:

$$T=\frac{K2}{ln(\frac{K1}{L_{\lambda }}+1)}$$

where:

$$T$$ - TOA Brightness Temperature, in Kelvin.

$$L_{\lambda }$$ - Spectral radiance (Watts/(m2* sr * μm))

$$K1$$ - Thermal conversion constant for the band (K1_CONSTANT_BAND_n from the metadata)

$$K2$$ - Thermal conversion constant for the band (K2_CONSTANT_BAND_n from the metadata)

## Landsat 4, 5, 7¶

### Manually Converting Landsat MSS, TM and ETM data to ToA Reflectance:¶

This is a two-step process. First you must convert DNs to radiance values, then you need to convert these radiance values to reflectance values. For each scene you need to know the distance between the sun and earth in astronomical units, the day of the year (Julian date), and solar zenith angle. This information can also be found in Chapter 11 of the Landsat 7 Users Handbook. Sections of the Landsat 7 Users Handbook have been included in this document to guide you.

There are two formulas that can be used to convert DNs to radiance; the method you use depends on the scene calibration data available in the metadata file(s). One method uses the Gain and Bias (or Offset) values from the metadata file. The longer method uses the LMin and LMax spectral radiance scaling factors.

#### 1.1 Gain and Bias Method¶

The formula to convert DN to radiance using gain and bias values is:

$$L_{\lambda }=gain*DN+bias$$

where:

$$L_{\lambda }$$ - is the cell value as radiance

$$DN$$ - is the cell value digital number

$$gain$$ - is the gain value for a specific band (RADIANCE_MULT_BAND_n from the metadata).

$$bias$$ - is the bias value for a specific band (RADIANCE_ADD_BAND_n from the metadata).

#### 1.2 Spectral Radiance Scaling Method¶

The formula used in this process is as follows:

$$L_{\lambda }=((LMAX_{\lambda }-LMIN_{\lambda })/(QCALMAX-QCALMIN))*(QCAL-QCALMIN)+LMIN_{\lambda }$$

where:

$$L_{\lambda }$$ - is the cell value as radiance

$$QCAL$$ - digital number

$$LMIN_{\lambda }$$ - spectral radiance scales to QCALMIN (see RADIANCE_MINIMUM_BAND_n in the metadata)

$$LMAX_{\lambda }$$ - spectral radiance scales to QCALMAX (see RADIANCE_MAXIMUM_BAND_n in the metadata)

$$QCALMIN$$ - the minimum quantized calibrated pixel value (typically = 1) (QUANTIZE_CAL_MIN_BAND_n in the metadata)

$$QCALMAX$$ - the maximum quantized calibrated pixel value (typically = 255) (QUANTIZE_CAL_MAX_BAND_n in the metadata)

### 2 Radiance to ToA Reflectance¶

$$\rho _{\lambda }=\pi *L_{\lambda}*d^{2}/(ESUN_{\lambda}*cos\theta _{s})$$

where:

$$\rho _{\lambda }$$ - Unitless plantary reflectance

$$L_{\lambda}$$ - spectral radiance (from earlier step)

$$d$$ - Earth-Sun distance in astronomical units (see reference table)

$$ESUN_{\lambda}$$ - mean solar exoatmospheric irradiances (described in the next paragraph)

$$\theta _{s}$$ - solar zenith angle; $$\theta _{s}=90° - \theta _{se}$$, where $$\theta _{se}$$ is the sun elevation angle (SUN_ELEVATION in the metadata)

#### Landsat ETM+, TM, MSS Solar Spectral Irradiances (ESUN)¶

ESUN values are not provided for Landsat 8 data because they are not required for converting data to reflectance. Landsat 8’s Operational Land Imager (OLI) adopted two independent National Institute for Standards and Technology (NIST) traceable radiance and reflectance calibration methods. The Landsat 8 metadata file provides coefficients necessary to convert to radiance and reflectance from the quantized and calibrated Digital Numbers (DNs) of the product. Thus, ESUN values are not required for reflectance conversion.

##### Solar Spectral Irradiances (watts/(meter squared * μm)¶
Band Landsat 7 ETM+ Landsat 5 TM Landsat 4 TM Landsat 1-5 MSS
1 1970.00 1958.00 1958.00 1848.00
2 1842.00 1827.00 1826.00 1588.00
3 1547.00 1551.00 1554.00 1235.00
4 1044.00 1036.00 1033.00 856.60
5 225.70 214.90 214.70
7 82.06 80.65 80.70
8 1369.00

### TIRS Top of Atmosphere Brightness Temperature¶

For TIRs to ToA brightness temperate conversion see TIRS Top of Atmosphere Brightness Temperature. Use thermal conversion constants, provided in the table below.

#### Landsat 4,5 TM Thermal Conversion Constants¶

Const Landsat 4 TM Landsat 5 TM
K1 671.62 607.76
K2 1284.30 1260.56

## Sentinel-2 L1C¶

The formula used in this process is as follows:

$$\rho _{\lambda }=\frac{DN}{QUANTIFICATION\_VALUE}$$

where:

$$\rho _{\lambda }$$ - Unitless planetary reflectance

$$DN$$ - L1C pixel value in DN

$$QUANTIFICATION\_VALUE$$ - constant value of 10000

## NAIP¶

Some spectral indices expect input band data to be in range [0, 1] - universally accepted range for reflectance values. In order to correctly visualize those indices for NAIP, data should be normalized.

The formula used in this process is as follows:

$${DN_n}=\frac{DN}{NORMALIZATION\_VALUE}$$

where:

$$DN_n$$ - normalized NAIP pixel value

$$DN$$ - original NAIP pixel value in DN

$$NORMALIZATION\_VALUE$$ - constant value of 255

## MODIS MCD43A4¶

The formula used in this process is as follows:

$$\rho _{\lambda }=DN * SCALE\_FACTOR$$

where:

$$\rho _{\lambda }$$ - Unitless planetary reflectance

$$DN$$ - pixel value in DN

$$SCALE\_FACTOR$$ - constant value of 0.0001

## CBERS4 MUX, AWFI¶

This is a two-step process. First you must convert DNs to radiance values, then you need to convert these radiance values to reflectance values.

The formula to convert DN to radiance using gain and bias values is:

$$L_{\lambda }=gain*DN$$

where:

$$L_{\lambda }$$ - is the cell value as radiance

$$DN$$ - is the cell value digital number

$$gain$$ - is the gain value for a specific band (‘absoluteCalibrationCoefficient’ for a specific band from the metadata).

### 2 Radiance to ToA Reflectance¶

For ToA radiance to ToA reflectanve conversion see 2 Radiance to ToA Reflectance. For ESUN values refer to paper ‘First in-Flight Radiometric Calibration of MUX and WFI on-Board CBERS-4’ by Pinto et al