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

[Help]: PSI and SBAS geocoding #101

Open
oguzhannysr opened this issue Feb 16, 2024 · 14 comments
Open

[Help]: PSI and SBAS geocoding #101

oguzhannysr opened this issue Feb 16, 2024 · 14 comments

Comments

@oguzhannysr
Copy link

Hello @AlexeyPechnikov,
I produced displacement maps in a region for PSI and SBAS in a notebook called GoldenValley. However, my output results do not have a coordinate system, they appear as row and column indexes, as in the image. How can I do that. I need georeferencing for my disp_ps.grd and disp_sbas.grd result files. Another question I have is that when I open the output results, the spatial resolution is 1 meter.
image

image

Also, the PSI result image appears differently, I cannot understand whether there is an error.
image
image

@AlexeyPechnikov
Copy link
Owner

You open internal processing files which have a special format. Geocode and export the files as explained in the examples.

@oguzhannysr
Copy link
Author

So, is my spatial resolution output correct?

@AlexeyPechnikov
Copy link
Owner

This is the rasters pixel spacing, not meters.

@oguzhannysr
Copy link
Author

oguzhannysr commented Feb 20, 2024

Well @AlexeyPechnikov I managed to get the GoldenValley notebook working. However, I have a question. I want to separate my sbas and psi results, that is, my LOS changes, as vertical and east-west. Which function will I do this with?

@AlexeyPechnikov
Copy link
Owner

Please refer to 'CENTRAL Türkiye Mw 7.8 & 7.5 Earthquakes Co-Seismic Interferogram, 2023.' example.

image image

@oguzhannysr
Copy link
Author

oguzhannysr commented Feb 20, 2024

image
However, I could not see a line of code related to detrend in the GoldenValley notebook. What should I specify instead of Detrend?

@oguzhannysr
Copy link
Author

@AlexeyPechnikov Also, after a while, I get this error in the middle of the code and I cannot proceed to the result. What is the reason for this? I use Colab Pro, but I encounter this error when processing big data. Problems with the session usually start after this code:
sbas.plot_displacements(disp_sbas[::3], caption='SBAS Cumulative LOS Displacement, [mm]', quantile=[0.01, 0.99])

ERROR:asyncio:Task exception was never retrieved
future: <Task finished name='Task-2069812' coro=<Client._gather..wait() done, defined at /usr/local/lib/python3.10/dist-packages/distributed/client.py:2208> exception=AllExit()>
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/distributed/client.py", line 2217, in wait
raise AllExit()
distributed.client.AllExit

@AlexeyPechnikov
Copy link
Owner

'detrend' is your unwrapped and detrended phase. You can miss the detrending step if you don't need it for your case.

'asyncio' is just a web sockets communication library and you can ignore the message.

@oguzhannysr
Copy link
Author

oguzhannysr commented Feb 28, 2024

@AlexeyPechnikov ,I have one last question, in this notebook I produced the LOS displacement map using my images in the ascending direction. How do I decide if this data is an up-down or east-west change? I tried parsing ud - ew using methods in other notebooks, but the results were too big and ridiculous.

image
Also, I still haven't found what to write in parentheses instead of this detrend in the goldenvalley notebook.

@AlexeyPechnikov
Copy link
Owner

To obtain the actual values, you need to sum the west-east or vertical displacements from two orbits, or employ an alternative method to determine the projections.

The 'detrend' variable contains the detrended, unwrapped phase. You can utilize the unwrapped phase directly or subtract the linear regression trend from the phase, among other techniques.

@oguzhannysr
Copy link
Author

oguzhannysr commented Mar 8, 2024

`---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
in <cell line: 1>()
----> 1 unwrap_sbas = sbas.unwrap_snaphu(intf_sbas, corr_sbas).where(corr_sbas_stack>=CORRLIMIT)
2 unwrap_sbas

5 frames
/usr/local/lib/python3.10/dist-packages/xarray/core/variable.py in calculate_dimensions(variables)
2938 for dim, size in zip(var.dims, var.shape):
2939 if dim in scalar_vars:
-> 2940 raise ValueError(
2941 f"dimension {dim!r} already exists as a scalar variable"
2942 )

ValueError: dimension 'pair' already exists as a scalar variable`

@AlexeyPechnikov ,What is the reason for this error?

@SteffanDavies
Copy link

To obtain the actual values, you need to sum the west-east or vertical displacements from two orbits, or employ an alternative method to determine the projections.

The 'detrend' variable contains the detrended, unwrapped phase. You can utilize the unwrapped phase directly or subtract the linear regression trend from the phase, among other techniques.

I have developed a vertical and east-west decomposition based on an algorithm from published literature. It uses a search radius to combine points onto a lower resolution grid and decomposes the projections based on local incidence angle derived from a DEM which takes into account the slope. It does however depend on SNAP to create the local incidence angle, and using other tools such as GDAL did not give me the expected results. It would be interesting to see how you would approach this.

@AlexeyPechnikov
Copy link
Owner

@SteffanDavies

I have developed a vertical and east-west decomposition based on an algorithm from published literature. It uses a search radius to combine points onto a lower resolution grid...

The task should be resolved by using proper geocoding on the same grid instead of later interpolations. PyGMTSAR produces geocoded results aligned with DEM pixels, meaning that when using the same DEM, we have identical output grids for two orbits. Simply sum the grids to produce the actual up-down and east-west components.

@AlexeyPechnikov
Copy link
Owner

@oguzhannysr

What is the reason for this error?

The 'stack' dimension is incorrect. It appears that you are applying 3D processing code to a single interferogram, or vice versa.

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

3 participants