- changed title to Syntax for ImageMath expressions
Syntax for ImageMath expressions
There is no documentation in
https://enmap-box.readthedocs.io/en/latest/usr_section/usr_manual/applications.html#imagemath
and just 2 examples in https://enmap-box.readthedocs.io/en/latest/usr_section/usr_cookbook/imagemath.html
Where could I find doc on the syntax that is needed?
My current need is just to calculate a layer of probability maxima from a multiband probability raster that is output from Predict Class Probability.
(Andreas Rabe kindly provided the way to calculate a mask for those pixels below a certain threshold in Issue #298, but we prefer to explore first the actual values to decide the threshold)
Comments (9)
-
reporter -
Unfortunately, we are missing a proper documentation for now. Regarding the NDVI example, enmap is a 3d numpy array, red and nir is a 2d sub-array of the enmap array.
As syntax, you can use any Numpy operators (+, -, /, *, …) or methodes, see https://numpy.org/doc/stable/reference/
In fact, the code snippet can be arbitrary Python code.
Sidenote: for debugging/testing, it may also be helpful to use print outputs, that will show up in the log widget: e.g. print(enmap.shape) will output the array dimensions of the EnMAP raster.
Hope that helps for now.
-
reporter I understand documentation is a huge effort. Perhaps there could be an organized way for users to contribute examples.
-
Having an example section is a good idea. If you have an interesting example to begin with, just provide it here and I will add it to the docs.
-
Hi Agus,
we overhauled ImageMath, which is now called RasterMath. I still want to do a usage tutorial on ReadTheDocs soon. So stay tuned.
Regards
Andreas -
-
assigned issue to
-
assigned issue to
-
- changed version to 3.9
-
- changed status to resolved
resolves
#475→ <<cset dc110280f76b>>
-
- Log in to comment