I used to compute the coherence on the results of Back-Geocoding of two products (that are also the results of back-geocoding with a Master). (BandSelect .*_slv1_.*)
Then I selected the two bands that were valid and everything worked like a charm.
Lately, I updated my toolbox, and now, I have a message stated that the coherence cannot be computed due to a null ProductName. (The results of the last BackGeocoding: 20150604_D24_IW1_33295_coregextract_Stack.zip (870.0 KB))
INFO: org.esa.snap.core.gpf.operators.tooladapter.ToolAdapterIO: Initializing external tool adapters
INFO: org.esa.snap.core.util.EngineVersionCheckActivator: Please check regularly for new updates for the best SNAP experience.
INFO: org.hsqldb.persist.Logger: dataFileCache open start
[slvProductName] is null
org.esa.snap.core.gpf.OperatorException: [slvProductName] is null
at org.esa.snap.engine_utilities.gpf.OperatorUtils.catchOperatorException(OperatorUtils.java:432)
at org.esa.s1tbx.insar.gpf.CoherenceOp.initialize(CoherenceOp.java:232)
at org.esa.snap.core.gpf.internal.OperatorContext.initializeOperator(OperatorContext.java:528)
at org.esa.snap.core.gpf.internal.OperatorContext.getTargetProduct(OperatorContext.java:298)
at org.esa.snap.core.gpf.Operator.getTargetProduct(Operator.java:385)
at org.esa.snap.core.gpf.main.CommandLineTool.runOperator(CommandLineTool.java:306)
at org.esa.snap.core.gpf.main.CommandLineTool.runGraphOrOperator(CommandLineTool.java:284)
at org.esa.snap.core.gpf.main.CommandLineTool.run(CommandLineTool.java:188)
at org.esa.snap.core.gpf.main.CommandLineTool.run(CommandLineTool.java:121)
at org.esa.snap.core.gpf.main.GPT.run(GPT.java:60)
at org.esa.snap.core.gpf.main.GPT.main(GPT.java:37)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.esa.snap.runtime.Launcher.lambda$run$0(Launcher.java:55)
at org.esa.snap.runtime.Engine.runClientCode(Engine.java:189)
at org.esa.snap.runtime.Launcher.run(Launcher.java:51)
at org.esa.snap.runtime.Launcher.main(Launcher.java:31)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.exe4j.runtime.LauncherEngine.launch(LauncherEngine.java:84)
at com.install4j.runtime.launcher.UnixLauncher.start(UnixLauncher.java:66)
at install4j.org.esa.snap.runtime.Launcher_gpt.main(Unknown Source)
Caused by: java.lang.IllegalArgumentException: [slvProductName] is null
at org.esa.snap.core.util.Guardian.assertNotNull(Guardian.java:67)
at org.esa.snap.engine_utilities.gpf.StackUtils.saveSlaveProductBandNames(StackUtils.java:129)
at org.esa.s1tbx.insar.gpf.CoherenceOp.createTargetProduct(CoherenceOp.java:439)
at org.esa.s1tbx.insar.gpf.CoherenceOp.initialize(CoherenceOp.java:216)
... 24 more
Error: [slvProductName] is null
-- org.jblas INFO Deleting /tmp/jblas2750746498868856509/libquadmath-0.so
-- org.jblas INFO Deleting /tmp/jblas2750746498868856509/libjblas.so
-- org.jblas INFO Deleting /tmp/jblas2750746498868856509/libjblas_arch_flavor.so
-- org.jblas INFO Deleting /tmp/jblas2750746498868856509/libgfortran-4.so
-- org.jblas INFO Deleting /tmp/jblas2750746498868856509
I don’t know if it’s a regression or more probably a wrong designed graph. Anyone has an idea ?
Actually, I process a batch of products (e.g. a year of images, registered on the first image of the timeserie, the “master”). To save time, I do it in two steps. First, I do the backgeocoding of all images with the “master”, select the slave band and store the result. Then, I compute the backgeocoding & coherence of two consecutive images.
I did not know we can do a backgeocoding of a list. I have to think about it and do some benchmarks.
Do you think it will solve the problem (slvProductName is null) ?
I don’t understand what SingleMaster is, but I have strange behavior.
Below, two coherence images (I used BandSelect=VV before computing the coherence), the upper one is with SingleMaster=True. Results is 03jan/09jan, the second one is with SingleMaster=false. Results is 09jan/03jan (the opposite). Except for the black dots, the images are exactly the same.
I need the coherence between img2&img3.
But I would like img2 and img3 coregistrated with img1.
(actually, I have many more images, and I would like all of them to be coregistrated with img1)
I’d say unabling the “single master” option should to the task, but somehow it still has issues with Sentinel-1 data. It worked for me with stripmap products.
Unfortunately, with SingleMaster=False, I only get CoherenceVV and sometimes, I have black dots on my image…
I’m trying to find a workaround (using BandSelect, two steps BackGeocoding…), but I always run into a problem…
To compute coherence, the two products must be backgeocoded together. I don’t think it works to backgeocode them with the same reference and then compute the coherence between them.
I decided to dive into the code and I have two fixes to suggest:
To fix the “software regression” (commit: 7759322509 (“update StackUtils and add test”, 2021-04-08) on snap-engine), it’s a little bit ugly, but it works: s1tbx-op-insar/src/main/java/org/esa/s1tbx/insar/gpf/CoherenceOp.java
@@ -436,6 +442,10 @@ public class CoherenceOp extends Operator {
if (singleMaster) {
String slvProductName = StackUtils.findOriginalSlaveProductName(sourceProduct, container.sourceSlave.realBand);
+ if (slvProductName == null){
+ SystemUtils.LOG.warning("createTargetProduct: slvProductName is null");
+ continue;
+ }
StackUtils.saveSlaveProductBandNames(targetProduct, slvProductName,
targetBandNames.toArray(new String[0]));
}
To fix the “singleMaster=False” on a product where there is no master anymore: polarisations were empty: