Phase to Height without snaphu unwrapping

Hi, this is maybe an odd request, but how can I cheat the slant2height operator into working on a product that hasn’t actually been unwrapped?

My situation is this - having removed topographic phase and multilooked, my phase values are all well within a 2 pi interval (there is a distinct peak in the histogram). Therefore there isn’t strictly anything to unwrap. And whenever I run snaphu unwrapping, I end up with erroneous, unphysical results.

So I would like to skip the unwrapping step, and write my own operation to simply centre to phase values on zero, then go straight to the phase to height operator.

However, it throws up an error because it “requires at least one unwrapped phase band”. How can I bypass this check?

I have tried naming a phase band “Unw_Phase” and this didn’t solve anything.

Thank you for your advice!

I just tested and copied the phase band using the Band Maths by giving it another name (Unw_Phase_ifg…, but without the polarization)

Additionally, you have to add abs_phase in the band properties under unit

After that, I could apply the Phase to Height opertor to the unwrapped product.

1 Like

Thank you! I just came to the same conclusion by hunting in the source code.

I am using snappy so my solution will include something like

1 Like

I’ve actually come across another problem.

Having used snappy to produce a band with units of ‘abs_phase’, when I call phaseToHeight I now get a NullPointerException:

    at org.jlinda.core.utils.CplxContainer.<init>(
    at org.jlinda.nest.gpf.Slant2HeightOp.metaMapPut(
    at org.jlinda.nest.gpf.Slant2HeightOp.constructSourceMetadata(
    at org.jlinda.nest.gpf.Slant2HeightOp.initialize(
    at org.esa.snap.core.gpf.internal.OperatorContext.initializeOperator(
    at org.esa.snap.core.gpf.internal.OperatorContext.getTargetProduct(
    at org.esa.snap.core.gpf.Operator.getTargetProduct(
    at org.esa.snap.core.gpf.GPF.createProductNS(
    at org.esa.snap.core.gpf.GPF.createProduct(
    at org.esa.snap.core.gpf.GPF.createProduct(
    at org.esa.snap.core.gpf.GPF.createProduct(

I still have no clue how to interpret this kind of java error - can anybody suggest what might be going wrong?

Maybe this thread can help. It is sort of a workaround to try and import connected components from SNAPHU and forcing SNAPHU Import to accept the data. The same techniques might work for you and your data requirements.