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

passing ntau to wavelet_coherence causes an error #484

Closed
neillinehan opened this issue Dec 22, 2023 · 1 comment · Fixed by #485
Closed

passing ntau to wavelet_coherence causes an error #484

neillinehan opened this issue Dec 22, 2023 · 1 comment · Fixed by #485

Comments

@neillinehan
Copy link
Contributor

neillinehan commented Dec 22, 2023

Describe the bug
When passing ntau to wavelet_coherence() while using the wwz method, an error is produced as wwz_coherence() does not have an argument for ntau.

example function call that produces the error:

APAR_pyleo.wavelet_coherence(SIFA_pyleo,'wwz',
freq_kwargs={'nfreq':100},
verbose=True,
settings={'ntau':150})

image

neillinehan added a commit to neillinehan/Pyleoclim_util that referenced this issue Dec 22, 2023
@neillinehan
Copy link
Contributor Author

Not sure if this should be a separate issue, but when trying to apply signif_test() to the Coherence instance with ntau not equal to 50, wavelet_coherence() ignores the new tau vector, causing an error with plotting the significance values:

image

Expected behavior:

Dimension 0 of significant values matrix would have same length of tau of Coherence instance.

Actual behavior:

Dimension 0 of significant values matrix is 50 regardless of length of tau of Coherence instance.
image

neillinehan added a commit to neillinehan/Pyleoclim_util that referenced this issue Dec 22, 2023
Fixes part-2 of issue: LinkedEarth#484

Move ntau-pop up to avoid errors where ntau does not exist.

Add condition for the scenario where 'tau' is in settings, (as is the case when signif_test() calls wavelet_coherence()).
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

Successfully merging a pull request may close this issue.

1 participant