AlexeyPechnikov / pygmtsar

PyGMTSAR (Python InSAR): Powerful and Accessible Satellite Interferometry
http://insar.dev/
BSD 3-Clause "New" or "Revised" License
418 stars 91 forks source link

[Help]: large time processing to plot unwrapped phase #151

Open mateosanchezospina opened 1 month ago

mateosanchezospina commented 1 month ago

Describe the problem you encountered "bas.plot_phases(unwrap_sbas.phase[:8], caption='SBAS Phase, [rad]')" , more than 45 mintues and still loading.

OS and software version Please specify your operating system and the version of PyGMTSAR you are using, if applicable.

Steps to reproduce the problem 2D Unwrapping - sbas phase sbas.plot_phases(unwrap_sbas.phase[:8], caption='SBAS Phase, [rad]')

Note

[For additional support, consider using the ChatGPT4-based InSAR AI Assistant at https://insar.dev/ai. It can provide guidance and help with understanding PyGMTSAR's capabilities and troubleshooting issues.]

AlexeyPechnikov commented 1 month ago

In the case of large rasters, SNAPHU unwrapping can require a lot of time, depending on your hardware. Have you materialized the dataset unwrap_sbas before plotting? While this does not speed up the process, it provides a progress indicator to help estimate the remaining time.

mateosanchezospina commented 1 month ago

Alexey thankyou very much. Probably is it, I didn´t the last step, materialized the dataset. I´ll try again.

AlexeyPechnikov commented 1 month ago

It seems you have large rasters because the first 8 cannot be completed in 45 minutes. What are the dimensions of your interferogram stack? Typically, SBAS resolution is 60 meters, and you do not need to unwrap overly large interferograms. Of course, you can use a more precise resolution, but it can be slow and is often not necessary since we can enhance lower-resolution SBAS results with higher-resolution PSI.

mateosanchezospina commented 1 month ago

I dont think so. The resolution rasters that I used is by default 60 m, and the stack numbers of interferoframs is 27. So probably shouldn't be delayed. I think the reason is that I did not execute the las step "materialized the dataset unwrap_sbas", because there was an "optional" notice in the text. So I´ll try again, in few momements, and I update the issue thread. Again, thank you for your help.

mateosanchezospina commented 1 month ago

Hello again. After trying several times, the line "unwrap_sbas = sbas.sync_cube(unwrap_sbas, 'unwrap_sbas')" still does not execute. Is loading for more than 30 minutes and the bar does not exceed 36%. I attach a screenshot, I hope there is some solution. Thank you. screen

AlexeyPechnikov commented 1 month ago

Your data resolution is 15 meters (see your y and x spacing, 1 unit per y means about 15 meters and 4 units per x mean the same). As I’ve mentioned above, 60-meter resolution processing might be much faster.

mateosanchezospina commented 1 month ago

Ok I have it. But how can I change this resolution to 60 m? Update: I chose an AOI with a smaller dimension size, and it worked correctly. However, in LOS displacement decompose, there appears to be noise in the trends. SBAS_LOS_Dispkacement_Decompose_2022_2023 What you can appreciate?

mateosanchezospina commented 1 month ago

How could I read a document where you learn to interpret these results? (Notebook: Golden Valley)

AlexeyPechnikov commented 1 month ago

Check the ‘resolution’ parameter for the function compute_interferogram_multilook(). Ensure that your interferograms are clean from atmospheric noise, and use the function plot_baseline_displacement_los_mm() to check changes in single pixels.

I share some explanations of the results on Patreon: https://www.patreon.com/pechnikov

Aragon-yggdrasill commented 1 month ago

检查函数 compute_interferogram_multilook() 的“resolution”参数。确保干涉图没有大气噪声,并使用函数 plot_baseline_displacement_los_mm() 检查单个像素的变化。

我在 Patreon 上分享了一些对结果的解释: https://www.patreon.com/pechnikov

QQ截图20240723134808 QQ截图20240723134821 I also tried adjusting other parameters, but either there was no change or they were all zero. The example used was LakeSarez_Landslides_2017.ipynb. @AlexeyPechnikov

AlexeyPechnikov commented 1 month ago

Your variable ‘landmask_sbas’ is defined on a different grid and needs to be adjusted here.

Aragon-yggdrasill commented 1 month ago

Thank you for your reply, the problem has been solved