satpy.enhancements.enhancer module
Helpers to apply enhancements.
- class satpy.enhancements.enhancer.EnhancementDecisionTree(*decision_dicts, **kwargs)[source]
Bases:
DecisionTreeThe enhancement decision tree.
Init the decision tree.
- class satpy.enhancements.enhancer.Enhancer(enhancement_config_file=None)[source]
Bases:
objectHelper class to get enhancement information for images.
Initialize an Enhancer instance.
- Parameters:
enhancement_config_file – The enhancement configuration to apply, False to leave as is.
- satpy.enhancements.enhancer.get_enhanced_image(dataset, enhance=None, overlay=None, decorate=None, fill_value=None)[source]
Get an enhanced version of dataset as an
XRImageinstance.- Parameters:
dataset (xarray.DataArray) – Data to be enhanced and converted to an image.
enhance (bool or satpy.enhancements.enhancer.Enhancer) – Whether to automatically enhance data to be more visually useful and to fit inside the file format being saved to. By default, this will default to using the enhancement configuration files found using the default
Enhancerclass. This can be set to False so that no enhancments are performed. This can also be an instance of theEnhancerclass if further custom enhancement is needed.overlay (dict) – Options for image overlays. See
add_overlay()for available options.decorate (dict) – Options for decorating the image. See
add_decorate()for available options.fill_value (int or float) – Value to use when pixels are masked or invalid. Default of None means to create an alpha channel. See
finalize()for more details. Only used when adding overlays or decorations. Otherwise it is up to the caller to “finalize” the image before using it except if callingimg.show()or providing the image to a writer as these will finalize the image.