vrt.PixelFunction
A GDAL built-in pixel function applied by a derived band.
Usage
vrt.PixelFunction(
name,
args=dict(),
transfer_type=None,
)Parameters
name: str-
GDAL pixel function name, such as
"dB"or"div". args: dict[str, str | int | float] = dict()-
Pixel function arguments; values are stored as strings.
transfer_type: str | None = None- NumPy dtype name the sources are read as before the function runs.
Methods
| Name | Description |
|---|---|
| __post_init__() | Store argument values as strings, as they read back from XML. |
| db() | Convert to decibels. |
| diff() | Subtract the second source from the first. |
| div() | Divide the first source by the second. |
| maximum() | Take the per-pixel maximum of the sources. |
| mean() | Take the per-pixel mean of the sources. |
| minimum() | Take the per-pixel minimum of the sources. |
| scale() | Apply the source’s scale and offset. |
__post_init__()
Store argument values as strings, as they read back from XML.
Usage
__post_init__()db()
Convert to decibels.
Usage
db(fact=10)Parameters
fact: (10, 20) = 10-
10for intensity,20for amplitude.
Returns
PixelFunction-
fact * log10(x).
diff()
Subtract the second source from the first.
Usage
diff()Returns
PixelFunction- The diff pixel function.
div()
Divide the first source by the second.
Usage
div()Returns
PixelFunction- The div pixel function.
maximum()
Take the per-pixel maximum of the sources.
Usage
maximum()Returns
PixelFunction-
The
maxpixel function.
mean()
Take the per-pixel mean of the sources.
Usage
mean()Returns
PixelFunction- The mean pixel function.
minimum()
Take the per-pixel minimum of the sources.
Usage
minimum()Returns
PixelFunction-
The
minpixel function.
scale()
Apply the source’s scale and offset.
Usage
scale()Returns
PixelFunction- The scale pixel function.