LinkedEarth / Pyleoclim_util

Python Package for the Analysis of Paleoclimate Data. Documentation at
https://pyleoclim-util.readthedocs.io
GNU General Public License v3.0
88 stars 33 forks source link

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

Closed CommonClimate closed 6 months ago

CommonClimate commented 6 months ago

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 commented 6 months ago

Telecon 04/12 decisions:

CommonClimate commented 6 months ago

addressed by #540