Problem in Snaphu Import section

I’ve tried to follow the help of snaphu import, which says:

Specifically the import graph performs the following:
1-Read-Phase:
Reads the “phase-only” interferometric product constructed during Snaphu Data Export step.
2-Read-Unwrapper-Phase:
Reads the “unwrapped-phase-only” product ingested in the Toolbox using Generic Binary Readers. Note that due to restrictions of the framework currently it is not possible to chain the generic binary reader in the graph, and hence it is not possible to ingest unwrapped data directly into the Toolbox. This has to be done outside Snaphu Import graph.
3-SnaphuImport:
Arranges the metadata and merges the bands of the source product into a unwrapped phase product. In this step metadata and bands are arranged in a compatible form for further InSAR processing.
4-Write:
Writes “unwrapped phase product” in the standard DIMAP format.

So I’ve put the Phase.hdr file for the “Read-Phase” operator, and the UnwPhase.hdr file for the “Read-Unwrapper-Phase” operator. With this setting the following error message is returned:
Error: [NodeId: SnaphuImport] SnaphuImportOp requires at least one product with InSAR metadata.

So I tried also to follow your suggestion, providing as input of Read-Phase operator the wrapped phase product that I used to export to snaphu, but it still doesn’t work :cry:
The error that is returned this time is:
org.esa.snap.core.gpf.OperatorException at org.esa.snap.core.gpf.graph.GraphProcessor$GPFImagingListener.errorOccurred(GraphProcessor.java:373) at com.sun.media.jai.util.SunTileScheduler.sendExceptionToListener(SunTileScheduler.java:1646) at com.sun.media.jai.util.SunTileScheduler.scheduleTile(SunTileScheduler.java:921) at javax.media.jai.OpImage.getTile(OpImage.java:1129) at javax.media.jai.PlanarImage.getData(PlanarImage.java:2085) at com.bc.ceres.glevel.MultiLevelImage.getData(MultiLevelImage.java:64) at org.esa.snap.core.gpf.internal.OperatorContext.getSourceTile(OperatorContext.java:406) at org.esa.snap.core.gpf.internal.OperatorContext.getSourceTile(OperatorContext.java:392) at org.esa.snap.core.gpf.internal.OperatorImage.computeRect(OperatorImage.java:73) at javax.media.jai.SourcelessOpImage.computeTile(SourcelessOpImage.java:137) at com.sun.media.jai.util.SunTileScheduler.scheduleTile(SunTileScheduler.java:904) at javax.media.jai.OpImage.getTile(OpImage.java:1129) at com.sun.media.jai.util.RequestJob.compute(SunTileScheduler.java:247) at com.sun.media.jai.util.WorkerThread.run(SunTileScheduler.java:468)

Could you please help me on this?

P.S.: I’ve perfomed such tests with gpt tool on both SNAP 3 and SNAP 4, and my OS is CentOS release 6.5 (Final)

In the first Read, put the product you used just before doing the snaphu export. This has the metadata needed.

2 Likes

Dear Luis,

thank you for the reply.

If I’ve correctly understood your last suggestion, it is the same operation that I’ve already described in the second part of my previous post, i.e. I’ve used in the first read operator the wrapped phase product which I used as input on snaphu export operator, and I get an error (listed in the bottom of the previous post).

Please let me know if I’m wrong and If I’ve to use the import operator in a different way

Thank you very much in advance

I am unable to get unwrapedphase out put img image;I got corresponding hdr file. because of this I am not able to import snapu for meta data matching. would you any body have same problem in Sentinel1A interferometry processing?

Dear gabrielaquintana77,

Can you please help?? How u added metadata because i am getting error

Thank You

Hi Prashant

In 2- Read-Unwrapped-Phase.

The SNAPHU Import have the goal to construct Interferometric product that will contain unwrapped phase band, and the metadata of the source interferometric product.

Thank you :slight_smile: @gabrielaquintana77

Thanks for responses.And Mehdi I’ll try that!

@lveci I have performed phase unwrapping using ubuntu through VMWARE. I am facing a problem while trying to import the unwrapped image.

Please help me resolve this issue.

Importing the unwrapped interferogram should be performed with the import function in the interferometry module

thank you @ ABraun , I have tried importing using snaphu import, the same error still persists. kindly guide me through.

did you select the right reference file (1-Read-Phase) in the import module? This should actually copy the source image’s metadata into the imported unwrapped phase.

1-Read-Phase (this is the reference file, usually the one before the unwrapping)

2-Read-Unwrapped-Phase (here you chose the hdr file of the unwrapped phase created by snaphu)

I have implemented the steps as suggested by you

I am still not able to figure where I am going wrong

the second screenshot shows that your unwrapped phase was not generated. Only the metadata file (*.hrd) exists.

In this case snaphu did not run correctly, no unwrapped interferogram was created. Thus, there is nothing to import.

Just importing the header (*hdr) file without any image data won’t work.
Did you install and run snaphu successfully?

@ABraun , I have processed the image using ubuntu through VMWARE. this is the screenshot of the completed process

the message is displayed as ‘program snaphu done’ . so I am not sure if the image is completely unwrapped or if I should run it again.
I would greatly appreciate your valuable suggestion.

The message indicates that everything went fine but in your screenshot the img file is not there.

@ABraun , I will try running it once again. thank you.

@ABraun, I have tried running snaphu again using MINT64 through VMWARE. while trying to import the image an error message is displayed as ‘unable to read the hdr file’ . Basically I found out that a header is created for ‘VH’ and an image file is created for ‘VV’,

could you please help me find out the error.

have experienced something similar. I have no solution but deleting the VH bands before SNAPHU export. It is usually not of better quality and in the end you can only use one anyways.

@ABraun
I will implement the same,thanks a lot. :slight_smile: