Skip to content

Commit

Permalink
Revert "update scale and offset examples and fix KaTeX formulas"
Browse files Browse the repository at this point in the history
This reverts commit 24c3e48.
  • Loading branch information
m-mohr committed Jul 8, 2024
1 parent c4d664e commit 7a6953b
Showing 1 changed file with 19 additions and 36 deletions.
55 changes: 19 additions & 36 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,44 +91,27 @@ The allowed values for `data_type` are:
| stddev | number | standard deviation value of the pixels in the band |
| valid_percent | number | percentage of valid (not `nodata`) pixel |

### Scale and Offset Uses and Examples
### Use Scale and offset as radiometric calibration parameters

In remote sensing, most imagery raster corresponds to just unitless raw pixel values that may be converted
into specific units given a scale and an offset. The raw pixel values are referred to as
Digital Numbers (DN). Using a Scale and Offset simply provide a more efficient
way to store data with less bytes. In these cases the data provider will include scale and offset
values for transforming the data into a physical measurement, such as radiance, power, altitude, or
backscatter. Several examples are given below.
In remote sensing, many imagery raster corresponds to raw data without any radiometric processing.
Each pixel is given in digital numbers (DN), i.e. native pixel values from the sensor acquisition.
Those digital numbers quantify the energy recorded by the detector (optical or radar).
The sensor radiometric calibration aims to turn back the DN value into a
physical unit value (radiance, light power, backscatter).
Hereafter, some examples of the usage of the `values` dictionary to perform radiometric correction.

Users should be careful to always apply any provided scale and offset
#### Digital Numbers to Radiance (optical sensor)

#### DN to Reflectance
<!-- https://labo.obs-mip.fr/multitemp/radiometric-quantities-irradiance-radiance-reflectance/ -->

A very common use case is to store reflectance values, which range from 0 - 1.0, as integers rather than
utilizing the larger floating point data type. Data is stored in a 2-byte Integer and ranges from
1 to 10,0000 by using a scale of 0.0001, resulting in a file half the size of one using 4 by te floats.

```json
"assets": {
"B4": {
"title": "TOA radiance band 4",
"bands": [{
"raster:nodata": 0,
"raster:scale": 0.0001,
"raster:offset": 0.0
}]
}
}
```

#### Digital Numbers to Optical Radiance

A conventional way of deriving Top Of Atmosphere (TOA) Radiance in $ W.sr^{-1}.m^{-3}\ $
A conventional way of deriving Top Of Atmosphere (TOA) Radiance
in ![formula](https://render.githubusercontent.com/render/math?math=W.sr^{-1}.m^{-3})
from DN values using `scale` and `offset` in the following formula:

$$ L_\lambda=scale\times DN + offset $$
![formula](https://render.githubusercontent.com/render/math?math=\color{gray}L_\lambda%20=%20scale%20\times%20DN%20%2B%20offset)

where $ L_\lambda $ is TOA Radiance with units of $ W.sr^{-1}.m^{-3} $.
where ![formula](https://render.githubusercontent.com/render/math?math=\color{gray}L_\lambda) is TOA Radiance
in ![formula](https://render.githubusercontent.com/render/math?math=\color{gray}W.sr^{-1}.m^{-3}).

For example, the above value conversion is described in the values dictionary as

Expand All @@ -146,22 +129,22 @@ For example, the above value conversion is described in the values dictionary as
}
```

##### Radiance to TOA Optical Reflectance
#### Radiance to TOA Reflectance (optical sensor)

In order to convert the above TOA radiance to TOA reflectance, the following formula can be used:

$$ R=(pi*L*d*d)/(ESUN*cos(s)) $$
![formula](https://render.githubusercontent.com/render/math?math=\color{gray}R=(pi*L*d*d)/(ESUN*cos(s)))

where:

- L is the spectral radiance for the band (see previous section)
- d is the earth-sun distance (in astronomical units) and depends on the acquisition’s day and month
- ESUN is the mean TOA solar irradiance (or [solar illumination](https://github.com/stac-extensions/eo#solar_illumination)) in W/m2/micrometers
- d is the earth-sun distance (in astronomical units) and depends on the acquisition’s day and month ([Core STAC specification](https://github.com/radiantearth/stac-spec/blob/master/item-spec/item-spec.md#properties-object))
- ESUN(b) is the mean TOA solar irradiance (or [solar illumination](https://github.com/stac-extensions/eo#solar_illumination)) in W/m2/micrometers
- s is the [solar zenith angle](https://github.com/stac-extensions/view#item-properties) in degrees.

source: <https://www.orfeo-toolbox.org/CookBook/Applications/app_OpticalCalibration.html>

#### Altitude to water level
#### Transform height measurement to water level

In remote sensing, radar altimeter instruments measures an absolute height from an absolute georeference (e.g. WGS 84 geoid).
In hydrology, you prefer having the water level relative to the "0 limnimetric scale".
Expand Down

0 comments on commit 7a6953b

Please sign in to comment.