LinearAdjustments#

class geowombat.radiometry.LinearAdjustments[source]#

Bases: object

A class for linear bandpass adjustments.

Methods

bandpass(data[, sensor, to, band_names, ...])

Applies a bandpass adjustment by applying a linear function to surface reflectance values.

Methods Documentation

bandpass(data, sensor=None, to='l8', band_names=None, scale_factor=1, src_nodata=0, dst_nodata=0)[source]#

Applies a bandpass adjustment by applying a linear function to surface reflectance values.

Parameters:
  • data (DataArray) – The data to adjust.

  • sensor (Optional[str]) – The sensor to adjust.

  • to (Optional[str]) – The sensor to adjust to.

  • band_names (Optional[list]) – The bands to adjust. If not given, all bands are adjusted.

  • scale_factor (Optional[float]) – A scale factor to apply to the input data.

  • src_nodata (Optional[int or float]) – The input ‘no data’ value.

  • dst_nodata (Optional[int or float]) – The output ‘no data’ value.

Reference:

Sentinel-2 and Landsat 8:

Landsat 7 and Landsat 8:

See [RZJ+16] (Table 2)

Returns:

xarray.DataArray

Examples

>>> import geowombat as gw
>>> from geowombat.radiometry import LinearAdjustments
>>>
>>> la = LinearAdjustments()
>>>
>>> # Adjust all Sentinel-2 bands to Landsat 8
>>> with gw.config.update(sensor='s2'):
>>>     with gw.open('sentinel-2.tif') as ds:
>>>         ds_adjusted = la.bandpass(ds, to='l8')
bandpass(data, sensor=None, to='l8', band_names=None, scale_factor=1, src_nodata=0, dst_nodata=0)[source]#

Applies a bandpass adjustment by applying a linear function to surface reflectance values.

Parameters:
  • data (DataArray) – The data to adjust.

  • sensor (Optional[str]) – The sensor to adjust.

  • to (Optional[str]) – The sensor to adjust to.

  • band_names (Optional[list]) – The bands to adjust. If not given, all bands are adjusted.

  • scale_factor (Optional[float]) – A scale factor to apply to the input data.

  • src_nodata (Optional[int or float]) – The input ‘no data’ value.

  • dst_nodata (Optional[int or float]) – The output ‘no data’ value.

Reference:

Sentinel-2 and Landsat 8:

Landsat 7 and Landsat 8:

See [RZJ+16] (Table 2)

Returns:

xarray.DataArray

Examples

>>> import geowombat as gw
>>> from geowombat.radiometry import LinearAdjustments
>>>
>>> la = LinearAdjustments()
>>>
>>> # Adjust all Sentinel-2 bands to Landsat 8
>>> with gw.config.update(sensor='s2'):
>>>     with gw.open('sentinel-2.tif') as ds:
>>>         ds_adjusted = la.bandpass(ds, to='l8')

[CHGF19] (1,2)

Robert Chastain, Ian Housman, Joshua Goldstein, and Mark Finco. Empirical cross sensor comparison of Sentinel-2A and 2B MSI, Landsat-8 OLI, and Landsat-7 ETM+ top of atmosphere spectral characteristics over the conterminous United States. Remote sensing of environment, 221:274–285, 2019.

[RZJ+16] (1,2)

David P Roy, V Kovalskyy, HK Zhang, Eric F Vermote, L Yan, SS Kumar, and A Egorov. Characterization of Landsat-7 to Landsat-8 reflective wavelength and normalized difference vegetation index continuity. Remote sensing of Environment, 185:57–70, 2016.