From 9f9c1cd0fe1c02281c85ca1aa8fb65c42d74e82a Mon Sep 17 00:00:00 2001 From: Gerrit Holl Date: Thu, 27 Oct 2022 17:28:11 +0200 Subject: [PATCH 1/2] Document behaviour on default enhancement Document Satpys behaviour on applying a default enhancement if no enhancement is defined, and document on how to avoid this enhancement from being applied. Also add a recommendation to always define an enhancement even if using the default. --- doc/source/composites.rst | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/doc/source/composites.rst b/doc/source/composites.rst index 03352d25f0..0c3d1574de 100644 --- a/doc/source/composites.rst +++ b/doc/source/composites.rst @@ -536,6 +536,23 @@ the file) as:: kwargs: gamma: [1.7, 1.7, 1.7] +.. warning:: + If you define a composite with no matching enhancement, Satpy will by + default apply a crude stretch enhancement. If you want no enhancement + at all (maybe you are enhancing a composite based on + :class:`DayNightCompositor` where the components have their own + enhancements defined), you need to define an enhancement that does + nothing:: + + enhancements: + day_x: + standard_name: day_x + operations: [] + + It is recommended to define an enhancement even if you intend to use + the default, in case the default should change in future versions of + Satpy. + More examples can be found in SatPy source code directory ``satpy/etc/enhancements/generic.yaml``. From 8dba3d994cb57bb13423e4753b3737b16dee06f4 Mon Sep 17 00:00:00 2001 From: Gerrit Holl Date: Tue, 1 Nov 2022 17:17:26 +0100 Subject: [PATCH 2/2] Default is linear not crude stretch --- doc/source/composites.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/source/composites.rst b/doc/source/composites.rst index 0c3d1574de..aff0438af0 100644 --- a/doc/source/composites.rst +++ b/doc/source/composites.rst @@ -538,11 +538,11 @@ the file) as:: .. warning:: If you define a composite with no matching enhancement, Satpy will by - default apply a crude stretch enhancement. If you want no enhancement - at all (maybe you are enhancing a composite based on - :class:`DayNightCompositor` where the components have their own - enhancements defined), you need to define an enhancement that does - nothing:: + default apply the :func:`~trollimage.xrimage.XRImage.stretch_linear` enhancement with + cutoffs of 0.5% and 99.5%. If you want no enhancement at all (maybe you + are enhancing a composite based on :class:`DayNightCompositor` where + the components have their own enhancements defined), you need to define + an enhancement that does nothing:: enhancements: day_x: