Skip to content

Latest commit

 

History

History
104 lines (88 loc) · 4.89 KB

modifiers.rst

File metadata and controls

104 lines (88 loc) · 4.89 KB

Modifiers

Modifiers are filters applied to datasets prior to computing composites. They take at least one input (a dataset) and have exactly one output (the same dataset, modified). They can take additional input datasets or parameters.

Modifiers are defined in composites files in etc/composites within $SATPY_CONFIG_PATH.

The instruction to use a certain modifier can be contained in a composite definition or in a reader definition. If it is defined in a composite definition, it is applied upon constructing the composite.

When using built-in composites, Satpy users do not need to understand the mechanics of modifiers, as they are applied automatically. The composites documentation contains information on how to apply modifiers when creating new composites.

Some readers read data where certain modifiers are already applied. Here, the reader definition will refer to the Satpy modifier. This marking adds the modifier to the metadata to prevent it from being applied again upon composite calculation.

Commonly used modifiers are listed in the table below. Further details on those modifiers can be found in the linked API documentation.

Commonly used modifiers
Label Class Description
sunz_corrected ~satpy.modifiers.geometry.SunZenithCorrector Modifies solar channels for the solar zenith angle to provide smoother images.
effective_solar_pathlength_corrected ~satpy.modifiers.geometry.EffectiveSolarPathLengthCorrector Modifies solar channels for atmospheric path length of solar radiation.
nir_reflectance ~satpy.modifiers.spectral.NIRReflectance Calculates reflective part of channels at the edge of solar and terrestrial radiation (3.7 µm or 3.9 µm).
nir_emissive ~satpy.modifiers.spectral.NIREmissivePartFromReflectance Calculates emissive part of channels at the edge of solar and terrestrial radiation (3.7 µm or 3.9 µm)
rayleigh_corrected ~satpy.modifiers.atmosphere.PSPRayleighReflectance Modifies solar channels to filter out the visual impact of rayleigh scattering.

A complete list can be found in the etc/composites source code and in the ~satpy.modifiers module documentation.

Parallax correction

Since early 2022, Satpy has included a modifier for parallax correction, implemented in the ~satpy.modifiers.parallax.ParallaxCorrectionModifier class. This modifier is important for some applications, but not applied by default to any Satpy datasets or composites, because it can be applied to any input dataset and used with any source of (cloud top) height. Therefore, users wishing to apply the parallax correction semi-automagically have to define their own modifier and then apply that modifier for their datasets. An example is included with the ~satpy.modifiers.parallax.ParallaxCorrectionModifier API documentation. Note that Satpy cannot apply modifiers to composites, so users wishing to apply parallax correction to a composite will have to use a lower level API or duplicate an existing composite recipe to use modified inputs.

The parallax correction is directly calculated from the cloud top height. Information on satellite position is obtained from cloud top height metadata. If no orbital parameters are present in the cloud top height metadata, Satpy will attempt to calculate orbital parameters from the platform name and start time. The backup calculation requires skyfield and astropy to be installed. If the metadata include neither orbital parameters nor platform name and start time, parallax calculation will fail. Because the cloud top height metadata are used, it is essential that the cloud top height data are derived from the same platform as the measurements to be corrected are taken by.

The parallax error moves clouds away from the observer. Therefore, the parallax correction shifts clouds in the direction of the observer. The space left behind by the cloud will be filled with fill values. As the cloud is shifted toward the observer, it may occupy less pixels than before, because pixels closer to the observer have a smaller surface area. It can also be deformed (a "rectangular" cloud may get the shape of a parallelogram).

The parallax correction is currently experimental and subject to change. Although it is covered by tests, there may be cases that yield unexpected or incorrect results. It does not yet perform any checks that the provided (cloud top) height covers the area of the dataset for which the parallax correction shall be applied.

0.36

A complete list can be found in the etc/composites source code and in the ~satpy.modifiers module documentation.