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

Wavelet coherence order #452

Open
shiness11 opened this issue Jul 5, 2023 · 2 comments
Open

Wavelet coherence order #452

shiness11 opened this issue Jul 5, 2023 · 2 comments
Assignees
Labels
bug lite bugs that are not really bugs (won't affect results significantly)

Comments

@shiness11
Copy link

Describe the bug
When performing the wavelet coherence analysis on two datasets (a d13C record and eNd record from the same sediment core), the order that the timeseries are placed in the calculation gives slightly different scalograms.

To Reproduce
Steps to reproduce the behavior:
@CommonClimate has a copy of the notebook I have been working on, along with the relevant datasets. The two lines of code which should give the same result are:

  1. coh = eNd1479_MPT.wavelet_coherence(d13C1479_MPT.flip())
    and
  2. coh = d13C1479_MPT.wavelet_coherence(eNd1479_MPT.flip())
    Screenshots corresponding to lines 1 and 2 are below.

Expected behavior
Based on conversations with @CommonClimate, the function should be reversible (other than the phase, which would be of opposite sign), so it's not clear why the two scalograms look slightly different.

Screenshots
From line 1:
Screen Shot 2023-07-05 at 11 56 05 AM
From line 2:
Screen Shot 2023-07-05 at 11 56 58 AM

Desktop (please complete the following information):

  • OS: iOS
  • Browser: chrome
  • Version: Chrome version 114.0.5735.133
@khider khider added this to To do in Development status Aug 25, 2023
@khider khider added the bug label Aug 25, 2023
@khider khider added bug lite bugs that are not really bugs (won't affect results significantly) and removed bug labels Aug 26, 2023
@khider
Copy link
Member

khider commented May 3, 2024

The tau vector is calculated from the first time series, creating slightly different values.

@CommonClimate
Copy link
Collaborator

Thanks @khider! @shiness11 this explains the mystery. At some point we will improve the choice of a common tau vector (the time values at which the coherence is evaluated), but since it does not appear to make a material difference in most applications I've seen (including yours), this is not a high priority.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug lite bugs that are not really bugs (won't affect results significantly)
Projects
Status: To do
Development

No branches or pull requests

3 participants