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]: Velocity Map from sbas_parralell #113

Open
kinreich opened this issue Mar 20, 2024 · 1 comment
Open

[Help]: Velocity Map from sbas_parralell #113

kinreich opened this issue Mar 20, 2024 · 1 comment

Comments

@kinreich
Copy link

Hi,
I'm running a long time-series using the previous version of pygmtsar, because all my data progress is saved in the last version.

Last I ran sbas_paralell because sbas.sbas has an issue, and now I have disp grid for each date.

I'm trying to find the code to calculate the velocity displacement from these files, and cannot find any.
Could you please help explain how to produce the velocity grd from disp grd in pygmtsar?

OS and software version

  • OS: Ubuntu 20.04.5 LTS
  • PyGMTSAR version: pygmtsar-v2023.3.11
@AlexeyPechnikov
Copy link
Owner

Depending on your PyGMTSAR version, you can try the functions sbas.trend() and sbas.stl(). If these are not available, the linear regression trend can easily be computed as in the trend() function:

    def trend(self, data, deg=1):
        import xarray as xr

        trend = xr.polyval(data.date, data.polyfit('date', deg).polyfit_coefficients)
        return trend

Divide the LOS, vertical, or east-west displacement trend difference (last minus first value per pixel) by your time interval in years to get the velocity in mm/year.

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

2 participants