Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Problem with compute_interferogram_multilook #191

Open
Aragon-yggdrasill opened this issue Dec 13, 2024 · 20 comments
Open

[Bug]: Problem with compute_interferogram_multilook #191

Aragon-yggdrasill opened this issue Dec 13, 2024 · 20 comments

Comments

@Aragon-yggdrasill
Copy link

Describe the bug
ERROR: multilooking data slice and weight variables have different shape
There was no problem when I used the same notebook some time ago, but this problem occurred when I ran the notebook recently
To Reproduce
Problem with sbas.compute_interferogram_multilook in Multi-looked Resolution for SBAS

Screenshots
image

System and software version:

  • OS: [e.g. iOS] colab
  • PyGMTSAR version: new

Processing Log
If applicable, attach a log file from notebook cell or terminal output or relevant error messages

[Please note you can use the ChatGPT4-based InSAR AI Assistant for guidance or troubleshooting. Visit https://insar.dev/ai for more information.]

@AlexeyPechnikov
Copy link
Owner

You may want to compare the shapes of the outputs from sbas.open_data() and sbas.psfunction().

@athifsayyaf
Copy link

I am also facing the same error. here is the outputs from the above codes. I couldn't figure out where I did the mistake. Thank you for your consideration and time.

Image

@athifsayyaf
Copy link

HERE IS THE LINK TO MY COLAB.PLEASE HAVE A LOOK.
colab link:
https://colab.research.google.com/drive/1YY1ZuUSrHyQaWZ8asls9up7dFLlFxlCQ#scrollTo=KVjfJGNEvuY3

@SteffanDavies
Copy link

I am facing the same issue and the data and psf have the same x/y size.

@SteffanDavies
Copy link

It seems the problem may be related to bursts having varying lengths.

@AlexeyPechnikov
Copy link
Owner

But the linked notebook completely executed. What is the problem?

@AlexeyPechnikov
Copy link
Owner

@SteffanDavies

I am facing the same issue and the data and psf have the same x/y size.

The same y/x sizes issue is an internal Xarray/Dask error which I overcame using variable renaming. I have not seen the problem for a long time.

@athifsayyaf
Copy link

I got resolved the problem.it was the issue with burst with varying lengths. Thank you for your support

@AlexeyPechnikov
Copy link
Owner

@SteffanDavies

It seems the problem may be related to bursts having varying lengths.

For interferogram generation, you can try to increase the default queue=32 value to process more interferograms on the same grid for the compute_interferogram*() functions. Also, some changes were made in the PyGMTSAR GitHub version to resolve the problem completely.

@SteffanDavies
Copy link

I got resolved the problem.it was the issue with burst with varying lengths. Thank you for your support

How did you resolve this? By excluding scenes?

@SteffanDavies
Copy link

@SteffanDavies

It seems the problem may be related to bursts having varying lengths.

For interferogram generation, you can try to increase the default queue=32 value to process more interferograms on the same grid for the compute_interferogram*() functions. Also, some changes were made in the PyGMTSAR GitHub version to resolve the problem completely.

I have update to latest Github version and also tried increasing queue. Also cutting to small aoi instead of entire burst and nothing works.

@AlexeyPechnikov
Copy link
Owner

@SteffanDavies Could you share an example notebook to test?

@SteffanDavies
Copy link

SteffanDavies commented Jan 29, 2025

@SteffanDavies Could you share an example notebook to test?

It's based on the Golden Valley notebook. I can share the bursts and AOI.

AOI_WKT = "POLYGON((-0.137115 50.820333, -0.138531 50.813853, 0.257149 50.724286, 0.271912 50.744277, -0.135784 50.823397, -0.137115 50.820333))"
AOI_SHPLY = shapely.wkt.loads(AOI_WKT)
AOI = gpd.GeoSeries([AOI_SHPLY]).buffer(0.02)
AOI_GPD = gpd.GeoDataFrame(AOI).rename(columns={0:'geometry'}).set_geometry('geometry')
AOI.to_file('AOI.geojson', driver='GeoJSON')
AOI
BURSTS = """
S1_281678_IW2_20181228T174927_VV_EF9E-BURST
S1_281678_IW2_20181216T174927_VV_3F76-BURST
S1_281678_IW2_20181204T174928_VV_0481-BURST
S1_281678_IW2_20181128T174846_VV_B4DD-BURST
S1_281678_IW2_20181122T174928_VV_CE94-BURST
S1_281678_IW2_20181116T174847_VV_CE51-BURST
S1_281678_IW2_20181110T174929_VV_E805-BURST
S1_281678_IW2_20181104T174847_VV_CCFF-BURST
S1_281678_IW2_20181029T174929_VV_DDD3-BURST
S1_281678_IW2_20181023T174847_VV_4792-BURST
S1_281678_IW2_20181017T174929_VV_B6A1-BURST
S1_281678_IW2_20181011T174847_VV_63FC-BURST
S1_281678_IW2_20181005T174929_VV_8A98-BURST
S1_281678_IW2_20180929T174847_VV_6732-BURST
S1_281678_IW2_20180923T174928_VV_D6C9-BURST
S1_281678_IW2_20180917T174846_VV_7C41-BURST
S1_281678_IW2_20180911T174928_VV_D66D-BURST
S1_281678_IW2_20180905T174846_VV_15E2-BURST
S1_281678_IW2_20180830T174928_VV_FF4F-BURST
S1_281678_IW2_20180824T174845_VV_F7D6-BURST
S1_281678_IW2_20180818T174927_VV_B125-BURST
S1_281678_IW2_20180812T174845_VV_70BB-BURST
S1_281678_IW2_20180806T174926_VV_FD79-BURST
S1_281678_IW2_20180731T174844_VV_3257-BURST
S1_281678_IW2_20180725T174926_VV_275C-BURST
S1_281678_IW2_20180719T174844_VV_9816-BURST
S1_281678_IW2_20180713T174925_VV_058D-BURST
S1_281678_IW2_20180707T174843_VV_04F2-BURST
S1_281678_IW2_20180701T174924_VV_0CDB-BURST
S1_281678_IW2_20180625T174842_VV_AD2E-BURST
S1_281678_IW2_20180619T174923_VV_2164-BURST
S1_281678_IW2_20180613T174841_VV_E69E-BURST
S1_281678_IW2_20180607T174923_VV_0C63-BURST
S1_281678_IW2_20180601T174840_VV_4DAD-BURST
S1_281678_IW2_20180526T174922_VV_65BE-BURST
S1_281678_IW2_20180520T174840_VV_7C40-BURST
S1_281678_IW2_20180514T174921_VV_36EA-BURST
S1_281678_IW2_20180508T174839_VV_7C8F-BURST
S1_281678_IW2_20180502T174921_VV_8BD6-BURST
S1_281678_IW2_20180426T174838_VV_9701-BURST
S1_281678_IW2_20180420T174920_VV_10ED-BURST
S1_281678_IW2_20180414T174838_VV_6937-BURST
S1_281678_IW2_20180408T174920_VV_9173-BURST
S1_281678_IW2_20180402T174838_VV_5CAF-BURST
S1_281678_IW2_20180327T174919_VV_EF29-BURST
S1_281678_IW2_20180321T174837_VV_189E-BURST
S1_281678_IW2_20180315T174919_VV_7B0B-BURST
S1_281678_IW2_20180309T174837_VV_C063-BURST
S1_281678_IW2_20180303T174919_VV_C6C2-BURST
S1_281678_IW2_20180225T174837_VV_17B2-BURST
S1_281678_IW2_20180219T174919_VV_9626-BURST
S1_281678_IW2_20180213T174837_VV_A987-BURST
S1_281678_IW2_20180207T174919_VV_9A42-BURST
S1_281678_IW2_20180201T174837_VV_2FEE-BURST
S1_281678_IW2_20180126T174919_VV_FEC2-BURST
S1_281678_IW2_20180120T174838_VV_4C44-BURST
S1_281678_IW2_20180114T174920_VV_69E2-BURST
S1_281678_IW2_20180108T174838_VV_CAF9-BURST
S1_281678_IW2_20180102T174920_VV_C525-BURST
S1_281678_IW2_20171227T174839_VV_6DE6-BURST
S1_281678_IW2_20171221T174920_VV_6BC5-BURST
S1_281678_IW2_20171215T174839_VV_816C-BURST
S1_281678_IW2_20171209T174921_VV_57D5-BURST
S1_281678_IW2_20171203T174839_VV_1E60-BURST
S1_281678_IW2_20171127T174922_VV_830B-BURST
S1_281678_IW2_20171121T174840_VV_A3C3-BURST
S1_281678_IW2_20171115T174922_VV_E88C-BURST
S1_281678_IW2_20171109T174840_VV_1E2C-BURST
S1_281678_IW2_20171103T174922_VV_92C8-BURST
S1_281678_IW2_20171028T174840_VV_785C-BURST
S1_281678_IW2_20171022T174922_VV_FA38-BURST
S1_281678_IW2_20171016T174840_VV_69D4-BURST
S1_281678_IW2_20171010T174922_VV_38D4-BURST
S1_281678_IW2_20171004T174840_VV_B563-BURST
S1_281678_IW2_20170928T174922_VV_A847-BURST
S1_281678_IW2_20170922T174840_VV_7861-BURST
S1_281678_IW2_20170916T174922_VV_B6C0-BURST
S1_281678_IW2_20170910T174839_VV_5597-BURST
S1_281678_IW2_20170904T174921_VV_F240-BURST
S1_281678_IW2_20170829T174839_VV_6385-BURST
S1_281678_IW2_20170823T174921_VV_F26C-BURST
S1_281678_IW2_20170817T174838_VV_0215-BURST
S1_281678_IW2_20170811T174920_VV_7865-BURST
S1_281678_IW2_20170805T174838_VV_3B4F-BURST
S1_281678_IW2_20170730T174920_VV_6878-BURST
S1_281678_IW2_20170724T174837_VV_DA1C-BURST
S1_281678_IW2_20170718T174919_VV_CE2D-BURST
S1_281678_IW2_20170712T174836_VV_FCED-BURST
S1_281678_IW2_20170706T174918_VV_F5BA-BURST
S1_281678_IW2_20170630T174836_VV_07BB-BURST
S1_281678_IW2_20170624T174917_VV_17E1-BURST
S1_281678_IW2_20170618T174835_VV_A9DC-BURST
S1_281678_IW2_20170612T174917_VV_CBA0-BURST
S1_281678_IW2_20170606T174834_VV_76F9-BURST
S1_281678_IW2_20170531T174916_VV_3056-BURST
S1_281678_IW2_20170525T174833_VV_96DA-BURST
S1_281678_IW2_20170519T174915_VV_E8C7-BURST
S1_281678_IW2_20170513T174833_VV_8036-BURST
S1_281678_IW2_20170507T174915_VV_E8BD-BURST
S1_281678_IW2_20170501T174832_VV_5779-BURST
S1_281678_IW2_20170425T174914_VV_D68E-BURST
S1_281678_IW2_20170419T174832_VV_A820-BURST
S1_281678_IW2_20170413T174913_VV_D37E-BURST
S1_281678_IW2_20170407T174831_VV_8215-BURST
S1_281678_IW2_20170401T174913_VV_BDCD-BURST
S1_281678_IW2_20170326T174831_VV_F08B-BURST
S1_281678_IW2_20170320T174913_VV_ADAB-BURST
S1_281678_IW2_20170314T174831_VV_2528-BURST
S1_281678_IW2_20170308T174912_VV_31B5-BURST
S1_281678_IW2_20170302T174830_VV_470F-BURST
S1_281678_IW2_20170224T174912_VV_6A86-BURST
S1_281678_IW2_20170218T174830_VV_7616-BURST
S1_281678_IW2_20170212T174912_VV_29D4-BURST
S1_281678_IW2_20170206T174831_VV_C29E-BURST
S1_281678_IW2_20170131T174913_VV_F43A-BURST
S1_281678_IW2_20170125T174831_VV_CEA7-BURST
S1_281678_IW2_20170119T174913_VV_4A5B-BURST
S1_281678_IW2_20170113T174831_VV_16D7-BURST
S1_281678_IW2_20170107T174913_VV_32D5-BURST
S1_281678_IW2_20170101T174832_VV_393D-BURST
S1_281678_IW2_20161226T174915_VV_5AB4-BURST
S1_281678_IW2_20161220T174833_VV_1EA3-BURST
S1_281678_IW2_20161214T174915_VV_C939-BURST
S1_281678_IW2_20161208T174833_VV_F707-BURST
S1_281678_IW2_20161202T174916_VV_9F0B-BURST
S1_281678_IW2_20161126T174834_VV_89DE-BURST
S1_281678_IW2_20161120T174916_VV_E735-BURST
S1_281678_IW2_20161114T174834_VV_04A9-BURST
S1_281678_IW2_20161108T174916_VV_9981-BURST
S1_281678_IW2_20161102T174834_VV_F294-BURST
S1_281678_IW2_20161027T174916_VV_5274-BURST
S1_281678_IW2_20161021T174834_VV_9461-BURST
S1_281678_IW2_20161015T174916_VV_9290-BURST
S1_281678_IW2_20161009T174834_VV_C9B7-BURST
S1_281678_IW2_20161003T174916_VV_2421-BURST
S1_281678_IW2_20160927T174834_VV_AD66-BURST
S1_281678_IW2_20160921T174916_VV_3545-BURST
S1_281678_IW2_20160909T174916_VV_4FD4-BURST
S1_281678_IW2_20160816T174915_VV_00F1-BURST
S1_281678_IW2_20160804T174914_VV_A2D6-BURST
S1_281678_IW2_20160723T174913_VV_D008-BURST
S1_281678_IW2_20160629T174912_VV_8E5D-BURST
S1_281678_IW2_20160605T174911_VV_44E2-BURST
S1_281678_IW2_20160524T174910_VV_B724-BURST
S1_281678_IW2_20160512T174909_VV_7573-BURST
S1_281678_IW2_20160430T174909_VV_5095-BURST
S1_281678_IW2_20160418T174908_VV_03A3-BURST
S1_281678_IW2_20160406T174908_VV_FC93-BURST
S1_281678_IW2_20160325T174907_VV_0D72-BURST
S1_281678_IW2_20160313T174907_VV_60C9-BURST
S1_281678_IW2_20160301T174907_VV_4E3A-BURST
S1_281678_IW2_20160218T174907_VV_F996-BURST
S1_281678_IW2_20160206T174907_VV_D470-BURST
S1_281678_IW2_20160125T174907_VV_C487-BURST
S1_281678_IW2_20160113T174907_VV_A1C2-BURST
S1_281678_IW2_20160101T174908_VV_3C71-BURST
S1_281678_IW2_20151220T174908_VV_B76C-BURST
S1_281678_IW2_20151208T174909_VV_10E4-BURST
S1_281678_IW2_20151126T174909_VV_2DDD-BURST
S1_281678_IW2_20151114T174909_VV_CACF-BURST
S1_281678_IW2_20150729T174907_VV_C08D-BURST
S1_281678_IW2_20150717T174906_VV_7ED4-BURST
S1_281678_IW2_20150623T174906_VV_FE56-BURST
S1_281678_IW2_20150611T174905_VV_7416-BURST
S1_281678_IW2_20150530T174905_VV_B564-BURST
S1_281678_IW2_20150518T174904_VV_4ADF-BURST
S1_281678_IW2_20150506T174903_VV_C97C-BURST
S1_281678_IW2_20150424T174902_VV_BA56-BURST
S1_281678_IW2_20150412T174902_VV_BEBD-BURST
S1_281678_IW2_20150331T174901_VV_0534-BURST
S1_281678_IW2_20150319T174901_VV_5C9A-BURST
S1_281678_IW2_20150307T174901_VV_012A-BURST
"""
BURSTS = list(filter(None, BURSTS.split('\n')))
print (f'Bursts defined: {len(BURSTS)}')

@athifsayyaf
Copy link

I got resolved the problem.it was the issue with burst with varying lengths. Thank you for your support

How did you resolve this? By excluding scenes?

I excluded the burst images that are outside the AOI.

@AlexeyPechnikov
Copy link
Owner

@SteffanDavies There is no problem with your bursts:

Image

@SteffanDavies
Copy link

@SteffanDavies There is no problem with your bursts:

Image

I'm using pygmtsar docker container and also pulled latest git version second time.

The processing of interferograms will finish with error and the interferograms will be less than the total pairs.

@SteffanDavies
Copy link

@SteffanDavies There is no problem with your bursts:

Image

By the way, the error seems to occur on the last pairs. If you processed only the first, you likely wouldn't see an issue.

@AlexeyPechnikov
Copy link
Owner

All the pairs processed well:

Image

@SteffanDavies
Copy link

All the pairs processed well:

Image

I will upload a copy of the notebook!

@SteffanDavies
Copy link

All the pairs processed well:

Image

@AlexeyPechnikov

Ok I think I solved it.

I was updating to latest PyGMTSAR Git version but was not using sudo when upgrading the package. I didn't notice this because it was in quiet mode.

I think the latest PyGMTSAR has solved this problem...

Best regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants