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]: STL questions regarding dates and residual/ trend variables #109

Open
benwright-davra opened this issue Mar 1, 2024 · 1 comment

Comments

@benwright-davra
Copy link

Describe the problem you encountered
I've been looking into the STL outputs more closely and I'm struggling to understand a few key concepts. I've looked at #89 and #95 and have looked at the code base but still have some questions.

Firstly, I noticed when exporting the STL that the dates generated by the algorithm are not the same as the dates SLC imagery have been captured. Is this because of the method used to aggregate data for the full time-series then generates its own set of dates?

Secondly, the trend and residual information seem to be appearing a little strangely in my outputs. Here are some examples compared to displacement time-series:
S10_plot
S13_plot
S14_plot

Here are three random points from an output. You can see that the trend varies significantly and residual values remain at 0. Firstly, I'm not sure why my trend values are significantly different those in your examples, it would appear that by default sbas.stl(disp_sbas) uses a weekly frequency. However, your examples make no call for a different frequency, and yet your trend is very stable throughout the time series. Is there a reason for this? In addition, I notice that even in your examples (Yamchi Dam) your residual remains at a value of zero consistently. Is there any reason for this?

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

  • OS: Linux Mint 21.1 Cinnamon
  • PyGMTSAR version: Docker - tag: 2024-02-18
@AlexeyPechnikov
Copy link
Owner

STL operates only on regularly spaced data, with the default interval being one week ('freq='W', periods=52'). For more information, visit https://www.statsmodels.org/stable/examples/notebooks/generated/stl_decomposition.html. While it's possible to use intervals of 6 or 12 days for regularly spacing scenes, I do not recommend doing so because some scenes might be too noisy, and we may need to exclude them, which disrupts the process.

Please use the Stack.plot_baseline_displacement() function, which plots all data in radians and provides p-values and RMSE assessments. Without these validity metrics, we cannot ascertain the value of the trends. Your STL trends appear to be incorrect due to their high-frequency variations.

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