# Interferogram averaging for DEM generation

I’m now trying out to implement an average of multi-interferograms, so called stacking , to get one result including the less atmospheric effects, in addition to the long - term ground deformation average. Do you think there is still no chance to do so?

Averaging the interferograms should be no problem in SNAP but I am not sure if the snaphu export module takes this average as an input for the subsequent unwrapping.

How to implement it?

I guess it will be one averaged infgrm, so what is the matter in this case?

Also I’d like to draw your attention to our colleague answer, might be you have comment to get me well cover this topic.

Calculate interferograms for images pairs of different dates (all at 6 day intervals at best) and stack/coregister them. You can then calculate the phase average in the band maths. However, I am not sure how the snaphu export will recognize this band maths result as the correct image to export and process within snaphu, because usually the input for the snaphu export has i, q, intensity, phase (and sometimes coherence). So we would need to find a work around to replace it by the averaged interferogram. One solution could be to perform the snaphu export on a “normal” interferogram and then substitute the exported img by the average raster. But the coordinates have to be the very same.

I have seen the answer of johngan, he basically suggests the same. But his post doesn’t include the unwrapping step (as far as I understood it).

It is possible to average the unwrapped phases, of No.s infgrm?

Could be an option as well, you are right.
According to my understanding, the unwrapping suffers from bad interferogram quality and so, unwrapping errors add up. So I would see that as an alternate option, but not the best choice. Averaging interferograms before the unwrapping should reduce errors way better.

Yes, you are totally right, but we have two issues now,

First one is, how it is possible to create stacking of intfgms to reduce the errors? Using SNAP
Second is , how it is possible to to get the average of deformation for NO.s infgms? Using SNAP

Could implement both in one, or separately. Now the issue in between the hands @marpet or @lveci or any one else of our colleagues could help in this issue.

As the interferogram product contains an intensity band, coregistration should work.

Deformation can be a problem, yes, but if the investigated period is short (3 months) it is probably negligible.

After corr. the phases are missed

You can restore it with Raster > Conversion > i+q to phase or manually derive it in the band maths:
`phase(i,q)`

this phase should represents the average!

sorry, I misunderstood your point. If you want it to be included after terrain correction you have to select it in the second tab. Or what do you mean by “after corr”?

the end of the day coming back to your comments, if I got your point well, Aftermath get processed two infgms, it is possible to stack both by applying corr. again! Or I’m sorry to miss understand your point.

now I understand. Create interferograms from two (or more) image pairs, lets say A+B and B+C.
Coregister the interferograms to have both (or more) in one product. Then calculate the average based on the phase images using the band maths.

Well done, this is what I’m talking about.

But it doesn’t work. I tried but the phase is missed, aftermath retrieve the phase the second one is missed.

what about restoring it with the band maths?

Yes, that what I did exactly, but what about the phase of the second ifgrms, isn’t existed, and how to do the average of only one phase?

if you have i+q of both dates you can restore the phase of both dates, right?

Yes, but why in this case doesn’t work?