Example script for multiple operations?

It would only work with some corrections to the code. But I wouldn’t recommend it.
However, with the following changes it should work.

After getting the type an instance of this type needs to be created Then the default vaulues of all parameters should need to be set:

polOP = snappy.jpy.get_type(‘org.csa.rstb.polarimetric.gpf.PolarimetricDecompositionOp’)
pol_inst = polOp()
pol_inst.setParameterDefaultValues()

Instead of calling SetDecompostion on GPF, you need to use the newly created instance. And SetDecomposition can’t be used at all because it is not publicly accessible. You need to use the generic setParameter method.

pol_inst.setParameter('decomposition', polOP.YAMAGUCHI_DECOMPOSITION)

After setting also other parameters the resulting product can be retrieved.
result=pol_inst.getTargetProduct()

Calling dispose is usually not necessary, but if you want to do it then do it only if the product is written to disk or the data has been otherwise requested and is not used anymore. The reason is that the computation is only performed when the data is requested. After calling getTargetProduct only a proxy to the data is generated and data is not computed yet.

1 Like

Thank you very much Mister