satpy.composites.resolution module
Sharpening compositors.
- class satpy.composites.resolution.LuminanceSharpeningCompositor(name, common_channel_mask=True, **kwargs)[source]
Bases:
GenericCompositorCreate a high resolution composite by sharpening a low resolution using high resolution luminance.
This is done by converting to YCbCr colorspace, replacing Y, and convertin back to RGB.
Collect custom configuration values.
- Parameters:
common_channel_mask (bool) – If True, mask all the channels with a mask that combines all the invalid areas of the given data.
- class satpy.composites.resolution.RatioSharpenedRGB(*args, **kwargs)[source]
Bases:
GenericCompositorSharpen RGB bands with ratio of a high resolution band to a lower resolution version.
Any pixels where the ratio is computed to be negative or infinity, it is reset to 1. Additionally, the ratio is limited to 1.5 on the high end to avoid high changes due to small discrepancies in instrument detector footprint. Note that the input data to this compositor must already be resampled so all data arrays are the same shape.
Example:
R_lo - 1000m resolution - shape=(2000, 2000) G - 1000m resolution - shape=(2000, 2000) B - 1000m resolution - shape=(2000, 2000) R_hi - 500m resolution - shape=(4000, 4000) ratio = R_hi / R_lo new_R = R_hi new_G = G * ratio new_B = B * ratio
In some cases, there could be multiple high resolution bands:
R_lo - 1000m resolution - shape=(2000, 2000) G_hi - 500m resolution - shape=(4000, 4000) B - 1000m resolution - shape=(2000, 2000) R_hi - 500m resolution - shape=(4000, 4000)
To avoid the green band getting involved in calculating ratio or sharpening, add “neutral_resolution_band: green” in the YAML config file. This way only the blue band will get sharpened:
ratio = R_hi / R_lo new_R = R_hi new_G = G_hi new_B = B * ratio
Instanciate the ration sharpener.
- class satpy.composites.resolution.SandwichCompositor(name, common_channel_mask=True, **kwargs)[source]
Bases:
GenericCompositorMake a sandwich product.
Collect custom configuration values.
- Parameters:
common_channel_mask (bool) – If True, mask all the channels with a mask that combines all the invalid areas of the given data.
- class satpy.composites.resolution.SelfSharpenedRGB(*args, **kwargs)[source]
Bases:
RatioSharpenedRGBSharpen RGB with ratio of a band with a strided-version of itself.
Example:
R - 500m resolution - shape=(4000, 4000) G - 1000m resolution - shape=(2000, 2000) B - 1000m resolution - shape=(2000, 2000) ratio = R / four_element_average(R) new_R = R new_G = G * ratio new_B = B * ratio
Instanciate the ration sharpener.