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

Better default frequency vector choice for unevenly-spaced records #536

Closed
CommonClimate opened this issue Apr 12, 2024 · 2 comments
Closed
Assignees

Comments

@CommonClimate
Copy link
Collaborator

Consistently, my experience has been that the spectral analysis of unevenly-spaced records results in spectra that are heavily distorted, regardless of the spectral method (LS or WWZ), and with all currently existing freq_method options.

Here is a minimal working example:

import pyleoclim as pyleo
LR04 = pyleo.utils.load_dataset('LR04')
psd_ls = LR04.standardize().spectral()
psd_sig = psd_ls.signif_test(number=100)
fig, ax = psd_sig.plot()

The result shows a singularity near the Nyquist frequency:
freaqy_spectrum

Passing a custom vector can help, but it requires knowing a fair bit about the jargon (OFAC, HIFAC, etc) AND the AR(1) spectra still don't look like what they are supposed to (i.e. tapering off at low frequencies). I suspect that enough tinkering can solve the problem, but that is not fair to expect of our users. There has to be a better way.

Proposal: either better defaults for the choice of freq_method, or a tutorial that explicitly addresses this.

@CommonClimate
Copy link
Collaborator Author

CommonClimate commented Apr 12, 2024

Telecon 04/12 decisions:

  • fix utils.spectral.lomb-scargle() to avoid returning nonsensical low freq (limit frequencies at 1/Length)
  • add to the spectral PyleoTutorial a section on the importance of the frequency vector for unevenly spaced series
  • generate freq vector from MTM on interpolated series

@CommonClimate
Copy link
Collaborator Author

addressed by #540

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

1 participant