satpy.enhancements package

Module contents

Enhancements.

satpy.enhancements.apply_enhancement(data, func, exclude=None, separate=False, pass_dask=False)

Apply func to the provided data.

Parameters:
  • data (xarray.DataArray) – Data to be modified inplace.
  • func (callable) – Function to be applied to an xarray
  • exclude (iterable) – Bands in the ‘bands’ dimension to not include in the calculations.
  • separate (bool) – Apply func one band at a time. Default is False.
  • pass_dask (bool) – Pass the underlying dask array instead of the xarray.DataArray.
satpy.enhancements.btemp_threshold(img, min_in, max_in, threshold, threshold_out=None, **kwargs)

Scale data linearly in two separate regions.

This enhancement scales the input data linearly by splitting the data into two regions; min_in to threshold and threshold to max_in. These regions are mapped to 1 to threshold_out and threshold_out to 0 respectively, resulting in the data being “flipped” around the threshold. A default threshold_out is set to 176.0 / 255.0 to match the behavior of the US National Weather Service’s forecasting tool called AWIPS.

Parameters:
  • img (XRImage) – Image object to be scaled
  • min_in (float) – Minimum input value to scale
  • max_in (float) – Maximum input value to scale
  • threshold (float) – Input value where to split data in to two regions
  • threshold_out (float) – Output value to map the input threshold to. Optional, defaults to 176.0 / 255.0.
satpy.enhancements.cira_stretch(img, **kwargs)

Logarithmic stretch adapted to human vision.

Applicable only for visible channels.

satpy.enhancements.colorize(img, **kwargs)

Colorize the given image.

satpy.enhancements.create_colormap(palette)

Create colormap of the given numpy file, color vector or colormap.

satpy.enhancements.crefl_scaling(img, **kwargs)
satpy.enhancements.gamma(img, **kwargs)

Perform gamma correction.

satpy.enhancements.invert(img, *args)

Perform inversion.

satpy.enhancements.lookup(img, **kwargs)

Assign values to channels based on a table.

satpy.enhancements.palettize(img, **kwargs)

Palettize the given image (no color interpolation).

satpy.enhancements.stretch(img, **kwargs)

Perform stretch.

satpy.enhancements.three_d_effect(img, **kwargs)

Create 3D effect using convolution