Set the pixel function of a VRT stack object
Source:R/vrt-set-py-pixfun.R
, R/zvrt-pixel-funs-composite.R
vrt_set_py_pixelfun.Rd
Set the pixel function of a VRT stack object
Usage
vrt_set_py_pixelfun(x, pixfun, band_idx)
# S3 method for class 'vrt_block'
vrt_set_py_pixelfun(x, pixfun = vrtility::median_numpy(), band_idx = NULL)
# S3 method for class 'vrt_collection'
vrt_set_py_pixelfun(x, pixfun = vrtility::median_numpy(), band_idx = NULL)
median_numpy()
mean_numpy()
geomean_numpy()
quantile_numpy(q)
mean_db_numpy()
Details
median_numpy
is a pixel function that calculates the median of
the input arrays, it is injected into the VRT file as a Python function.
mean_numpy
works in the same way but calculates the mean.`
geomean_numpy
is a pixel function that calculates the geometric
mean of the input arrays. Use cases of this are at present unclear to me.
If you have thoughts or references please let me know.
quantile_numpy
is a pixel function that calculates the quantile
of the input arrays for a given probability. This could be useful where
the median fails to filter cloudy or shadowy images effectively.
mean_db_numpy
is a pixel function that calculates the mean of
the input arrays and then converts to decibels. This is useful for
calculating the mean of radar raw/linear backscatter values, for example.