Chapter 5: Wavelets and Coherency#

by Julien Emile-Geay, University of Southern California

Preamble#

Wavelets are a very broad topic in applied mathematics, which we won’t attempt to summarize here. In the geoscience context, the term nearly always refers to the Continuous Wavelet Transform, and 99% of the time this uses the Morlet wavelet, which is a generalization of Fourier bases to endow them with localization in time and scale. In this tutorial we will look at how the frequency content of two instrumental climate timeseries (NINO3 and All India Rainfall) evolves over time, then assess their coherence as a function of scale. The geoscience motivation is to understand at what scales, if any, ENSO and the Indian Moonsoon might be related.

Goals#

  • Wavelet and coherence analysis for unevenly-spaced timeseries data

  • Learning about the Scalogram and Coherence classes

  • How to establish the significance of scalogram or coherence

  • How to interpret the results of wavelet and wavelet coherence analyses

Reading Time: 20 min

Keywords#

Wavelet Analysis, Wavelet Transform Coherency, Visualization

Pre-requisites#

Some timeseries analysis, ideally

Relevant Packages#

pyleoclim, pandas, matplotlib, numpy

Data description#

Let us first load necessary packages:

import matplotlib.pyplot as plt
import pyleoclim as pyleo
import numpy as np

Data Wrangling#

The datasets already ship with Pyleoclim, making loading a breeze:

nino3 = pyleo.utils.load_dataset('NINO3')
air = pyleo.utils.load_dataset('AIR')
ms = air & nino3
ms.label = 'ENSO vs Indian Moosoon'
ms.standardize().plot()
(<Figure size 1000x400 with 1 Axes>,
 <Axes: title={'center': 'ENSO vs Indian Moosoon'}, xlabel='Time [year C.E.]', ylabel='value'>)
../_images/e4a696b8ec8c5911f959e2bbcabb69d80e14d95263a80dd68cba553ef7b498b7.png

At first glance there isn’t anything terribly obvious about how these two variables might relate. Precipitation is generally a noisier variable than sea-surface temperature, displaying much more short-term variability. To see this, let’s look at the spectra of these two series.

Spectral Analysis#

fig, axs = plt.subplots(1,2,sharey=True, figsize=(10,4))
prop_cycle = plt.rcParams['axes.prop_cycle']
colors = prop_cycle.by_key()['color']
axs.flatten()
for i, ts in enumerate(ms.series_list):
    psd = ts.spectral(method='mtm')
    psds = psd.signif_test(number=1000)
    psds.plot(ax=axs[i], color=colors[i],legend=False,
             title=ts.label)
Performing spectral analysis on individual series:   0%|                                                       | 0/1000 [00:00<?, ?it/s]
Performing spectral analysis on individual series:   0%|                                               | 2/1000 [00:00<00:51, 19.31it/s]
Performing spectral analysis on individual series:   0%|▏                                              | 4/1000 [00:00<00:55, 17.92it/s]
Performing spectral analysis on individual series:   1%|▎                                              | 6/1000 [00:00<00:54, 18.39it/s]
Performing spectral analysis on individual series:   1%|▍                                              | 9/1000 [00:00<00:50, 19.47it/s]
Performing spectral analysis on individual series:   1%|▌                                             | 12/1000 [00:00<00:49, 20.01it/s]
Performing spectral analysis on individual series:   2%|▋                                             | 15/1000 [00:00<00:48, 20.16it/s]
Performing spectral analysis on individual series:   2%|▊                                             | 18/1000 [00:00<00:48, 20.30it/s]
Performing spectral analysis on individual series:   2%|▉                                             | 21/1000 [00:01<00:47, 20.46it/s]
Performing spectral analysis on individual series:   2%|█                                             | 24/1000 [00:01<00:47, 20.50it/s]
Performing spectral analysis on individual series:   3%|█▏                                            | 27/1000 [00:01<00:48, 20.15it/s]
Performing spectral analysis on individual series:   3%|█▍                                            | 30/1000 [00:01<00:47, 20.34it/s]
Performing spectral analysis on individual series:   3%|█▌                                            | 33/1000 [00:01<00:47, 20.51it/s]
Performing spectral analysis on individual series:   4%|█▋                                            | 36/1000 [00:01<00:47, 20.34it/s]
Performing spectral analysis on individual series:   4%|█▊                                            | 39/1000 [00:01<00:47, 20.37it/s]
Performing spectral analysis on individual series:   4%|█▉                                            | 42/1000 [00:02<00:47, 20.35it/s]
Performing spectral analysis on individual series:   4%|██                                            | 45/1000 [00:02<00:47, 20.31it/s]
Performing spectral analysis on individual series:   5%|██▏                                           | 48/1000 [00:02<00:47, 20.12it/s]
Performing spectral analysis on individual series:   5%|██▎                                           | 51/1000 [00:02<00:46, 20.36it/s]
Performing spectral analysis on individual series:   5%|██▍                                           | 54/1000 [00:02<00:46, 20.43it/s]
Performing spectral analysis on individual series:   6%|██▌                                           | 57/1000 [00:02<00:46, 20.18it/s]
Performing spectral analysis on individual series:   6%|██▊                                           | 60/1000 [00:02<00:46, 20.21it/s]
Performing spectral analysis on individual series:   6%|██▉                                           | 63/1000 [00:03<00:45, 20.40it/s]
Performing spectral analysis on individual series:   7%|███                                           | 66/1000 [00:03<00:45, 20.38it/s]
Performing spectral analysis on individual series:   7%|███▏                                          | 69/1000 [00:03<00:45, 20.35it/s]
Performing spectral analysis on individual series:   7%|███▎                                          | 72/1000 [00:03<00:45, 20.54it/s]
Performing spectral analysis on individual series:   8%|███▍                                          | 75/1000 [00:03<00:44, 20.60it/s]
Performing spectral analysis on individual series:   8%|███▌                                          | 78/1000 [00:03<00:45, 20.05it/s]
Performing spectral analysis on individual series:   8%|███▋                                          | 81/1000 [00:04<00:45, 20.25it/s]
Performing spectral analysis on individual series:   8%|███▊                                          | 84/1000 [00:04<00:45, 20.13it/s]
Performing spectral analysis on individual series:   9%|████                                          | 87/1000 [00:04<00:45, 20.08it/s]
Performing spectral analysis on individual series:   9%|████▏                                         | 90/1000 [00:04<00:45, 20.13it/s]
Performing spectral analysis on individual series:   9%|████▎                                         | 93/1000 [00:04<00:44, 20.17it/s]
Performing spectral analysis on individual series:  10%|████▍                                         | 96/1000 [00:04<00:44, 20.25it/s]
Performing spectral analysis on individual series:  10%|████▌                                         | 99/1000 [00:04<00:45, 20.01it/s]
Performing spectral analysis on individual series:  10%|████▌                                        | 102/1000 [00:05<00:44, 20.23it/s]
Performing spectral analysis on individual series:  10%|████▋                                        | 105/1000 [00:05<00:45, 19.57it/s]
Performing spectral analysis on individual series:  11%|████▊                                        | 107/1000 [00:05<00:45, 19.65it/s]
Performing spectral analysis on individual series:  11%|████▉                                        | 110/1000 [00:05<00:44, 19.98it/s]
Performing spectral analysis on individual series:  11%|█████                                        | 113/1000 [00:05<00:43, 20.28it/s]
Performing spectral analysis on individual series:  12%|█████▏                                       | 116/1000 [00:05<00:43, 20.41it/s]
Performing spectral analysis on individual series:  12%|█████▎                                       | 119/1000 [00:05<00:43, 20.16it/s]
Performing spectral analysis on individual series:  12%|█████▍                                       | 122/1000 [00:06<00:43, 20.40it/s]
Performing spectral analysis on individual series:  12%|█████▋                                       | 125/1000 [00:06<00:42, 20.44it/s]
Performing spectral analysis on individual series:  13%|█████▊                                       | 128/1000 [00:06<00:43, 20.15it/s]
Performing spectral analysis on individual series:  13%|█████▉                                       | 131/1000 [00:06<00:42, 20.31it/s]
Performing spectral analysis on individual series:  13%|██████                                       | 134/1000 [00:06<00:42, 20.38it/s]
Performing spectral analysis on individual series:  14%|██████▏                                      | 137/1000 [00:06<00:43, 20.02it/s]
Performing spectral analysis on individual series:  14%|██████▎                                      | 140/1000 [00:06<00:42, 20.02it/s]
Performing spectral analysis on individual series:  14%|██████▍                                      | 143/1000 [00:07<00:42, 20.29it/s]
Performing spectral analysis on individual series:  15%|██████▌                                      | 146/1000 [00:07<00:41, 20.40it/s]
Performing spectral analysis on individual series:  15%|██████▋                                      | 149/1000 [00:07<00:41, 20.30it/s]
Performing spectral analysis on individual series:  15%|██████▊                                      | 152/1000 [00:07<00:41, 20.37it/s]
Performing spectral analysis on individual series:  16%|██████▉                                      | 155/1000 [00:07<00:41, 20.43it/s]
Performing spectral analysis on individual series:  16%|███████                                      | 158/1000 [00:07<00:41, 20.11it/s]
Performing spectral analysis on individual series:  16%|███████▏                                     | 161/1000 [00:07<00:41, 20.25it/s]
Performing spectral analysis on individual series:  16%|███████▍                                     | 164/1000 [00:08<00:41, 20.06it/s]
Performing spectral analysis on individual series:  17%|███████▌                                     | 167/1000 [00:08<00:41, 20.21it/s]
Performing spectral analysis on individual series:  17%|███████▋                                     | 170/1000 [00:08<00:41, 20.05it/s]
Performing spectral analysis on individual series:  17%|███████▊                                     | 173/1000 [00:08<00:41, 19.98it/s]
Performing spectral analysis on individual series:  18%|███████▉                                     | 176/1000 [00:08<00:40, 20.20it/s]
Performing spectral analysis on individual series:  18%|████████                                     | 179/1000 [00:08<00:41, 19.95it/s]
Performing spectral analysis on individual series:  18%|████████▏                                    | 182/1000 [00:09<00:40, 20.22it/s]
Performing spectral analysis on individual series:  18%|████████▎                                    | 185/1000 [00:09<00:40, 20.12it/s]
Performing spectral analysis on individual series:  19%|████████▍                                    | 188/1000 [00:09<00:40, 20.05it/s]
Performing spectral analysis on individual series:  19%|████████▌                                    | 191/1000 [00:09<00:40, 20.14it/s]
Performing spectral analysis on individual series:  19%|████████▋                                    | 194/1000 [00:09<00:39, 20.33it/s]
Performing spectral analysis on individual series:  20%|████████▊                                    | 197/1000 [00:09<00:39, 20.29it/s]
Performing spectral analysis on individual series:  20%|█████████                                    | 200/1000 [00:09<00:39, 20.09it/s]
Performing spectral analysis on individual series:  20%|█████████▏                                   | 203/1000 [00:10<00:39, 20.31it/s]
Performing spectral analysis on individual series:  21%|█████████▎                                   | 206/1000 [00:10<00:40, 19.84it/s]
Performing spectral analysis on individual series:  21%|█████████▎                                   | 208/1000 [00:10<00:40, 19.76it/s]
Performing spectral analysis on individual series:  21%|█████████▍                                   | 211/1000 [00:10<00:39, 20.02it/s]
Performing spectral analysis on individual series:  21%|█████████▋                                   | 214/1000 [00:10<00:38, 20.35it/s]
Performing spectral analysis on individual series:  22%|█████████▊                                   | 217/1000 [00:10<00:38, 20.25it/s]
Performing spectral analysis on individual series:  22%|█████████▉                                   | 220/1000 [00:10<00:38, 20.01it/s]
Performing spectral analysis on individual series:  22%|██████████                                   | 223/1000 [00:11<00:38, 20.20it/s]
Performing spectral analysis on individual series:  23%|██████████▏                                  | 226/1000 [00:11<00:38, 20.21it/s]
Performing spectral analysis on individual series:  23%|██████████▎                                  | 229/1000 [00:11<00:38, 20.00it/s]
Performing spectral analysis on individual series:  23%|██████████▍                                  | 232/1000 [00:11<00:40, 19.12it/s]
Performing spectral analysis on individual series:  23%|██████████▌                                  | 234/1000 [00:11<00:43, 17.79it/s]
Performing spectral analysis on individual series:  24%|██████████▌                                  | 236/1000 [00:11<00:42, 17.97it/s]
Performing spectral analysis on individual series:  24%|██████████▋                                  | 238/1000 [00:11<00:41, 18.32it/s]
Performing spectral analysis on individual series:  24%|██████████▊                                  | 241/1000 [00:12<00:40, 18.67it/s]
Performing spectral analysis on individual series:  24%|██████████▉                                  | 243/1000 [00:12<00:41, 18.28it/s]
Performing spectral analysis on individual series:  24%|███████████                                  | 245/1000 [00:12<00:41, 18.06it/s]
Performing spectral analysis on individual series:  25%|███████████                                  | 247/1000 [00:12<00:43, 17.29it/s]
Performing spectral analysis on individual series:  25%|███████████▎                                 | 250/1000 [00:12<00:40, 18.42it/s]
Performing spectral analysis on individual series:  25%|███████████▍                                 | 253/1000 [00:12<00:39, 19.09it/s]
Performing spectral analysis on individual series:  26%|███████████▌                                 | 256/1000 [00:12<00:38, 19.39it/s]
Performing spectral analysis on individual series:  26%|███████████▋                                 | 259/1000 [00:12<00:37, 19.65it/s]
Performing spectral analysis on individual series:  26%|███████████▊                                 | 262/1000 [00:13<00:37, 19.85it/s]
Performing spectral analysis on individual series:  26%|███████████▉                                 | 265/1000 [00:13<00:36, 19.93it/s]
Performing spectral analysis on individual series:  27%|████████████                                 | 267/1000 [00:13<00:37, 19.75it/s]
Performing spectral analysis on individual series:  27%|████████████▏                                | 270/1000 [00:13<00:36, 20.10it/s]
Performing spectral analysis on individual series:  27%|████████████▎                                | 273/1000 [00:13<00:36, 20.15it/s]
Performing spectral analysis on individual series:  28%|████████████▍                                | 276/1000 [00:13<00:35, 20.14it/s]
Performing spectral analysis on individual series:  28%|████████████▌                                | 279/1000 [00:13<00:35, 20.35it/s]
Performing spectral analysis on individual series:  28%|████████████▋                                | 282/1000 [00:14<00:36, 19.51it/s]
Performing spectral analysis on individual series:  28%|████████████▊                                | 284/1000 [00:14<00:37, 19.30it/s]
Performing spectral analysis on individual series:  29%|████████████▊                                | 286/1000 [00:14<00:37, 19.00it/s]
Performing spectral analysis on individual series:  29%|████████████▉                                | 288/1000 [00:14<00:37, 19.01it/s]
Performing spectral analysis on individual series:  29%|█████████████                                | 290/1000 [00:14<00:37, 19.02it/s]
Performing spectral analysis on individual series:  29%|█████████████▏                               | 292/1000 [00:14<00:37, 18.97it/s]
Performing spectral analysis on individual series:  29%|█████████████▏                               | 294/1000 [00:14<00:37, 19.03it/s]
Performing spectral analysis on individual series:  30%|█████████████▎                               | 296/1000 [00:14<00:37, 18.75it/s]
Performing spectral analysis on individual series:  30%|█████████████▍                               | 299/1000 [00:15<00:36, 19.29it/s]
Performing spectral analysis on individual series:  30%|█████████████▌                               | 302/1000 [00:15<00:36, 19.03it/s]
Performing spectral analysis on individual series:  30%|█████████████▋                               | 304/1000 [00:15<00:36, 19.10it/s]
Performing spectral analysis on individual series:  31%|█████████████▊                               | 307/1000 [00:15<00:35, 19.59it/s]
Performing spectral analysis on individual series:  31%|█████████████▉                               | 310/1000 [00:15<00:34, 19.98it/s]
Performing spectral analysis on individual series:  31%|██████████████                               | 312/1000 [00:15<00:34, 19.82it/s]
Performing spectral analysis on individual series:  32%|██████████████▏                              | 315/1000 [00:15<00:34, 20.01it/s]
Performing spectral analysis on individual series:  32%|██████████████▎                              | 318/1000 [00:15<00:33, 20.26it/s]
Performing spectral analysis on individual series:  32%|██████████████▍                              | 321/1000 [00:16<00:33, 20.29it/s]
Performing spectral analysis on individual series:  32%|██████████████▌                              | 324/1000 [00:16<00:33, 20.11it/s]
Performing spectral analysis on individual series:  33%|██████████████▋                              | 327/1000 [00:16<00:33, 20.09it/s]
Performing spectral analysis on individual series:  33%|██████████████▊                              | 330/1000 [00:16<00:33, 20.25it/s]
Performing spectral analysis on individual series:  33%|██████████████▉                              | 333/1000 [00:16<00:33, 20.18it/s]
Performing spectral analysis on individual series:  34%|███████████████                              | 336/1000 [00:16<00:33, 20.09it/s]
Performing spectral analysis on individual series:  34%|███████████████▎                             | 339/1000 [00:17<00:33, 19.75it/s]
Performing spectral analysis on individual series:  34%|███████████████▍                             | 342/1000 [00:17<00:33, 19.90it/s]
Performing spectral analysis on individual series:  34%|███████████████▍                             | 344/1000 [00:17<00:33, 19.82it/s]
Performing spectral analysis on individual series:  35%|███████████████▌                             | 346/1000 [00:17<00:33, 19.57it/s]
Performing spectral analysis on individual series:  35%|███████████████▋                             | 349/1000 [00:17<00:33, 19.52it/s]
Performing spectral analysis on individual series:  35%|███████████████▊                             | 351/1000 [00:17<00:34, 19.05it/s]
Performing spectral analysis on individual series:  35%|███████████████▉                             | 353/1000 [00:17<00:33, 19.27it/s]
Performing spectral analysis on individual series:  36%|███████████████▉                             | 355/1000 [00:17<00:33, 19.32it/s]
Performing spectral analysis on individual series:  36%|████████████████                             | 358/1000 [00:18<00:32, 19.76it/s]
Performing spectral analysis on individual series:  36%|████████████████▏                            | 361/1000 [00:18<00:31, 20.02it/s]
Performing spectral analysis on individual series:  36%|████████████████▍                            | 364/1000 [00:18<00:31, 20.09it/s]
Performing spectral analysis on individual series:  37%|████████████████▌                            | 367/1000 [00:18<00:31, 20.20it/s]
Performing spectral analysis on individual series:  37%|████████████████▋                            | 370/1000 [00:18<00:31, 20.18it/s]
Performing spectral analysis on individual series:  37%|████████████████▊                            | 373/1000 [00:18<00:30, 20.46it/s]
Performing spectral analysis on individual series:  38%|████████████████▉                            | 376/1000 [00:18<00:31, 19.86it/s]
Performing spectral analysis on individual series:  38%|█████████████████                            | 379/1000 [00:19<00:30, 20.13it/s]
Performing spectral analysis on individual series:  38%|█████████████████▏                           | 382/1000 [00:19<00:30, 20.15it/s]
Performing spectral analysis on individual series:  38%|█████████████████▎                           | 385/1000 [00:19<00:30, 20.07it/s]
Performing spectral analysis on individual series:  39%|█████████████████▍                           | 388/1000 [00:19<00:30, 20.27it/s]
Performing spectral analysis on individual series:  39%|█████████████████▌                           | 391/1000 [00:19<00:29, 20.40it/s]
Performing spectral analysis on individual series:  39%|█████████████████▋                           | 394/1000 [00:19<00:31, 19.50it/s]
Performing spectral analysis on individual series:  40%|█████████████████▊                           | 396/1000 [00:19<00:31, 19.34it/s]
Performing spectral analysis on individual series:  40%|█████████████████▉                           | 398/1000 [00:20<00:30, 19.42it/s]
Performing spectral analysis on individual series:  40%|██████████████████                           | 400/1000 [00:20<00:30, 19.46it/s]
Performing spectral analysis on individual series:  40%|██████████████████                           | 402/1000 [00:20<00:32, 18.31it/s]
Performing spectral analysis on individual series:  40%|██████████████████▏                          | 404/1000 [00:20<00:32, 18.36it/s]
Performing spectral analysis on individual series:  41%|██████████████████▎                          | 406/1000 [00:20<00:31, 18.58it/s]
Performing spectral analysis on individual series:  41%|██████████████████▎                          | 408/1000 [00:20<00:32, 18.45it/s]
Performing spectral analysis on individual series:  41%|██████████████████▍                          | 411/1000 [00:20<00:30, 19.16it/s]
Performing spectral analysis on individual series:  41%|██████████████████▌                          | 413/1000 [00:20<00:30, 19.07it/s]
Performing spectral analysis on individual series:  42%|██████████████████▋                          | 415/1000 [00:20<00:30, 19.24it/s]
Performing spectral analysis on individual series:  42%|██████████████████▊                          | 418/1000 [00:21<00:29, 19.72it/s]
Performing spectral analysis on individual series:  42%|██████████████████▉                          | 421/1000 [00:21<00:28, 19.99it/s]
Performing spectral analysis on individual series:  42%|███████████████████                          | 423/1000 [00:21<00:28, 19.90it/s]
Performing spectral analysis on individual series:  42%|███████████████████▏                         | 425/1000 [00:21<00:28, 19.90it/s]
Performing spectral analysis on individual series:  43%|███████████████████▏                         | 427/1000 [00:21<00:29, 19.30it/s]
Performing spectral analysis on individual series:  43%|███████████████████▎                         | 430/1000 [00:21<00:29, 19.46it/s]
Performing spectral analysis on individual series:  43%|███████████████████▍                         | 432/1000 [00:21<00:29, 19.46it/s]
Performing spectral analysis on individual series:  43%|███████████████████▌                         | 434/1000 [00:21<00:29, 19.23it/s]
Performing spectral analysis on individual series:  44%|███████████████████▌                         | 436/1000 [00:21<00:29, 19.09it/s]
Performing spectral analysis on individual series:  44%|███████████████████▊                         | 439/1000 [00:22<00:28, 19.74it/s]
Performing spectral analysis on individual series:  44%|███████████████████▉                         | 442/1000 [00:22<00:28, 19.68it/s]
Performing spectral analysis on individual series:  44%|███████████████████▉                         | 444/1000 [00:22<00:28, 19.75it/s]
Performing spectral analysis on individual series:  45%|████████████████████                         | 446/1000 [00:22<00:28, 19.68it/s]
Performing spectral analysis on individual series:  45%|████████████████████▏                        | 449/1000 [00:22<00:27, 20.07it/s]
Performing spectral analysis on individual series:  45%|████████████████████▎                        | 451/1000 [00:22<00:27, 20.01it/s]
Performing spectral analysis on individual series:  45%|████████████████████▍                        | 453/1000 [00:22<00:27, 19.77it/s]
Performing spectral analysis on individual series:  46%|████████████████████▌                        | 456/1000 [00:22<00:27, 20.03it/s]
Performing spectral analysis on individual series:  46%|████████████████████▋                        | 459/1000 [00:23<00:26, 20.33it/s]
Performing spectral analysis on individual series:  46%|████████████████████▊                        | 462/1000 [00:23<00:26, 20.23it/s]
Performing spectral analysis on individual series:  46%|████████████████████▉                        | 465/1000 [00:23<00:26, 20.29it/s]
Performing spectral analysis on individual series:  47%|█████████████████████                        | 468/1000 [00:23<00:26, 20.46it/s]
Performing spectral analysis on individual series:  47%|█████████████████████▏                       | 471/1000 [00:23<00:25, 20.44it/s]
Performing spectral analysis on individual series:  47%|█████████████████████▎                       | 474/1000 [00:23<00:26, 20.11it/s]
Performing spectral analysis on individual series:  48%|█████████████████████▍                       | 477/1000 [00:24<00:25, 20.34it/s]
Performing spectral analysis on individual series:  48%|█████████████████████▌                       | 480/1000 [00:24<00:25, 20.25it/s]
Performing spectral analysis on individual series:  48%|█████████████████████▋                       | 483/1000 [00:24<00:25, 20.34it/s]
Performing spectral analysis on individual series:  49%|█████████████████████▊                       | 486/1000 [00:24<00:25, 20.40it/s]
Performing spectral analysis on individual series:  49%|██████████████████████                       | 489/1000 [00:24<00:25, 20.30it/s]
Performing spectral analysis on individual series:  49%|██████████████████████▏                      | 492/1000 [00:24<00:24, 20.33it/s]
Performing spectral analysis on individual series:  50%|██████████████████████▎                      | 495/1000 [00:24<00:24, 20.27it/s]
Performing spectral analysis on individual series:  50%|██████████████████████▍                      | 498/1000 [00:25<00:24, 20.42it/s]
Performing spectral analysis on individual series:  50%|██████████████████████▌                      | 501/1000 [00:25<00:25, 19.71it/s]
Performing spectral analysis on individual series:  50%|██████████████████████▋                      | 503/1000 [00:25<00:25, 19.51it/s]
Performing spectral analysis on individual series:  51%|██████████████████████▊                      | 506/1000 [00:25<00:24, 19.89it/s]
Performing spectral analysis on individual series:  51%|██████████████████████▊                      | 508/1000 [00:25<00:24, 19.89it/s]
Performing spectral analysis on individual series:  51%|██████████████████████▉                      | 511/1000 [00:25<00:24, 20.10it/s]
Performing spectral analysis on individual series:  51%|███████████████████████▏                     | 514/1000 [00:25<00:24, 19.86it/s]
Performing spectral analysis on individual series:  52%|███████████████████████▎                     | 517/1000 [00:26<00:23, 20.13it/s]
Performing spectral analysis on individual series:  52%|███████████████████████▍                     | 520/1000 [00:26<00:24, 19.98it/s]
Performing spectral analysis on individual series:  52%|███████████████████████▌                     | 523/1000 [00:26<00:23, 20.05it/s]
Performing spectral analysis on individual series:  53%|███████████████████████▋                     | 526/1000 [00:26<00:23, 20.24it/s]
Performing spectral analysis on individual series:  53%|███████████████████████▊                     | 529/1000 [00:26<00:23, 20.30it/s]
Performing spectral analysis on individual series:  53%|███████████████████████▉                     | 532/1000 [00:26<00:22, 20.40it/s]
Performing spectral analysis on individual series:  54%|████████████████████████                     | 535/1000 [00:26<00:22, 20.35it/s]
Performing spectral analysis on individual series:  54%|████████████████████████▏                    | 538/1000 [00:27<00:22, 20.51it/s]
Performing spectral analysis on individual series:  54%|████████████████████████▎                    | 541/1000 [00:27<00:22, 20.57it/s]
Performing spectral analysis on individual series:  54%|████████████████████████▍                    | 544/1000 [00:27<00:22, 20.44it/s]
Performing spectral analysis on individual series:  55%|████████████████████████▌                    | 547/1000 [00:27<00:22, 20.27it/s]
Performing spectral analysis on individual series:  55%|████████████████████████▊                    | 550/1000 [00:27<00:22, 20.01it/s]
Performing spectral analysis on individual series:  55%|████████████████████████▉                    | 553/1000 [00:27<00:22, 20.05it/s]
Performing spectral analysis on individual series:  56%|█████████████████████████                    | 556/1000 [00:27<00:22, 20.06it/s]
Performing spectral analysis on individual series:  56%|█████████████████████████▏                   | 559/1000 [00:28<00:21, 20.31it/s]
Performing spectral analysis on individual series:  56%|█████████████████████████▎                   | 562/1000 [00:28<00:21, 20.35it/s]
Performing spectral analysis on individual series:  56%|█████████████████████████▍                   | 565/1000 [00:28<00:21, 20.24it/s]
Performing spectral analysis on individual series:  57%|█████████████████████████▌                   | 568/1000 [00:28<00:21, 20.46it/s]
Performing spectral analysis on individual series:  57%|█████████████████████████▋                   | 571/1000 [00:28<00:20, 20.55it/s]
Performing spectral analysis on individual series:  57%|█████████████████████████▊                   | 574/1000 [00:28<00:20, 20.35it/s]
Performing spectral analysis on individual series:  58%|█████████████████████████▉                   | 577/1000 [00:28<00:20, 20.49it/s]
Performing spectral analysis on individual series:  58%|██████████████████████████                   | 580/1000 [00:29<00:20, 20.65it/s]
Performing spectral analysis on individual series:  58%|██████████████████████████▏                  | 583/1000 [00:29<00:20, 20.61it/s]
Performing spectral analysis on individual series:  59%|██████████████████████████▎                  | 586/1000 [00:29<00:20, 20.45it/s]
Performing spectral analysis on individual series:  59%|██████████████████████████▌                  | 589/1000 [00:29<00:20, 20.47it/s]
Performing spectral analysis on individual series:  59%|██████████████████████████▋                  | 592/1000 [00:29<00:19, 20.56it/s]
Performing spectral analysis on individual series:  60%|██████████████████████████▊                  | 595/1000 [00:29<00:19, 20.44it/s]
Performing spectral analysis on individual series:  60%|██████████████████████████▉                  | 598/1000 [00:29<00:19, 20.45it/s]
Performing spectral analysis on individual series:  60%|███████████████████████████                  | 601/1000 [00:30<00:19, 20.58it/s]
Performing spectral analysis on individual series:  60%|███████████████████████████▏                 | 604/1000 [00:30<00:20, 19.75it/s]
Performing spectral analysis on individual series:  61%|███████████████████████████▎                 | 607/1000 [00:30<00:19, 19.95it/s]
Performing spectral analysis on individual series:  61%|███████████████████████████▍                 | 610/1000 [00:30<00:19, 20.25it/s]
Performing spectral analysis on individual series:  61%|███████████████████████████▌                 | 613/1000 [00:30<00:19, 20.36it/s]
Performing spectral analysis on individual series:  62%|███████████████████████████▋                 | 616/1000 [00:30<00:19, 20.09it/s]
Performing spectral analysis on individual series:  62%|███████████████████████████▊                 | 619/1000 [00:31<00:18, 20.33it/s]
Performing spectral analysis on individual series:  62%|███████████████████████████▉                 | 622/1000 [00:31<00:18, 20.48it/s]
Performing spectral analysis on individual series:  62%|████████████████████████████▏                | 625/1000 [00:31<00:18, 20.41it/s]
Performing spectral analysis on individual series:  63%|████████████████████████████▎                | 628/1000 [00:31<00:18, 20.53it/s]
Performing spectral analysis on individual series:  63%|████████████████████████████▍                | 631/1000 [00:31<00:18, 20.48it/s]
Performing spectral analysis on individual series:  63%|████████████████████████████▌                | 634/1000 [00:31<00:18, 20.23it/s]
Performing spectral analysis on individual series:  64%|████████████████████████████▋                | 637/1000 [00:31<00:18, 20.16it/s]
Performing spectral analysis on individual series:  64%|████████████████████████████▊                | 640/1000 [00:32<00:17, 20.42it/s]
Performing spectral analysis on individual series:  64%|████████████████████████████▉                | 643/1000 [00:32<00:17, 20.47it/s]
Performing spectral analysis on individual series:  65%|█████████████████████████████                | 646/1000 [00:32<00:17, 20.37it/s]
Performing spectral analysis on individual series:  65%|█████████████████████████████▏               | 649/1000 [00:32<00:17, 20.51it/s]
Performing spectral analysis on individual series:  65%|█████████████████████████████▎               | 652/1000 [00:32<00:16, 20.57it/s]
Performing spectral analysis on individual series:  66%|█████████████████████████████▍               | 655/1000 [00:32<00:16, 20.50it/s]
Performing spectral analysis on individual series:  66%|█████████████████████████████▌               | 658/1000 [00:32<00:16, 20.49it/s]
Performing spectral analysis on individual series:  66%|█████████████████████████████▋               | 661/1000 [00:33<00:16, 20.57it/s]
Performing spectral analysis on individual series:  66%|█████████████████████████████▉               | 664/1000 [00:33<00:16, 20.59it/s]
Performing spectral analysis on individual series:  67%|██████████████████████████████               | 667/1000 [00:33<00:16, 20.43it/s]
Performing spectral analysis on individual series:  67%|██████████████████████████████▏              | 670/1000 [00:33<00:16, 20.62it/s]
Performing spectral analysis on individual series:  67%|██████████████████████████████▎              | 673/1000 [00:33<00:15, 20.52it/s]
Performing spectral analysis on individual series:  68%|██████████████████████████████▍              | 676/1000 [00:33<00:15, 20.35it/s]
Performing spectral analysis on individual series:  68%|██████████████████████████████▌              | 679/1000 [00:33<00:15, 20.35it/s]
Performing spectral analysis on individual series:  68%|██████████████████████████████▋              | 682/1000 [00:34<00:15, 20.42it/s]
Performing spectral analysis on individual series:  68%|██████████████████████████████▊              | 685/1000 [00:34<00:15, 20.24it/s]
Performing spectral analysis on individual series:  69%|██████████████████████████████▉              | 688/1000 [00:34<00:15, 20.05it/s]
Performing spectral analysis on individual series:  69%|███████████████████████████████              | 691/1000 [00:34<00:15, 20.00it/s]
Performing spectral analysis on individual series:  69%|███████████████████████████████▏             | 694/1000 [00:34<00:15, 20.27it/s]
Performing spectral analysis on individual series:  70%|███████████████████████████████▎             | 697/1000 [00:34<00:15, 19.93it/s]
Performing spectral analysis on individual series:  70%|███████████████████████████████▍             | 700/1000 [00:35<00:14, 20.13it/s]
Performing spectral analysis on individual series:  70%|███████████████████████████████▋             | 703/1000 [00:35<00:14, 20.18it/s]
Performing spectral analysis on individual series:  71%|███████████████████████████████▊             | 706/1000 [00:35<00:15, 19.59it/s]
Performing spectral analysis on individual series:  71%|███████████████████████████████▉             | 709/1000 [00:35<00:14, 19.99it/s]
Performing spectral analysis on individual series:  71%|████████████████████████████████             | 712/1000 [00:35<00:14, 20.26it/s]
Performing spectral analysis on individual series:  72%|████████████████████████████████▏            | 715/1000 [00:35<00:14, 20.24it/s]
Performing spectral analysis on individual series:  72%|████████████████████████████████▎            | 718/1000 [00:35<00:14, 20.04it/s]
Performing spectral analysis on individual series:  72%|████████████████████████████████▍            | 721/1000 [00:36<00:13, 20.29it/s]
Performing spectral analysis on individual series:  72%|████████████████████████████████▌            | 724/1000 [00:36<00:13, 20.34it/s]
Performing spectral analysis on individual series:  73%|████████████████████████████████▋            | 727/1000 [00:36<00:13, 20.30it/s]
Performing spectral analysis on individual series:  73%|████████████████████████████████▊            | 730/1000 [00:36<00:13, 20.40it/s]
Performing spectral analysis on individual series:  73%|████████████████████████████████▉            | 733/1000 [00:36<00:12, 20.54it/s]
Performing spectral analysis on individual series:  74%|█████████████████████████████████            | 736/1000 [00:36<00:12, 20.32it/s]
Performing spectral analysis on individual series:  74%|█████████████████████████████████▎           | 739/1000 [00:36<00:12, 20.29it/s]
Performing spectral analysis on individual series:  74%|█████████████████████████████████▍           | 742/1000 [00:37<00:12, 20.48it/s]
Performing spectral analysis on individual series:  74%|█████████████████████████████████▌           | 745/1000 [00:37<00:12, 20.57it/s]
Performing spectral analysis on individual series:  75%|█████████████████████████████████▋           | 748/1000 [00:37<00:12, 20.41it/s]
Performing spectral analysis on individual series:  75%|█████████████████████████████████▊           | 751/1000 [00:37<00:12, 20.47it/s]
Performing spectral analysis on individual series:  75%|█████████████████████████████████▉           | 754/1000 [00:37<00:12, 20.46it/s]
Performing spectral analysis on individual series:  76%|██████████████████████████████████           | 757/1000 [00:37<00:11, 20.42it/s]
Performing spectral analysis on individual series:  76%|██████████████████████████████████▏          | 760/1000 [00:37<00:11, 20.52it/s]
Performing spectral analysis on individual series:  76%|██████████████████████████████████▎          | 763/1000 [00:38<00:11, 20.65it/s]
Performing spectral analysis on individual series:  77%|██████████████████████████████████▍          | 766/1000 [00:38<00:11, 20.66it/s]
Performing spectral analysis on individual series:  77%|██████████████████████████████████▌          | 769/1000 [00:38<00:11, 20.50it/s]
Performing spectral analysis on individual series:  77%|██████████████████████████████████▋          | 772/1000 [00:38<00:11, 20.59it/s]
Performing spectral analysis on individual series:  78%|██████████████████████████████████▉          | 775/1000 [00:38<00:10, 20.47it/s]
Performing spectral analysis on individual series:  78%|███████████████████████████████████          | 778/1000 [00:38<00:10, 20.40it/s]
Performing spectral analysis on individual series:  78%|███████████████████████████████████▏         | 781/1000 [00:38<00:10, 20.64it/s]
Performing spectral analysis on individual series:  78%|███████████████████████████████████▎         | 784/1000 [00:39<00:10, 20.76it/s]
Performing spectral analysis on individual series:  79%|███████████████████████████████████▍         | 787/1000 [00:39<00:10, 20.55it/s]
Performing spectral analysis on individual series:  79%|███████████████████████████████████▌         | 790/1000 [00:39<00:10, 20.28it/s]
Performing spectral analysis on individual series:  79%|███████████████████████████████████▋         | 793/1000 [00:39<00:10, 20.44it/s]
Performing spectral analysis on individual series:  80%|███████████████████████████████████▊         | 796/1000 [00:39<00:09, 20.50it/s]
Performing spectral analysis on individual series:  80%|███████████████████████████████████▉         | 799/1000 [00:39<00:09, 20.15it/s]
Performing spectral analysis on individual series:  80%|████████████████████████████████████         | 802/1000 [00:40<00:09, 20.13it/s]
Performing spectral analysis on individual series:  80%|████████████████████████████████████▏        | 805/1000 [00:40<00:09, 20.25it/s]
Performing spectral analysis on individual series:  81%|████████████████████████████████████▎        | 808/1000 [00:40<00:09, 19.58it/s]
Performing spectral analysis on individual series:  81%|████████████████████████████████████▍        | 811/1000 [00:40<00:09, 19.90it/s]
Performing spectral analysis on individual series:  81%|████████████████████████████████████▋        | 814/1000 [00:40<00:09, 20.06it/s]
Performing spectral analysis on individual series:  82%|████████████████████████████████████▊        | 817/1000 [00:40<00:09, 20.24it/s]
Performing spectral analysis on individual series:  82%|████████████████████████████████████▉        | 820/1000 [00:40<00:08, 20.19it/s]
Performing spectral analysis on individual series:  82%|█████████████████████████████████████        | 823/1000 [00:41<00:08, 20.41it/s]
Performing spectral analysis on individual series:  83%|█████████████████████████████████████▏       | 826/1000 [00:41<00:08, 20.51it/s]
Performing spectral analysis on individual series:  83%|█████████████████████████████████████▎       | 829/1000 [00:41<00:08, 20.35it/s]
Performing spectral analysis on individual series:  83%|█████████████████████████████████████▍       | 832/1000 [00:41<00:08, 20.49it/s]
Performing spectral analysis on individual series:  84%|█████████████████████████████████████▌       | 835/1000 [00:41<00:08, 20.53it/s]
Performing spectral analysis on individual series:  84%|█████████████████████████████████████▋       | 838/1000 [00:41<00:07, 20.48it/s]
Performing spectral analysis on individual series:  84%|█████████████████████████████████████▊       | 841/1000 [00:41<00:07, 20.42it/s]
Performing spectral analysis on individual series:  84%|█████████████████████████████████████▉       | 844/1000 [00:42<00:07, 20.58it/s]
Performing spectral analysis on individual series:  85%|██████████████████████████████████████       | 847/1000 [00:42<00:07, 20.57it/s]
Performing spectral analysis on individual series:  85%|██████████████████████████████████████▎      | 850/1000 [00:42<00:07, 20.39it/s]
Performing spectral analysis on individual series:  85%|██████████████████████████████████████▍      | 853/1000 [00:42<00:07, 20.32it/s]
Performing spectral analysis on individual series:  86%|██████████████████████████████████████▌      | 856/1000 [00:42<00:07, 20.47it/s]
Performing spectral analysis on individual series:  86%|██████████████████████████████████████▋      | 859/1000 [00:42<00:06, 20.21it/s]
Performing spectral analysis on individual series:  86%|██████████████████████████████████████▊      | 862/1000 [00:42<00:06, 20.33it/s]
Performing spectral analysis on individual series:  86%|██████████████████████████████████████▉      | 865/1000 [00:43<00:06, 20.42it/s]
Performing spectral analysis on individual series:  87%|███████████████████████████████████████      | 868/1000 [00:43<00:06, 20.11it/s]
Performing spectral analysis on individual series:  87%|███████████████████████████████████████▏     | 871/1000 [00:43<00:06, 20.14it/s]
Performing spectral analysis on individual series:  87%|███████████████████████████████████████▎     | 874/1000 [00:43<00:06, 20.36it/s]
Performing spectral analysis on individual series:  88%|███████████████████████████████████████▍     | 877/1000 [00:43<00:05, 20.53it/s]
Performing spectral analysis on individual series:  88%|███████████████████████████████████████▌     | 880/1000 [00:43<00:05, 20.39it/s]
Performing spectral analysis on individual series:  88%|███████████████████████████████████████▋     | 883/1000 [00:43<00:05, 20.54it/s]
Performing spectral analysis on individual series:  89%|███████████████████████████████████████▊     | 886/1000 [00:44<00:05, 20.36it/s]
Performing spectral analysis on individual series:  89%|████████████████████████████████████████     | 889/1000 [00:44<00:05, 20.14it/s]
Performing spectral analysis on individual series:  89%|████████████████████████████████████████▏    | 892/1000 [00:44<00:05, 20.08it/s]
Performing spectral analysis on individual series:  90%|████████████████████████████████████████▎    | 895/1000 [00:44<00:05, 20.18it/s]
Performing spectral analysis on individual series:  90%|████████████████████████████████████████▍    | 898/1000 [00:44<00:05, 20.12it/s]
Performing spectral analysis on individual series:  90%|████████████████████████████████████████▌    | 901/1000 [00:44<00:04, 19.98it/s]
Performing spectral analysis on individual series:  90%|████████████████████████████████████████▋    | 904/1000 [00:45<00:04, 20.20it/s]
Performing spectral analysis on individual series:  91%|████████████████████████████████████████▊    | 907/1000 [00:45<00:04, 19.80it/s]
Performing spectral analysis on individual series:  91%|████████████████████████████████████████▉    | 909/1000 [00:45<00:04, 19.63it/s]
Performing spectral analysis on individual series:  91%|█████████████████████████████████████████    | 912/1000 [00:45<00:04, 19.90it/s]
Performing spectral analysis on individual series:  92%|█████████████████████████████████████████▏   | 915/1000 [00:45<00:04, 20.03it/s]
Performing spectral analysis on individual series:  92%|█████████████████████████████████████████▎   | 918/1000 [00:45<00:04, 20.23it/s]
Performing spectral analysis on individual series:  92%|█████████████████████████████████████████▍   | 921/1000 [00:45<00:03, 19.95it/s]
Performing spectral analysis on individual series:  92%|█████████████████████████████████████████▌   | 924/1000 [00:46<00:03, 20.13it/s]
Performing spectral analysis on individual series:  93%|█████████████████████████████████████████▋   | 927/1000 [00:46<00:03, 20.26it/s]
Performing spectral analysis on individual series:  93%|█████████████████████████████████████████▊   | 930/1000 [00:46<00:03, 19.99it/s]
Performing spectral analysis on individual series:  93%|█████████████████████████████████████████▉   | 933/1000 [00:46<00:03, 20.07it/s]
Performing spectral analysis on individual series:  94%|██████████████████████████████████████████   | 936/1000 [00:46<00:03, 20.10it/s]
Performing spectral analysis on individual series:  94%|██████████████████████████████████████████▎  | 939/1000 [00:46<00:03, 20.07it/s]
Performing spectral analysis on individual series:  94%|██████████████████████████████████████████▍  | 942/1000 [00:46<00:02, 19.93it/s]
Performing spectral analysis on individual series:  94%|██████████████████████████████████████████▍  | 944/1000 [00:47<00:02, 19.66it/s]
Performing spectral analysis on individual series:  95%|██████████████████████████████████████████▌  | 947/1000 [00:47<00:02, 19.93it/s]
Performing spectral analysis on individual series:  95%|██████████████████████████████████████████▋  | 949/1000 [00:47<00:02, 19.87it/s]
Performing spectral analysis on individual series:  95%|██████████████████████████████████████████▊  | 952/1000 [00:47<00:02, 20.02it/s]
Performing spectral analysis on individual series:  96%|██████████████████████████████████████████▉  | 955/1000 [00:47<00:02, 20.10it/s]
Performing spectral analysis on individual series:  96%|███████████████████████████████████████████  | 958/1000 [00:47<00:02, 20.20it/s]
Performing spectral analysis on individual series:  96%|███████████████████████████████████████████▏ | 961/1000 [00:47<00:01, 19.98it/s]
Performing spectral analysis on individual series:  96%|███████████████████████████████████████████▍ | 964/1000 [00:48<00:01, 20.04it/s]
Performing spectral analysis on individual series:  97%|███████████████████████████████████████████▌ | 967/1000 [00:48<00:01, 19.74it/s]
Performing spectral analysis on individual series:  97%|███████████████████████████████████████████▌ | 969/1000 [00:48<00:01, 19.28it/s]
Performing spectral analysis on individual series:  97%|███████████████████████████████████████████▋ | 971/1000 [00:48<00:01, 19.12it/s]
Performing spectral analysis on individual series:  97%|███████████████████████████████████████████▊ | 974/1000 [00:48<00:01, 19.52it/s]
Performing spectral analysis on individual series:  98%|███████████████████████████████████████████▉ | 976/1000 [00:48<00:01, 19.63it/s]
Performing spectral analysis on individual series:  98%|████████████████████████████████████████████ | 979/1000 [00:48<00:01, 19.66it/s]
Performing spectral analysis on individual series:  98%|████████████████████████████████████████████▏| 981/1000 [00:48<00:00, 19.29it/s]
Performing spectral analysis on individual series:  98%|████████████████████████████████████████████▎| 984/1000 [00:49<00:00, 19.63it/s]
Performing spectral analysis on individual series:  99%|████████████████████████████████████████████▍| 987/1000 [00:49<00:00, 19.97it/s]
Performing spectral analysis on individual series:  99%|████████████████████████████████████████████▌| 989/1000 [00:49<00:00, 19.76it/s]
Performing spectral analysis on individual series:  99%|████████████████████████████████████████████▋| 992/1000 [00:49<00:00, 20.18it/s]
Performing spectral analysis on individual series: 100%|████████████████████████████████████████████▊| 995/1000 [00:49<00:00, 20.42it/s]
Performing spectral analysis on individual series: 100%|████████████████████████████████████████████▉| 998/1000 [00:49<00:00, 20.16it/s]
Performing spectral analysis on individual series: 100%|████████████████████████████████████████████| 1000/1000 [00:49<00:00, 20.05it/s]

Performing spectral analysis on individual series:   0%|                                                       | 0/1000 [00:00<?, ?it/s]
Performing spectral analysis on individual series:   0%|                                               | 2/1000 [00:00<01:01, 16.13it/s]
Performing spectral analysis on individual series:   0%|▏                                              | 5/1000 [00:00<00:51, 19.14it/s]
Performing spectral analysis on individual series:   1%|▎                                              | 7/1000 [00:00<00:51, 19.23it/s]
Performing spectral analysis on individual series:   1%|▍                                             | 10/1000 [00:00<00:50, 19.79it/s]
Performing spectral analysis on individual series:   1%|▌                                             | 13/1000 [00:00<00:49, 20.08it/s]
Performing spectral analysis on individual series:   2%|▋                                             | 16/1000 [00:00<00:48, 20.15it/s]
Performing spectral analysis on individual series:   2%|▊                                             | 19/1000 [00:00<00:48, 20.12it/s]
Performing spectral analysis on individual series:   2%|█                                             | 22/1000 [00:01<00:48, 19.97it/s]
Performing spectral analysis on individual series:   2%|█                                             | 24/1000 [00:01<00:49, 19.77it/s]
Performing spectral analysis on individual series:   3%|█▏                                            | 26/1000 [00:01<00:49, 19.48it/s]
Performing spectral analysis on individual series:   3%|█▎                                            | 28/1000 [00:01<00:50, 19.25it/s]
Performing spectral analysis on individual series:   3%|█▍                                            | 30/1000 [00:01<00:50, 19.29it/s]
Performing spectral analysis on individual series:   3%|█▌                                            | 33/1000 [00:01<00:49, 19.71it/s]
Performing spectral analysis on individual series:   4%|█▌                                            | 35/1000 [00:01<00:48, 19.72it/s]
Performing spectral analysis on individual series:   4%|█▋                                            | 37/1000 [00:01<00:48, 19.70it/s]
Performing spectral analysis on individual series:   4%|█▊                                            | 40/1000 [00:02<00:48, 19.90it/s]
Performing spectral analysis on individual series:   4%|█▉                                            | 42/1000 [00:02<00:48, 19.86it/s]
Performing spectral analysis on individual series:   4%|██                                            | 45/1000 [00:02<00:47, 20.29it/s]
Performing spectral analysis on individual series:   5%|██▏                                           | 48/1000 [00:02<00:47, 20.16it/s]
Performing spectral analysis on individual series:   5%|██▎                                           | 51/1000 [00:02<00:46, 20.36it/s]
Performing spectral analysis on individual series:   5%|██▍                                           | 54/1000 [00:02<00:46, 20.22it/s]
Performing spectral analysis on individual series:   6%|██▌                                           | 57/1000 [00:02<00:46, 20.16it/s]
Performing spectral analysis on individual series:   6%|██▊                                           | 60/1000 [00:03<00:46, 20.21it/s]
Performing spectral analysis on individual series:   6%|██▉                                           | 63/1000 [00:03<00:46, 20.27it/s]
Performing spectral analysis on individual series:   7%|███                                           | 66/1000 [00:03<00:45, 20.41it/s]
Performing spectral analysis on individual series:   7%|███▏                                          | 69/1000 [00:03<00:46, 19.99it/s]
Performing spectral analysis on individual series:   7%|███▎                                          | 72/1000 [00:03<00:45, 20.22it/s]
Performing spectral analysis on individual series:   8%|███▍                                          | 75/1000 [00:03<00:45, 20.22it/s]
Performing spectral analysis on individual series:   8%|███▌                                          | 78/1000 [00:03<00:46, 20.04it/s]
Performing spectral analysis on individual series:   8%|███▋                                          | 81/1000 [00:04<00:45, 20.21it/s]
Performing spectral analysis on individual series:   8%|███▊                                          | 84/1000 [00:04<00:44, 20.40it/s]
Performing spectral analysis on individual series:   9%|████                                          | 87/1000 [00:04<00:45, 20.23it/s]
Performing spectral analysis on individual series:   9%|████▏                                         | 90/1000 [00:04<00:44, 20.34it/s]
Performing spectral analysis on individual series:   9%|████▎                                         | 93/1000 [00:04<00:44, 20.20it/s]
Performing spectral analysis on individual series:  10%|████▍                                         | 96/1000 [00:04<00:46, 19.32it/s]
Performing spectral analysis on individual series:  10%|████▌                                         | 99/1000 [00:04<00:45, 19.71it/s]
Performing spectral analysis on individual series:  10%|████▌                                        | 102/1000 [00:05<00:44, 20.00it/s]
Performing spectral analysis on individual series:  10%|████▋                                        | 105/1000 [00:05<00:44, 20.24it/s]
Performing spectral analysis on individual series:  11%|████▊                                        | 108/1000 [00:05<00:45, 19.77it/s]
Performing spectral analysis on individual series:  11%|████▉                                        | 111/1000 [00:05<00:44, 20.01it/s]
Performing spectral analysis on individual series:  11%|█████▏                                       | 114/1000 [00:05<00:43, 20.28it/s]
Performing spectral analysis on individual series:  12%|█████▎                                       | 117/1000 [00:05<00:43, 20.19it/s]
Performing spectral analysis on individual series:  12%|█████▍                                       | 120/1000 [00:06<00:43, 20.23it/s]
Performing spectral analysis on individual series:  12%|█████▌                                       | 123/1000 [00:06<00:43, 20.14it/s]
Performing spectral analysis on individual series:  13%|█████▋                                       | 126/1000 [00:06<00:43, 20.23it/s]
Performing spectral analysis on individual series:  13%|█████▊                                       | 129/1000 [00:06<00:43, 20.05it/s]
Performing spectral analysis on individual series:  13%|█████▉                                       | 132/1000 [00:06<00:43, 20.17it/s]
Performing spectral analysis on individual series:  14%|██████                                       | 135/1000 [00:06<00:42, 20.25it/s]
Performing spectral analysis on individual series:  14%|██████▏                                      | 138/1000 [00:06<00:42, 20.19it/s]
Performing spectral analysis on individual series:  14%|██████▎                                      | 141/1000 [00:07<00:42, 20.16it/s]
Performing spectral analysis on individual series:  14%|██████▍                                      | 144/1000 [00:07<00:43, 19.83it/s]
Performing spectral analysis on individual series:  15%|██████▌                                      | 147/1000 [00:07<00:42, 19.87it/s]
Performing spectral analysis on individual series:  15%|██████▊                                      | 150/1000 [00:07<00:42, 20.07it/s]
Performing spectral analysis on individual series:  15%|██████▉                                      | 153/1000 [00:07<00:42, 20.16it/s]
Performing spectral analysis on individual series:  16%|███████                                      | 156/1000 [00:07<00:42, 20.08it/s]
Performing spectral analysis on individual series:  16%|███████▏                                     | 159/1000 [00:07<00:41, 20.11it/s]
Performing spectral analysis on individual series:  16%|███████▎                                     | 162/1000 [00:08<00:41, 19.95it/s]
Performing spectral analysis on individual series:  16%|███████▍                                     | 165/1000 [00:08<00:42, 19.77it/s]
Performing spectral analysis on individual series:  17%|███████▌                                     | 167/1000 [00:08<00:42, 19.53it/s]
Performing spectral analysis on individual series:  17%|███████▋                                     | 170/1000 [00:08<00:41, 19.82it/s]
Performing spectral analysis on individual series:  17%|███████▊                                     | 173/1000 [00:08<00:41, 20.15it/s]
Performing spectral analysis on individual series:  18%|███████▉                                     | 176/1000 [00:08<00:40, 20.38it/s]
Performing spectral analysis on individual series:  18%|████████                                     | 179/1000 [00:08<00:40, 20.33it/s]
Performing spectral analysis on individual series:  18%|████████▏                                    | 182/1000 [00:09<00:40, 20.35it/s]
Performing spectral analysis on individual series:  18%|████████▎                                    | 185/1000 [00:09<00:39, 20.44it/s]
Performing spectral analysis on individual series:  19%|████████▍                                    | 188/1000 [00:09<00:40, 20.22it/s]
Performing spectral analysis on individual series:  19%|████████▌                                    | 191/1000 [00:09<00:39, 20.34it/s]
Performing spectral analysis on individual series:  19%|████████▋                                    | 194/1000 [00:09<00:39, 20.48it/s]
Performing spectral analysis on individual series:  20%|████████▊                                    | 197/1000 [00:09<00:40, 20.06it/s]
Performing spectral analysis on individual series:  20%|█████████                                    | 200/1000 [00:09<00:39, 20.25it/s]
Performing spectral analysis on individual series:  20%|█████████▏                                   | 203/1000 [00:10<00:39, 20.06it/s]
Performing spectral analysis on individual series:  21%|█████████▎                                   | 206/1000 [00:10<00:39, 20.35it/s]
Performing spectral analysis on individual series:  21%|█████████▍                                   | 209/1000 [00:10<00:39, 19.87it/s]
Performing spectral analysis on individual series:  21%|█████████▌                                   | 212/1000 [00:10<00:39, 20.10it/s]
Performing spectral analysis on individual series:  22%|█████████▋                                   | 215/1000 [00:10<00:38, 20.37it/s]
Performing spectral analysis on individual series:  22%|█████████▊                                   | 218/1000 [00:10<00:38, 20.14it/s]
Performing spectral analysis on individual series:  22%|█████████▉                                   | 221/1000 [00:11<00:38, 20.21it/s]
Performing spectral analysis on individual series:  22%|██████████                                   | 224/1000 [00:11<00:38, 20.21it/s]
Performing spectral analysis on individual series:  23%|██████████▏                                  | 227/1000 [00:11<00:38, 20.06it/s]
Performing spectral analysis on individual series:  23%|██████████▎                                  | 230/1000 [00:11<00:38, 20.17it/s]
Performing spectral analysis on individual series:  23%|██████████▍                                  | 233/1000 [00:11<00:37, 20.38it/s]
Performing spectral analysis on individual series:  24%|██████████▌                                  | 236/1000 [00:11<00:37, 20.45it/s]
Performing spectral analysis on individual series:  24%|██████████▊                                  | 239/1000 [00:11<00:37, 20.03it/s]
Performing spectral analysis on individual series:  24%|██████████▉                                  | 242/1000 [00:12<00:37, 20.15it/s]
Performing spectral analysis on individual series:  24%|███████████                                  | 245/1000 [00:12<00:37, 20.22it/s]
Performing spectral analysis on individual series:  25%|███████████▏                                 | 248/1000 [00:12<00:37, 20.18it/s]
Performing spectral analysis on individual series:  25%|███████████▎                                 | 251/1000 [00:12<00:36, 20.26it/s]
Performing spectral analysis on individual series:  25%|███████████▍                                 | 254/1000 [00:12<00:36, 20.39it/s]
Performing spectral analysis on individual series:  26%|███████████▌                                 | 257/1000 [00:12<00:36, 20.28it/s]
Performing spectral analysis on individual series:  26%|███████████▋                                 | 260/1000 [00:12<00:36, 20.25it/s]
Performing spectral analysis on individual series:  26%|███████████▊                                 | 263/1000 [00:13<00:35, 20.48it/s]
Performing spectral analysis on individual series:  27%|███████████▉                                 | 266/1000 [00:13<00:35, 20.47it/s]
Performing spectral analysis on individual series:  27%|████████████                                 | 269/1000 [00:13<00:36, 20.27it/s]
Performing spectral analysis on individual series:  27%|████████████▏                                | 272/1000 [00:13<00:35, 20.42it/s]
Performing spectral analysis on individual series:  28%|████████████▍                                | 275/1000 [00:13<00:35, 20.32it/s]
Performing spectral analysis on individual series:  28%|████████████▌                                | 278/1000 [00:13<00:35, 20.17it/s]
Performing spectral analysis on individual series:  28%|████████████▋                                | 281/1000 [00:13<00:35, 20.16it/s]
Performing spectral analysis on individual series:  28%|████████████▊                                | 284/1000 [00:14<00:35, 20.13it/s]
Performing spectral analysis on individual series:  29%|████████████▉                                | 287/1000 [00:14<00:35, 20.23it/s]
Performing spectral analysis on individual series:  29%|█████████████                                | 290/1000 [00:14<00:35, 20.06it/s]
Performing spectral analysis on individual series:  29%|█████████████▏                               | 293/1000 [00:14<00:35, 20.17it/s]
Performing spectral analysis on individual series:  30%|█████████████▎                               | 296/1000 [00:14<00:35, 19.90it/s]
Performing spectral analysis on individual series:  30%|█████████████▍                               | 298/1000 [00:14<00:36, 19.28it/s]
Performing spectral analysis on individual series:  30%|█████████████▌                               | 300/1000 [00:14<00:36, 19.37it/s]
Performing spectral analysis on individual series:  30%|█████████████▋                               | 303/1000 [00:15<00:35, 19.80it/s]
Performing spectral analysis on individual series:  31%|█████████████▊                               | 306/1000 [00:15<00:34, 20.07it/s]
Performing spectral analysis on individual series:  31%|█████████████▉                               | 309/1000 [00:15<00:34, 19.91it/s]
Performing spectral analysis on individual series:  31%|██████████████                               | 312/1000 [00:15<00:33, 20.25it/s]
Performing spectral analysis on individual series:  32%|██████████████▏                              | 315/1000 [00:15<00:33, 20.47it/s]
Performing spectral analysis on individual series:  32%|██████████████▎                              | 318/1000 [00:15<00:33, 20.16it/s]
Performing spectral analysis on individual series:  32%|██████████████▍                              | 321/1000 [00:15<00:33, 20.34it/s]
Performing spectral analysis on individual series:  32%|██████████████▌                              | 324/1000 [00:16<00:34, 19.58it/s]
Performing spectral analysis on individual series:  33%|██████████████▋                              | 326/1000 [00:16<00:34, 19.48it/s]
Performing spectral analysis on individual series:  33%|██████████████▊                              | 328/1000 [00:16<00:34, 19.59it/s]
Performing spectral analysis on individual series:  33%|██████████████▊                              | 330/1000 [00:16<00:34, 19.68it/s]
Performing spectral analysis on individual series:  33%|██████████████▉                              | 333/1000 [00:16<00:33, 20.00it/s]
Performing spectral analysis on individual series:  34%|███████████████                              | 336/1000 [00:16<00:32, 20.20it/s]
Performing spectral analysis on individual series:  34%|███████████████▎                             | 339/1000 [00:16<00:32, 20.09it/s]
Performing spectral analysis on individual series:  34%|███████████████▍                             | 342/1000 [00:17<00:32, 20.19it/s]
Performing spectral analysis on individual series:  34%|███████████████▌                             | 345/1000 [00:17<00:32, 20.22it/s]
Performing spectral analysis on individual series:  35%|███████████████▋                             | 348/1000 [00:17<00:32, 20.16it/s]
Performing spectral analysis on individual series:  35%|███████████████▊                             | 351/1000 [00:17<00:32, 20.08it/s]
Performing spectral analysis on individual series:  35%|███████████████▉                             | 354/1000 [00:17<00:31, 20.23it/s]
Performing spectral analysis on individual series:  36%|████████████████                             | 357/1000 [00:17<00:31, 20.18it/s]
Performing spectral analysis on individual series:  36%|████████████████▏                            | 360/1000 [00:17<00:31, 20.02it/s]
Performing spectral analysis on individual series:  36%|████████████████▎                            | 363/1000 [00:18<00:31, 20.20it/s]
Performing spectral analysis on individual series:  37%|████████████████▍                            | 366/1000 [00:18<00:31, 20.28it/s]
Performing spectral analysis on individual series:  37%|████████████████▌                            | 369/1000 [00:18<00:31, 20.00it/s]
Performing spectral analysis on individual series:  37%|████████████████▋                            | 372/1000 [00:18<00:31, 20.14it/s]
Performing spectral analysis on individual series:  38%|████████████████▉                            | 375/1000 [00:18<00:30, 20.23it/s]
Performing spectral analysis on individual series:  38%|█████████████████                            | 378/1000 [00:18<00:31, 20.01it/s]
Performing spectral analysis on individual series:  38%|█████████████████▏                           | 381/1000 [00:18<00:30, 20.02it/s]
Performing spectral analysis on individual series:  38%|█████████████████▎                           | 384/1000 [00:19<00:30, 20.20it/s]
Performing spectral analysis on individual series:  39%|█████████████████▍                           | 387/1000 [00:19<00:30, 20.18it/s]
Performing spectral analysis on individual series:  39%|█████████████████▌                           | 390/1000 [00:19<00:30, 19.89it/s]
Performing spectral analysis on individual series:  39%|█████████████████▋                           | 393/1000 [00:19<00:30, 20.05it/s]
Performing spectral analysis on individual series:  40%|█████████████████▊                           | 396/1000 [00:19<00:30, 19.92it/s]
Performing spectral analysis on individual series:  40%|█████████████████▉                           | 398/1000 [00:19<00:30, 19.55it/s]
Performing spectral analysis on individual series:  40%|██████████████████                           | 401/1000 [00:19<00:30, 19.80it/s]
Performing spectral analysis on individual series:  40%|██████████████████▏                          | 404/1000 [00:20<00:29, 20.06it/s]
Performing spectral analysis on individual series:  41%|██████████████████▎                          | 407/1000 [00:20<00:29, 20.18it/s]
Performing spectral analysis on individual series:  41%|██████████████████▍                          | 410/1000 [00:20<00:29, 20.09it/s]
Performing spectral analysis on individual series:  41%|██████████████████▌                          | 413/1000 [00:20<00:29, 20.19it/s]
Performing spectral analysis on individual series:  42%|██████████████████▋                          | 416/1000 [00:20<00:28, 20.34it/s]
Performing spectral analysis on individual series:  42%|██████████████████▊                          | 419/1000 [00:20<00:28, 20.05it/s]
Performing spectral analysis on individual series:  42%|██████████████████▉                          | 422/1000 [00:21<00:30, 19.05it/s]
Performing spectral analysis on individual series:  42%|███████████████████                          | 424/1000 [00:21<00:30, 18.84it/s]
Performing spectral analysis on individual series:  43%|███████████████████▏                         | 426/1000 [00:21<00:30, 18.58it/s]
Performing spectral analysis on individual series:  43%|███████████████████▎                         | 428/1000 [00:21<00:30, 18.61it/s]
Performing spectral analysis on individual series:  43%|███████████████████▎                         | 430/1000 [00:21<00:30, 18.88it/s]
Performing spectral analysis on individual series:  43%|███████████████████▍                         | 432/1000 [00:21<00:29, 18.97it/s]
Performing spectral analysis on individual series:  43%|███████████████████▌                         | 434/1000 [00:21<00:29, 19.15it/s]
Performing spectral analysis on individual series:  44%|███████████████████▌                         | 436/1000 [00:21<00:30, 18.79it/s]
Performing spectral analysis on individual series:  44%|███████████████████▋                         | 438/1000 [00:21<00:30, 18.15it/s]
Performing spectral analysis on individual series:  44%|███████████████████▊                         | 440/1000 [00:22<00:31, 17.99it/s]
Performing spectral analysis on individual series:  44%|███████████████████▉                         | 442/1000 [00:22<00:30, 18.08it/s]
Performing spectral analysis on individual series:  44%|████████████████████                         | 445/1000 [00:22<00:29, 18.91it/s]
Performing spectral analysis on individual series:  45%|████████████████████                         | 447/1000 [00:22<00:29, 19.05it/s]
Performing spectral analysis on individual series:  45%|████████████████████▎                        | 450/1000 [00:22<00:28, 19.57it/s]
Performing spectral analysis on individual series:  45%|████████████████████▍                        | 453/1000 [00:22<00:27, 19.72it/s]
Performing spectral analysis on individual series:  46%|████████████████████▍                        | 455/1000 [00:22<00:27, 19.71it/s]
Performing spectral analysis on individual series:  46%|████████████████████▌                        | 457/1000 [00:22<00:27, 19.65it/s]
Performing spectral analysis on individual series:  46%|████████████████████▋                        | 460/1000 [00:23<00:27, 19.98it/s]
Performing spectral analysis on individual series:  46%|████████████████████▊                        | 463/1000 [00:23<00:26, 20.16it/s]
Performing spectral analysis on individual series:  47%|████████████████████▉                        | 466/1000 [00:23<00:27, 19.70it/s]
Performing spectral analysis on individual series:  47%|█████████████████████                        | 468/1000 [00:23<00:27, 19.67it/s]
Performing spectral analysis on individual series:  47%|█████████████████████▏                       | 471/1000 [00:23<00:26, 19.87it/s]
Performing spectral analysis on individual series:  47%|█████████████████████▎                       | 473/1000 [00:23<00:26, 19.52it/s]
Performing spectral analysis on individual series:  48%|█████████████████████▍                       | 475/1000 [00:23<00:27, 19.33it/s]
Performing spectral analysis on individual series:  48%|█████████████████████▍                       | 477/1000 [00:23<00:27, 19.03it/s]
Performing spectral analysis on individual series:  48%|█████████████████████▌                       | 479/1000 [00:24<00:27, 18.98it/s]
Performing spectral analysis on individual series:  48%|█████████████████████▋                       | 482/1000 [00:24<00:26, 19.63it/s]
Performing spectral analysis on individual series:  48%|█████████████████████▊                       | 484/1000 [00:24<00:26, 19.64it/s]
Performing spectral analysis on individual series:  49%|█████████████████████▊                       | 486/1000 [00:24<00:26, 19.29it/s]
Performing spectral analysis on individual series:  49%|██████████████████████                       | 489/1000 [00:24<00:25, 19.66it/s]
Performing spectral analysis on individual series:  49%|██████████████████████▏                      | 492/1000 [00:24<00:25, 19.88it/s]
Performing spectral analysis on individual series:  49%|██████████████████████▏                      | 494/1000 [00:24<00:26, 19.23it/s]
Performing spectral analysis on individual series:  50%|██████████████████████▎                      | 496/1000 [00:24<00:26, 19.29it/s]
Performing spectral analysis on individual series:  50%|██████████████████████▍                      | 499/1000 [00:25<00:25, 19.60it/s]
Performing spectral analysis on individual series:  50%|██████████████████████▌                      | 502/1000 [00:25<00:25, 19.79it/s]
Performing spectral analysis on individual series:  50%|██████████████████████▋                      | 504/1000 [00:25<00:25, 19.82it/s]
Performing spectral analysis on individual series:  51%|██████████████████████▊                      | 506/1000 [00:25<00:25, 19.56it/s]
Performing spectral analysis on individual series:  51%|██████████████████████▊                      | 508/1000 [00:25<00:25, 19.57it/s]
Performing spectral analysis on individual series:  51%|██████████████████████▉                      | 511/1000 [00:25<00:24, 19.92it/s]
Performing spectral analysis on individual series:  51%|███████████████████████                      | 513/1000 [00:25<00:24, 19.90it/s]
Performing spectral analysis on individual series:  52%|███████████████████████▏                     | 515/1000 [00:25<00:24, 19.60it/s]
Performing spectral analysis on individual series:  52%|███████████████████████▎                     | 518/1000 [00:25<00:24, 19.84it/s]
Performing spectral analysis on individual series:  52%|███████████████████████▍                     | 520/1000 [00:26<00:24, 19.81it/s]
Performing spectral analysis on individual series:  52%|███████████████████████▍                     | 522/1000 [00:26<00:24, 19.74it/s]
Performing spectral analysis on individual series:  52%|███████████████████████▋                     | 525/1000 [00:26<00:24, 19.72it/s]
Performing spectral analysis on individual series:  53%|███████████████████████▊                     | 528/1000 [00:26<00:23, 19.80it/s]
Performing spectral analysis on individual series:  53%|███████████████████████▉                     | 531/1000 [00:26<00:23, 20.10it/s]
Performing spectral analysis on individual series:  53%|████████████████████████                     | 534/1000 [00:26<00:23, 20.26it/s]
Performing spectral analysis on individual series:  54%|████████████████████████▏                    | 537/1000 [00:26<00:23, 20.05it/s]
Performing spectral analysis on individual series:  54%|████████████████████████▎                    | 540/1000 [00:27<00:23, 19.88it/s]
Performing spectral analysis on individual series:  54%|████████████████████████▍                    | 542/1000 [00:27<00:23, 19.73it/s]
Performing spectral analysis on individual series:  54%|████████████████████████▍                    | 544/1000 [00:27<00:23, 19.49it/s]
Performing spectral analysis on individual series:  55%|████████████████████████▌                    | 546/1000 [00:27<00:23, 19.14it/s]
Performing spectral analysis on individual series:  55%|████████████████████████▋                    | 548/1000 [00:27<00:23, 19.20it/s]
Performing spectral analysis on individual series:  55%|████████████████████████▊                    | 550/1000 [00:27<00:23, 18.89it/s]
Performing spectral analysis on individual series:  55%|████████████████████████▊                    | 552/1000 [00:27<00:23, 18.77it/s]
Performing spectral analysis on individual series:  55%|████████████████████████▉                    | 554/1000 [00:27<00:23, 18.59it/s]
Performing spectral analysis on individual series:  56%|█████████████████████████                    | 556/1000 [00:27<00:23, 18.55it/s]
Performing spectral analysis on individual series:  56%|█████████████████████████                    | 558/1000 [00:28<00:24, 18.34it/s]
Performing spectral analysis on individual series:  56%|█████████████████████████▏                   | 561/1000 [00:28<00:23, 19.08it/s]
Performing spectral analysis on individual series:  56%|█████████████████████████▎                   | 563/1000 [00:28<00:22, 19.02it/s]
Performing spectral analysis on individual series:  56%|█████████████████████████▍                   | 565/1000 [00:28<00:22, 19.25it/s]
Performing spectral analysis on individual series:  57%|█████████████████████████▌                   | 567/1000 [00:28<00:22, 18.93it/s]
Performing spectral analysis on individual series:  57%|█████████████████████████▋                   | 570/1000 [00:28<00:22, 19.44it/s]
Performing spectral analysis on individual series:  57%|█████████████████████████▊                   | 573/1000 [00:28<00:21, 19.45it/s]
Performing spectral analysis on individual series:  58%|█████████████████████████▉                   | 576/1000 [00:28<00:21, 19.72it/s]
Performing spectral analysis on individual series:  58%|██████████████████████████                   | 579/1000 [00:29<00:21, 19.98it/s]
Performing spectral analysis on individual series:  58%|██████████████████████████▏                  | 581/1000 [00:29<00:21, 19.73it/s]
Performing spectral analysis on individual series:  58%|██████████████████████████▏                  | 583/1000 [00:29<00:21, 19.40it/s]
Performing spectral analysis on individual series:  58%|██████████████████████████▎                  | 585/1000 [00:29<00:21, 19.43it/s]
Performing spectral analysis on individual series:  59%|██████████████████████████▍                  | 587/1000 [00:29<00:21, 19.38it/s]
Performing spectral analysis on individual series:  59%|██████████████████████████▌                  | 589/1000 [00:29<00:21, 19.35it/s]
Performing spectral analysis on individual series:  59%|██████████████████████████▌                  | 591/1000 [00:29<00:22, 18.50it/s]
Performing spectral analysis on individual series:  59%|██████████████████████████▋                  | 593/1000 [00:29<00:21, 18.52it/s]
Performing spectral analysis on individual series:  60%|██████████████████████████▊                  | 595/1000 [00:29<00:21, 18.59it/s]
Performing spectral analysis on individual series:  60%|██████████████████████████▊                  | 597/1000 [00:30<00:21, 18.40it/s]
Performing spectral analysis on individual series:  60%|███████████████████████████                  | 600/1000 [00:30<00:20, 19.18it/s]
Performing spectral analysis on individual series:  60%|███████████████████████████                  | 602/1000 [00:30<00:20, 19.31it/s]
Performing spectral analysis on individual series:  60%|███████████████████████████▏                 | 605/1000 [00:30<00:20, 19.22it/s]
Performing spectral analysis on individual series:  61%|███████████████████████████▎                 | 607/1000 [00:30<00:22, 17.52it/s]
Performing spectral analysis on individual series:  61%|███████████████████████████▍                 | 609/1000 [00:30<00:21, 17.89it/s]
Performing spectral analysis on individual series:  61%|███████████████████████████▍                 | 611/1000 [00:30<00:21, 18.07it/s]
Performing spectral analysis on individual series:  61%|███████████████████████████▌                 | 613/1000 [00:30<00:21, 18.39it/s]
Performing spectral analysis on individual series:  62%|███████████████████████████▋                 | 615/1000 [00:31<00:21, 18.22it/s]
Performing spectral analysis on individual series:  62%|███████████████████████████▊                 | 617/1000 [00:31<00:20, 18.43it/s]
Performing spectral analysis on individual series:  62%|███████████████████████████▊                 | 619/1000 [00:31<00:20, 18.71it/s]
Performing spectral analysis on individual series:  62%|███████████████████████████▉                 | 621/1000 [00:31<00:20, 18.55it/s]
Performing spectral analysis on individual series:  62%|████████████████████████████                 | 623/1000 [00:31<00:20, 18.46it/s]
Performing spectral analysis on individual series:  62%|████████████████████████████▏                | 625/1000 [00:31<00:20, 18.60it/s]
Performing spectral analysis on individual series:  63%|████████████████████████████▏                | 627/1000 [00:31<00:19, 18.69it/s]
Performing spectral analysis on individual series:  63%|████████████████████████████▎                | 629/1000 [00:31<00:19, 18.82it/s]
Performing spectral analysis on individual series:  63%|████████████████████████████▍                | 632/1000 [00:31<00:19, 19.35it/s]
Performing spectral analysis on individual series:  64%|████████████████████████████▌                | 635/1000 [00:32<00:18, 19.72it/s]
Performing spectral analysis on individual series:  64%|████████████████████████████▋                | 638/1000 [00:32<00:18, 19.87it/s]
Performing spectral analysis on individual series:  64%|████████████████████████████▊                | 640/1000 [00:32<00:18, 19.76it/s]
Performing spectral analysis on individual series:  64%|████████████████████████████▉                | 643/1000 [00:32<00:18, 19.70it/s]
Performing spectral analysis on individual series:  64%|█████████████████████████████                | 645/1000 [00:32<00:18, 19.63it/s]
Performing spectral analysis on individual series:  65%|█████████████████████████████▏               | 648/1000 [00:32<00:17, 20.01it/s]
Performing spectral analysis on individual series:  65%|█████████████████████████████▎               | 650/1000 [00:32<00:17, 19.88it/s]
Performing spectral analysis on individual series:  65%|█████████████████████████████▎               | 652/1000 [00:32<00:17, 19.91it/s]
Performing spectral analysis on individual series:  66%|█████████████████████████████▍               | 655/1000 [00:33<00:17, 20.15it/s]
Performing spectral analysis on individual series:  66%|█████████████████████████████▌               | 658/1000 [00:33<00:16, 20.25it/s]
Performing spectral analysis on individual series:  66%|█████████████████████████████▋               | 661/1000 [00:33<00:16, 20.05it/s]
Performing spectral analysis on individual series:  66%|█████████████████████████████▉               | 664/1000 [00:33<00:16, 20.13it/s]
Performing spectral analysis on individual series:  67%|██████████████████████████████               | 667/1000 [00:33<00:16, 20.31it/s]
Performing spectral analysis on individual series:  67%|██████████████████████████████▏              | 670/1000 [00:33<00:16, 20.12it/s]
Performing spectral analysis on individual series:  67%|██████████████████████████████▎              | 673/1000 [00:34<00:16, 20.07it/s]
Performing spectral analysis on individual series:  68%|██████████████████████████████▍              | 676/1000 [00:34<00:16, 20.21it/s]
Performing spectral analysis on individual series:  68%|██████████████████████████████▌              | 679/1000 [00:34<00:15, 20.16it/s]
Performing spectral analysis on individual series:  68%|██████████████████████████████▋              | 682/1000 [00:34<00:15, 19.96it/s]
Performing spectral analysis on individual series:  68%|██████████████████████████████▊              | 685/1000 [00:34<00:15, 20.14it/s]
Performing spectral analysis on individual series:  69%|██████████████████████████████▉              | 688/1000 [00:34<00:15, 19.87it/s]
Performing spectral analysis on individual series:  69%|███████████████████████████████              | 690/1000 [00:34<00:15, 19.75it/s]
Performing spectral analysis on individual series:  69%|███████████████████████████████▏             | 692/1000 [00:34<00:15, 19.77it/s]
Performing spectral analysis on individual series:  70%|███████████████████████████████▎             | 695/1000 [00:35<00:15, 20.05it/s]
Performing spectral analysis on individual series:  70%|███████████████████████████████▍             | 698/1000 [00:35<00:15, 20.12it/s]
Performing spectral analysis on individual series:  70%|███████████████████████████████▌             | 701/1000 [00:35<00:15, 19.86it/s]
Performing spectral analysis on individual series:  70%|███████████████████████████████▋             | 703/1000 [00:35<00:14, 19.87it/s]
Performing spectral analysis on individual series:  71%|███████████████████████████████▊             | 706/1000 [00:35<00:14, 20.06it/s]
Performing spectral analysis on individual series:  71%|███████████████████████████████▉             | 709/1000 [00:35<00:14, 20.08it/s]
Performing spectral analysis on individual series:  71%|████████████████████████████████             | 712/1000 [00:35<00:14, 20.09it/s]
Performing spectral analysis on individual series:  72%|████████████████████████████████▏            | 715/1000 [00:36<00:14, 20.10it/s]
Performing spectral analysis on individual series:  72%|████████████████████████████████▎            | 718/1000 [00:36<00:14, 19.86it/s]
Performing spectral analysis on individual series:  72%|████████████████████████████████▍            | 720/1000 [00:36<00:14, 19.66it/s]
Performing spectral analysis on individual series:  72%|████████████████████████████████▍            | 722/1000 [00:36<00:14, 19.70it/s]
Performing spectral analysis on individual series:  72%|████████████████████████████████▋            | 725/1000 [00:36<00:13, 19.90it/s]
Performing spectral analysis on individual series:  73%|████████████████████████████████▊            | 728/1000 [00:36<00:13, 19.94it/s]
Performing spectral analysis on individual series:  73%|████████████████████████████████▊            | 730/1000 [00:36<00:13, 19.45it/s]
Performing spectral analysis on individual series:  73%|████████████████████████████████▉            | 732/1000 [00:36<00:13, 19.54it/s]
Performing spectral analysis on individual series:  73%|█████████████████████████████████            | 734/1000 [00:37<00:14, 18.97it/s]
Performing spectral analysis on individual series:  74%|█████████████████████████████████            | 736/1000 [00:37<00:13, 18.97it/s]
Performing spectral analysis on individual series:  74%|█████████████████████████████████▎           | 739/1000 [00:37<00:13, 19.21it/s]
Performing spectral analysis on individual series:  74%|█████████████████████████████████▎           | 741/1000 [00:37<00:13, 19.22it/s]
Performing spectral analysis on individual series:  74%|█████████████████████████████████▍           | 743/1000 [00:37<00:13, 19.37it/s]
Performing spectral analysis on individual series:  74%|█████████████████████████████████▌           | 745/1000 [00:37<00:13, 19.40it/s]
Performing spectral analysis on individual series:  75%|█████████████████████████████████▋           | 748/1000 [00:37<00:12, 19.75it/s]
Performing spectral analysis on individual series:  75%|█████████████████████████████████▊           | 750/1000 [00:37<00:13, 19.19it/s]
Performing spectral analysis on individual series:  75%|█████████████████████████████████▊           | 752/1000 [00:38<00:13, 18.79it/s]
Performing spectral analysis on individual series:  76%|█████████████████████████████████▉           | 755/1000 [00:38<00:12, 18.95it/s]
Performing spectral analysis on individual series:  76%|██████████████████████████████████           | 757/1000 [00:38<00:12, 19.10it/s]
Performing spectral analysis on individual series:  76%|██████████████████████████████████▏          | 759/1000 [00:38<00:12, 19.13it/s]
Performing spectral analysis on individual series:  76%|██████████████████████████████████▎          | 762/1000 [00:38<00:12, 19.57it/s]
Performing spectral analysis on individual series:  76%|██████████████████████████████████▍          | 765/1000 [00:38<00:11, 19.94it/s]
Performing spectral analysis on individual series:  77%|██████████████████████████████████▌          | 767/1000 [00:38<00:12, 19.26it/s]
Performing spectral analysis on individual series:  77%|██████████████████████████████████▌          | 769/1000 [00:38<00:12, 19.16it/s]
Performing spectral analysis on individual series:  77%|██████████████████████████████████▋          | 772/1000 [00:39<00:11, 19.65it/s]
Performing spectral analysis on individual series:  78%|██████████████████████████████████▉          | 775/1000 [00:39<00:11, 19.98it/s]
Performing spectral analysis on individual series:  78%|███████████████████████████████████          | 778/1000 [00:39<00:11, 20.08it/s]
Performing spectral analysis on individual series:  78%|███████████████████████████████████▏         | 781/1000 [00:39<00:10, 20.25it/s]
Performing spectral analysis on individual series:  78%|███████████████████████████████████▎         | 784/1000 [00:39<00:10, 20.37it/s]
Performing spectral analysis on individual series:  79%|███████████████████████████████████▍         | 787/1000 [00:39<00:10, 19.76it/s]
Performing spectral analysis on individual series:  79%|███████████████████████████████████▌         | 790/1000 [00:39<00:10, 19.94it/s]
Performing spectral analysis on individual series:  79%|███████████████████████████████████▋         | 793/1000 [00:40<00:10, 20.14it/s]
Performing spectral analysis on individual series:  80%|███████████████████████████████████▊         | 796/1000 [00:40<00:10, 20.33it/s]
Performing spectral analysis on individual series:  80%|███████████████████████████████████▉         | 799/1000 [00:40<00:09, 20.12it/s]
Performing spectral analysis on individual series:  80%|████████████████████████████████████         | 802/1000 [00:40<00:09, 20.23it/s]
Performing spectral analysis on individual series:  80%|████████████████████████████████████▏        | 805/1000 [00:40<00:09, 20.33it/s]
Performing spectral analysis on individual series:  81%|████████████████████████████████████▎        | 808/1000 [00:40<00:09, 19.55it/s]
Performing spectral analysis on individual series:  81%|████████████████████████████████████▍        | 811/1000 [00:40<00:09, 19.79it/s]
Performing spectral analysis on individual series:  81%|████████████████████████████████████▌        | 813/1000 [00:41<00:09, 19.77it/s]
Performing spectral analysis on individual series:  82%|████████████████████████████████████▋        | 816/1000 [00:41<00:09, 20.08it/s]
Performing spectral analysis on individual series:  82%|████████████████████████████████████▊        | 819/1000 [00:41<00:09, 19.90it/s]
Performing spectral analysis on individual series:  82%|████████████████████████████████████▉        | 822/1000 [00:41<00:08, 20.19it/s]
Performing spectral analysis on individual series:  82%|█████████████████████████████████████▏       | 825/1000 [00:41<00:08, 20.16it/s]
Performing spectral analysis on individual series:  83%|█████████████████████████████████████▎       | 828/1000 [00:41<00:08, 20.04it/s]
Performing spectral analysis on individual series:  83%|█████████████████████████████████████▍       | 831/1000 [00:41<00:08, 20.22it/s]
Performing spectral analysis on individual series:  83%|█████████████████████████████████████▌       | 834/1000 [00:42<00:08, 20.32it/s]
Performing spectral analysis on individual series:  84%|█████████████████████████████████████▋       | 837/1000 [00:42<00:08, 20.33it/s]
Performing spectral analysis on individual series:  84%|█████████████████████████████████████▊       | 840/1000 [00:42<00:07, 20.16it/s]
Performing spectral analysis on individual series:  84%|█████████████████████████████████████▉       | 843/1000 [00:42<00:07, 20.27it/s]
Performing spectral analysis on individual series:  85%|██████████████████████████████████████       | 846/1000 [00:42<00:07, 20.11it/s]
Performing spectral analysis on individual series:  85%|██████████████████████████████████████▏      | 849/1000 [00:42<00:07, 20.12it/s]
Performing spectral analysis on individual series:  85%|██████████████████████████████████████▎      | 852/1000 [00:43<00:07, 20.28it/s]
Performing spectral analysis on individual series:  86%|██████████████████████████████████████▍      | 855/1000 [00:43<00:07, 20.36it/s]
Performing spectral analysis on individual series:  86%|██████████████████████████████████████▌      | 858/1000 [00:43<00:06, 20.38it/s]
Performing spectral analysis on individual series:  86%|██████████████████████████████████████▋      | 861/1000 [00:43<00:06, 20.38it/s]
Performing spectral analysis on individual series:  86%|██████████████████████████████████████▉      | 864/1000 [00:43<00:06, 20.47it/s]
Performing spectral analysis on individual series:  87%|███████████████████████████████████████      | 867/1000 [00:43<00:06, 20.51it/s]
Performing spectral analysis on individual series:  87%|███████████████████████████████████████▏     | 870/1000 [00:43<00:06, 20.27it/s]
Performing spectral analysis on individual series:  87%|███████████████████████████████████████▎     | 873/1000 [00:44<00:06, 19.58it/s]
Performing spectral analysis on individual series:  88%|███████████████████████████████████████▍     | 875/1000 [00:44<00:06, 19.64it/s]
Performing spectral analysis on individual series:  88%|███████████████████████████████████████▌     | 878/1000 [00:44<00:06, 19.86it/s]
Performing spectral analysis on individual series:  88%|███████████████████████████████████████▌     | 880/1000 [00:44<00:06, 19.86it/s]
Performing spectral analysis on individual series:  88%|███████████████████████████████████████▋     | 883/1000 [00:44<00:05, 20.10it/s]
Performing spectral analysis on individual series:  89%|███████████████████████████████████████▊     | 886/1000 [00:44<00:05, 19.69it/s]
Performing spectral analysis on individual series:  89%|███████████████████████████████████████▉     | 888/1000 [00:44<00:05, 19.38it/s]
Performing spectral analysis on individual series:  89%|████████████████████████████████████████     | 891/1000 [00:44<00:05, 19.60it/s]
Performing spectral analysis on individual series:  89%|████████████████████████████████████████▏    | 894/1000 [00:45<00:05, 20.00it/s]
Performing spectral analysis on individual series:  90%|████████████████████████████████████████▎    | 897/1000 [00:45<00:05, 20.25it/s]
Performing spectral analysis on individual series:  90%|████████████████████████████████████████▌    | 900/1000 [00:45<00:04, 20.06it/s]
Performing spectral analysis on individual series:  90%|████████████████████████████████████████▋    | 903/1000 [00:45<00:04, 20.24it/s]
Performing spectral analysis on individual series:  91%|████████████████████████████████████████▊    | 906/1000 [00:45<00:04, 20.32it/s]
Performing spectral analysis on individual series:  91%|████████████████████████████████████████▉    | 909/1000 [00:45<00:04, 20.19it/s]
Performing spectral analysis on individual series:  91%|█████████████████████████████████████████    | 912/1000 [00:46<00:04, 20.38it/s]
Performing spectral analysis on individual series:  92%|█████████████████████████████████████████▏   | 915/1000 [00:46<00:04, 20.47it/s]
Performing spectral analysis on individual series:  92%|█████████████████████████████████████████▎   | 918/1000 [00:46<00:04, 20.44it/s]
Performing spectral analysis on individual series:  92%|█████████████████████████████████████████▍   | 921/1000 [00:46<00:03, 20.38it/s]
Performing spectral analysis on individual series:  92%|█████████████████████████████████████████▌   | 924/1000 [00:46<00:03, 20.45it/s]
Performing spectral analysis on individual series:  93%|█████████████████████████████████████████▋   | 927/1000 [00:46<00:03, 20.42it/s]
Performing spectral analysis on individual series:  93%|█████████████████████████████████████████▊   | 930/1000 [00:46<00:03, 20.26it/s]
Performing spectral analysis on individual series:  93%|█████████████████████████████████████████▉   | 933/1000 [00:47<00:03, 20.39it/s]
Performing spectral analysis on individual series:  94%|██████████████████████████████████████████   | 936/1000 [00:47<00:03, 20.39it/s]
Performing spectral analysis on individual series:  94%|██████████████████████████████████████████▎  | 939/1000 [00:47<00:03, 20.27it/s]
Performing spectral analysis on individual series:  94%|██████████████████████████████████████████▍  | 942/1000 [00:47<00:02, 20.38it/s]
Performing spectral analysis on individual series:  94%|██████████████████████████████████████████▌  | 945/1000 [00:47<00:02, 20.48it/s]
Performing spectral analysis on individual series:  95%|██████████████████████████████████████████▋  | 948/1000 [00:47<00:02, 20.40it/s]
Performing spectral analysis on individual series:  95%|██████████████████████████████████████████▊  | 951/1000 [00:47<00:02, 20.21it/s]
Performing spectral analysis on individual series:  95%|██████████████████████████████████████████▉  | 954/1000 [00:48<00:02, 19.28it/s]
Performing spectral analysis on individual series:  96%|███████████████████████████████████████████  | 956/1000 [00:48<00:02, 19.10it/s]
Performing spectral analysis on individual series:  96%|███████████████████████████████████████████▏ | 959/1000 [00:48<00:02, 19.43it/s]
Performing spectral analysis on individual series:  96%|███████████████████████████████████████████▎ | 962/1000 [00:48<00:01, 19.75it/s]
Performing spectral analysis on individual series:  96%|███████████████████████████████████████████▍ | 965/1000 [00:48<00:01, 19.88it/s]
Performing spectral analysis on individual series:  97%|███████████████████████████████████████████▌ | 967/1000 [00:48<00:01, 19.38it/s]
Performing spectral analysis on individual series:  97%|███████████████████████████████████████████▌ | 969/1000 [00:48<00:01, 19.19it/s]
Performing spectral analysis on individual series:  97%|███████████████████████████████████████████▋ | 971/1000 [00:48<00:01, 19.24it/s]
Performing spectral analysis on individual series:  97%|███████████████████████████████████████████▊ | 973/1000 [00:49<00:01, 19.25it/s]
Performing spectral analysis on individual series:  98%|███████████████████████████████████████████▉ | 975/1000 [00:49<00:01, 19.18it/s]
Performing spectral analysis on individual series:  98%|███████████████████████████████████████████▉ | 977/1000 [00:49<00:01, 19.30it/s]
Performing spectral analysis on individual series:  98%|████████████████████████████████████████████ | 979/1000 [00:49<00:01, 18.91it/s]
Performing spectral analysis on individual series:  98%|████████████████████████████████████████████▏| 981/1000 [00:49<00:00, 19.04it/s]
Performing spectral analysis on individual series:  98%|████████████████████████████████████████████▏| 983/1000 [00:49<00:00, 19.30it/s]
Performing spectral analysis on individual series:  99%|████████████████████████████████████████████▎| 986/1000 [00:49<00:00, 19.06it/s]
Performing spectral analysis on individual series:  99%|████████████████████████████████████████████▍| 988/1000 [00:49<00:00, 18.83it/s]
Performing spectral analysis on individual series:  99%|████████████████████████████████████████████▌| 990/1000 [00:49<00:00, 18.96it/s]
Performing spectral analysis on individual series:  99%|████████████████████████████████████████████▋| 992/1000 [00:50<00:00, 18.65it/s]
Performing spectral analysis on individual series: 100%|████████████████████████████████████████████▊| 995/1000 [00:50<00:00, 19.35it/s]
Performing spectral analysis on individual series: 100%|████████████████████████████████████████████▊| 997/1000 [00:50<00:00, 19.49it/s]
Performing spectral analysis on individual series: 100%|████████████████████████████████████████████▉| 999/1000 [00:50<00:00, 19.38it/s]
Performing spectral analysis on individual series: 100%|████████████████████████████████████████████| 1000/1000 [00:50<00:00, 19.81it/s]

../_images/cda4e37c6efa75d40a28b22ae3763527e21dc021666183875a607027044148fb.png

Indeed the two series have different frequency content. All India rainfall has a very flat spectrum, difficult to distinguish from noise (as a tested by the similarities to the AR(1) benchmark). On the other hand, the NINO3 spectrum displays much more low frequency content, with peaks that poke above the AR(1) background.

On its own, this tells us very little about areas of overlap between these signals; for this, we need another tool (coherence). In addition, there is one major drawback of spectral analysis: it assumes that timeseries are stationary, i.e. that the frequency content is the same throughout the entire length of the record. In nonlinear timeseries like those (and many other geophysical timeseries), this is rarely the case. Instead

Musical Interlude#

Even if you are not a musician, you’ve likely seen sheet music like this before:

This one is a representation of the notes that get played as part of John Coltrane’s masterpiece, Giant Steps. To do that, sheet music has to convey what notes (pitch, i.e. frequency) are played at what time, so the object is two-dimensional: a linear time axis (going from left to right here) and a frequency axis (going from low to high: low notes hang on the low ledger lines, and vice versa for the high notes). If we want a system to represent how the frequency content of a timeseries changes as time goes by, this would be a good choice.

Wavelet Analysis#

It turns out that this is exactly what wavelet analysis does. The functions used to analize the signal (i.e. the wavelets) are oscillatory (like sines and cosines), with this crucial difference that instead of extending out to infinity, the are localized to a relatively small portion of the timeseries, and can be stretched out and compressed while preserving their shape. This allows to “unfold” a spectrum and look at its evolution over time. There are several ways to access that functionality in Pyleoclim, but here we use summary_plot, which stacks together the timeseries itself, its scalogram (a plot of the magnitude of the wavelet power), and the power spectral density (PSD) obtained from summing the wavelet coefficients over time.

scal = nino3.wavelet()
scal.plot()
(<Figure size 1000x800 with 2 Axes>,
 <Axes: title={'center': 'NINO3 SST scalogram (CWT)'}, xlabel='Time [year C.E.]', ylabel='Scale [yrs]'>)
../_images/2562b92cfe80024a5dde0ee17b21d85ec6167b32bb844268cfa611b82134f6c0.png

Just like sheet music, the scalogram reveals how spectral power (technically, wavelet power) changes over time: you can read time off the x axis, and pitch (here, scale, which is closely related) on the y axis. Islands of high amplitude show you what scales of oscillation are prominent at given points in time.

But which aspects of this are significant? There are two ways to test this in pyleoclim, both using an AR(1) benchmark. The first uses a parametric, asymptotic form of the theoretical spectrum of an AR(1) process:

scal_sig = scal.signif_test(method='ar1asym')
scal_sig.plot()
(<Figure size 1000x800 with 2 Axes>,
 <Axes: title={'center': 'NINO3 SST scalogram (CWT) with 95% threshold'}, xlabel='Time [year C.E.]', ylabel='Scale [yrs]'>)
../_images/ba179507ae656b27188877d971e93d35e1073a0c3c4235af47e380ced8366762.png

The white lines delineate regions of the scalogram that are significant against an AR(1) benchmark, thus encircling “islands” of notable power. We see that the quasi-biennial (2y) periodicity is particularly pronounced in the early part of the record, but after the 1970’s the period appears to lengthen. We also see a lulll in interannual variability between the 40’s and 60s.

Now, notice that we specified the method ‘ar1asym’ for the asssessment of significance; this tells the code to use an asymptotic approximation to the distribution of the AR(1) benchmarks, making it lightning-fast. We could also have used direct simulation (the default method), and indeed this would yield a very similar result, albeit more slowly:

scal_sig2 = scal.signif_test(method='ar1sim', number = 1000)
scal_sig2.plot()
Performing wavelet analysis on individual series:   0%|                                                        | 0/1000 [00:00<?, ?it/s]
Performing wavelet analysis on individual series:   1%|▎                                               | 6/1000 [00:00<00:17, 55.52it/s]
Performing wavelet analysis on individual series:   1%|▌                                              | 12/1000 [00:00<00:17, 57.26it/s]
Performing wavelet analysis on individual series:   2%|▊                                              | 18/1000 [00:00<00:17, 56.18it/s]
Performing wavelet analysis on individual series:   2%|█▏                                             | 24/1000 [00:00<00:18, 54.22it/s]
Performing wavelet analysis on individual series:   3%|█▍                                             | 30/1000 [00:00<00:18, 53.28it/s]
Performing wavelet analysis on individual series:   4%|█▋                                             | 36/1000 [00:00<00:17, 53.69it/s]
Performing wavelet analysis on individual series:   4%|█▉                                             | 42/1000 [00:00<00:17, 54.30it/s]
Performing wavelet analysis on individual series:   5%|██▎                                            | 49/1000 [00:00<00:16, 56.30it/s]
Performing wavelet analysis on individual series:   6%|██▌                                            | 55/1000 [00:00<00:16, 56.14it/s]
Performing wavelet analysis on individual series:   6%|██▊                                            | 61/1000 [00:01<00:16, 56.02it/s]
Performing wavelet analysis on individual series:   7%|███▏                                           | 68/1000 [00:01<00:16, 57.11it/s]
Performing wavelet analysis on individual series:   8%|███▌                                           | 75/1000 [00:01<00:15, 59.30it/s]
Performing wavelet analysis on individual series:   8%|███▊                                           | 81/1000 [00:01<00:15, 57.72it/s]
Performing wavelet analysis on individual series:   9%|████                                           | 87/1000 [00:01<00:16, 56.63it/s]
Performing wavelet analysis on individual series:   9%|████▎                                          | 93/1000 [00:01<00:16, 56.49it/s]
Performing wavelet analysis on individual series:  10%|████▌                                         | 100/1000 [00:01<00:15, 58.78it/s]
Performing wavelet analysis on individual series:  11%|████▉                                         | 106/1000 [00:01<00:15, 59.04it/s]
Performing wavelet analysis on individual series:  11%|█████▏                                        | 113/1000 [00:01<00:14, 59.77it/s]
Performing wavelet analysis on individual series:  12%|█████▍                                        | 119/1000 [00:02<00:15, 58.66it/s]
Performing wavelet analysis on individual series:  13%|█████▊                                        | 126/1000 [00:02<00:14, 59.70it/s]
Performing wavelet analysis on individual series:  13%|██████                                        | 132/1000 [00:02<00:14, 59.67it/s]
Performing wavelet analysis on individual series:  14%|██████▍                                       | 139/1000 [00:02<00:14, 59.95it/s]
Performing wavelet analysis on individual series:  14%|██████▋                                       | 145/1000 [00:02<00:14, 58.62it/s]
Performing wavelet analysis on individual series:  15%|██████▉                                       | 152/1000 [00:02<00:14, 59.48it/s]
Performing wavelet analysis on individual series:  16%|███████▎                                      | 159/1000 [00:02<00:13, 60.54it/s]
Performing wavelet analysis on individual series:  17%|███████▋                                      | 166/1000 [00:02<00:13, 61.54it/s]
Performing wavelet analysis on individual series:  17%|███████▉                                      | 173/1000 [00:02<00:13, 60.48it/s]
Performing wavelet analysis on individual series:  18%|████████▎                                     | 180/1000 [00:03<00:14, 57.94it/s]
Performing wavelet analysis on individual series:  19%|████████▌                                     | 187/1000 [00:03<00:13, 58.97it/s]
Performing wavelet analysis on individual series:  19%|████████▉                                     | 194/1000 [00:03<00:13, 60.30it/s]
Performing wavelet analysis on individual series:  20%|█████████▏                                    | 201/1000 [00:03<00:13, 61.02it/s]
Performing wavelet analysis on individual series:  21%|█████████▌                                    | 208/1000 [00:03<00:13, 59.98it/s]
Performing wavelet analysis on individual series:  22%|█████████▉                                    | 215/1000 [00:03<00:12, 60.39it/s]
Performing wavelet analysis on individual series:  22%|██████████▏                                   | 222/1000 [00:03<00:12, 61.23it/s]
Performing wavelet analysis on individual series:  23%|██████████▌                                   | 229/1000 [00:03<00:12, 61.41it/s]
Performing wavelet analysis on individual series:  24%|██████████▊                                   | 236/1000 [00:04<00:12, 59.56it/s]
Performing wavelet analysis on individual series:  24%|███████████▏                                  | 243/1000 [00:04<00:12, 59.97it/s]
Performing wavelet analysis on individual series:  25%|███████████▌                                  | 250/1000 [00:04<00:12, 61.04it/s]
Performing wavelet analysis on individual series:  26%|███████████▊                                  | 257/1000 [00:04<00:12, 60.39it/s]
Performing wavelet analysis on individual series:  26%|████████████▏                                 | 264/1000 [00:04<00:12, 59.67it/s]
Performing wavelet analysis on individual series:  27%|████████████▍                                 | 270/1000 [00:04<00:12, 57.65it/s]
Performing wavelet analysis on individual series:  28%|████████████▋                                 | 276/1000 [00:04<00:12, 56.29it/s]
Performing wavelet analysis on individual series:  28%|█████████████                                 | 283/1000 [00:04<00:12, 58.26it/s]
Performing wavelet analysis on individual series:  29%|█████████████▎                                | 290/1000 [00:04<00:11, 59.79it/s]
Performing wavelet analysis on individual series:  30%|█████████████▌                                | 296/1000 [00:05<00:12, 58.21it/s]
Performing wavelet analysis on individual series:  30%|█████████████▉                                | 302/1000 [00:05<00:12, 58.00it/s]
Performing wavelet analysis on individual series:  31%|██████████████▏                               | 309/1000 [00:05<00:11, 59.37it/s]
Performing wavelet analysis on individual series:  32%|██████████████▌                               | 316/1000 [00:05<00:11, 59.88it/s]
Performing wavelet analysis on individual series:  32%|██████████████▊                               | 323/1000 [00:05<00:11, 59.76it/s]
Performing wavelet analysis on individual series:  33%|███████████████▏                              | 329/1000 [00:05<00:11, 58.89it/s]
Performing wavelet analysis on individual series:  34%|███████████████▍                              | 336/1000 [00:05<00:10, 60.65it/s]
Performing wavelet analysis on individual series:  34%|███████████████▊                              | 343/1000 [00:05<00:10, 61.33it/s]
Performing wavelet analysis on individual series:  35%|████████████████                              | 350/1000 [00:05<00:10, 60.76it/s]
Performing wavelet analysis on individual series:  36%|████████████████▍                             | 357/1000 [00:06<00:10, 58.99it/s]
Performing wavelet analysis on individual series:  36%|████████████████▋                             | 364/1000 [00:06<00:10, 59.76it/s]
Performing wavelet analysis on individual series:  37%|█████████████████                             | 371/1000 [00:06<00:10, 60.24it/s]
Performing wavelet analysis on individual series:  38%|█████████████████▍                            | 378/1000 [00:06<00:10, 59.34it/s]
Performing wavelet analysis on individual series:  38%|█████████████████▋                            | 384/1000 [00:06<00:10, 57.29it/s]
Performing wavelet analysis on individual series:  39%|█████████████████▉                            | 390/1000 [00:06<00:11, 55.01it/s]
Performing wavelet analysis on individual series:  40%|██████████████████▏                           | 396/1000 [00:06<00:11, 51.95it/s]
Performing wavelet analysis on individual series:  40%|██████████████████▌                           | 403/1000 [00:06<00:10, 54.74it/s]
Performing wavelet analysis on individual series:  41%|██████████████████▊                           | 409/1000 [00:07<00:10, 55.99it/s]
Performing wavelet analysis on individual series:  42%|███████████████████                           | 415/1000 [00:07<00:10, 55.12it/s]
Performing wavelet analysis on individual series:  42%|███████████████████▍                          | 422/1000 [00:07<00:10, 57.63it/s]
Performing wavelet analysis on individual series:  43%|███████████████████▋                          | 429/1000 [00:07<00:09, 60.07it/s]
Performing wavelet analysis on individual series:  44%|████████████████████                          | 436/1000 [00:07<00:09, 60.91it/s]
Performing wavelet analysis on individual series:  44%|████████████████████▍                         | 443/1000 [00:07<00:09, 60.45it/s]
Performing wavelet analysis on individual series:  45%|████████████████████▋                         | 450/1000 [00:07<00:08, 61.26it/s]
Performing wavelet analysis on individual series:  46%|█████████████████████                         | 457/1000 [00:07<00:08, 61.49it/s]
Performing wavelet analysis on individual series:  46%|█████████████████████▎                        | 464/1000 [00:07<00:09, 59.27it/s]
Performing wavelet analysis on individual series:  47%|█████████████████████▌                        | 470/1000 [00:08<00:09, 58.21it/s]
Performing wavelet analysis on individual series:  48%|█████████████████████▉                        | 477/1000 [00:08<00:08, 58.37it/s]
Performing wavelet analysis on individual series:  48%|██████████████████████▎                       | 484/1000 [00:08<00:08, 59.33it/s]
Performing wavelet analysis on individual series:  49%|██████████████████████▌                       | 491/1000 [00:08<00:08, 59.74it/s]
Performing wavelet analysis on individual series:  50%|██████████████████████▉                       | 498/1000 [00:08<00:08, 60.30it/s]
Performing wavelet analysis on individual series:  50%|███████████████████████▏                      | 505/1000 [00:08<00:08, 58.05it/s]
Performing wavelet analysis on individual series:  51%|███████████████████████▌                      | 512/1000 [00:08<00:08, 59.13it/s]
Performing wavelet analysis on individual series:  52%|███████████████████████▊                      | 519/1000 [00:08<00:08, 59.57it/s]
Performing wavelet analysis on individual series:  52%|████████████████████████▏                     | 525/1000 [00:08<00:07, 59.65it/s]
Performing wavelet analysis on individual series:  53%|████████████████████████▍                     | 531/1000 [00:09<00:07, 59.55it/s]
Performing wavelet analysis on individual series:  54%|████████████████████████▋                     | 538/1000 [00:09<00:07, 60.58it/s]
Performing wavelet analysis on individual series:  55%|█████████████████████████                     | 545/1000 [00:09<00:07, 61.66it/s]
Performing wavelet analysis on individual series:  55%|█████████████████████████▍                    | 552/1000 [00:09<00:07, 61.63it/s]
Performing wavelet analysis on individual series:  56%|█████████████████████████▋                    | 559/1000 [00:09<00:07, 61.74it/s]
Performing wavelet analysis on individual series:  57%|██████████████████████████                    | 566/1000 [00:09<00:07, 61.89it/s]
Performing wavelet analysis on individual series:  57%|██████████████████████████▎                   | 573/1000 [00:09<00:06, 61.78it/s]
Performing wavelet analysis on individual series:  58%|██████████████████████████▋                   | 580/1000 [00:09<00:06, 61.77it/s]
Performing wavelet analysis on individual series:  59%|███████████████████████████                   | 587/1000 [00:09<00:06, 62.41it/s]
Performing wavelet analysis on individual series:  59%|███████████████████████████▎                  | 594/1000 [00:10<00:06, 60.36it/s]
Performing wavelet analysis on individual series:  60%|███████████████████████████▋                  | 601/1000 [00:10<00:06, 60.77it/s]
Performing wavelet analysis on individual series:  61%|███████████████████████████▉                  | 608/1000 [00:10<00:06, 61.56it/s]
Performing wavelet analysis on individual series:  62%|████████████████████████████▎                 | 615/1000 [00:10<00:06, 61.49it/s]
Performing wavelet analysis on individual series:  62%|████████████████████████████▌                 | 622/1000 [00:10<00:06, 61.36it/s]
Performing wavelet analysis on individual series:  63%|████████████████████████████▉                 | 629/1000 [00:10<00:06, 61.44it/s]
Performing wavelet analysis on individual series:  64%|█████████████████████████████▎                | 636/1000 [00:10<00:05, 60.74it/s]
Performing wavelet analysis on individual series:  64%|█████████████████████████████▌                | 643/1000 [00:10<00:05, 60.86it/s]
Performing wavelet analysis on individual series:  65%|█████████████████████████████▉                | 650/1000 [00:10<00:05, 60.82it/s]
Performing wavelet analysis on individual series:  66%|██████████████████████████████▏               | 657/1000 [00:11<00:05, 59.23it/s]
Performing wavelet analysis on individual series:  66%|██████████████████████████████▌               | 664/1000 [00:11<00:05, 59.92it/s]
Performing wavelet analysis on individual series:  67%|██████████████████████████████▊               | 671/1000 [00:11<00:05, 60.56it/s]
Performing wavelet analysis on individual series:  68%|███████████████████████████████▏              | 678/1000 [00:11<00:05, 58.66it/s]
Performing wavelet analysis on individual series:  68%|███████████████████████████████▍              | 684/1000 [00:11<00:05, 58.68it/s]
Performing wavelet analysis on individual series:  69%|███████████████████████████████▊              | 691/1000 [00:11<00:05, 59.42it/s]
Performing wavelet analysis on individual series:  70%|████████████████████████████████              | 698/1000 [00:11<00:04, 61.00it/s]
Performing wavelet analysis on individual series:  70%|████████████████████████████████▍             | 705/1000 [00:11<00:04, 61.34it/s]
Performing wavelet analysis on individual series:  71%|████████████████████████████████▊             | 712/1000 [00:12<00:04, 60.58it/s]
Performing wavelet analysis on individual series:  72%|█████████████████████████████████             | 719/1000 [00:12<00:04, 60.67it/s]
Performing wavelet analysis on individual series:  73%|█████████████████████████████████▍            | 726/1000 [00:12<00:04, 61.12it/s]
Performing wavelet analysis on individual series:  73%|█████████████████████████████████▋            | 733/1000 [00:12<00:04, 61.34it/s]
Performing wavelet analysis on individual series:  74%|██████████████████████████████████            | 740/1000 [00:12<00:04, 61.54it/s]
Performing wavelet analysis on individual series:  75%|██████████████████████████████████▎           | 747/1000 [00:12<00:04, 60.76it/s]
Performing wavelet analysis on individual series:  75%|██████████████████████████████████▋           | 754/1000 [00:12<00:04, 60.78it/s]
Performing wavelet analysis on individual series:  76%|███████████████████████████████████           | 761/1000 [00:12<00:03, 60.94it/s]
Performing wavelet analysis on individual series:  77%|███████████████████████████████████▎          | 768/1000 [00:12<00:03, 60.32it/s]
Performing wavelet analysis on individual series:  78%|███████████████████████████████████▋          | 775/1000 [00:13<00:03, 58.91it/s]
Performing wavelet analysis on individual series:  78%|███████████████████████████████████▉          | 782/1000 [00:13<00:03, 59.44it/s]
Performing wavelet analysis on individual series:  79%|████████████████████████████████████▎         | 789/1000 [00:13<00:03, 59.94it/s]
Performing wavelet analysis on individual series:  80%|████████████████████████████████████▌         | 796/1000 [00:13<00:03, 61.01it/s]
Performing wavelet analysis on individual series:  80%|████████████████████████████████████▉         | 803/1000 [00:13<00:03, 60.71it/s]
Performing wavelet analysis on individual series:  81%|█████████████████████████████████████▎        | 810/1000 [00:13<00:03, 60.22it/s]
Performing wavelet analysis on individual series:  82%|█████████████████████████████████████▌        | 817/1000 [00:13<00:03, 59.22it/s]
Performing wavelet analysis on individual series:  82%|█████████████████████████████████████▊        | 823/1000 [00:13<00:03, 57.06it/s]
Performing wavelet analysis on individual series:  83%|██████████████████████████████████████▏       | 829/1000 [00:13<00:03, 56.87it/s]
Performing wavelet analysis on individual series:  84%|██████████████████████████████████████▍       | 835/1000 [00:14<00:02, 55.74it/s]
Performing wavelet analysis on individual series:  84%|██████████████████████████████████████▋       | 842/1000 [00:14<00:02, 57.32it/s]
Performing wavelet analysis on individual series:  85%|███████████████████████████████████████       | 849/1000 [00:14<00:02, 58.54it/s]
Performing wavelet analysis on individual series:  86%|███████████████████████████████████████▍      | 856/1000 [00:14<00:02, 59.52it/s]
Performing wavelet analysis on individual series:  86%|███████████████████████████████████████▋      | 862/1000 [00:14<00:02, 59.48it/s]
Performing wavelet analysis on individual series:  87%|███████████████████████████████████████▉      | 868/1000 [00:14<00:02, 59.50it/s]
Performing wavelet analysis on individual series:  88%|████████████████████████████████████████▎     | 875/1000 [00:14<00:02, 60.53it/s]
Performing wavelet analysis on individual series:  88%|████████████████████████████████████████▌     | 882/1000 [00:14<00:01, 61.66it/s]
Performing wavelet analysis on individual series:  89%|████████████████████████████████████████▉     | 889/1000 [00:14<00:01, 62.02it/s]
Performing wavelet analysis on individual series:  90%|█████████████████████████████████████████▏    | 896/1000 [00:15<00:01, 60.01it/s]
Performing wavelet analysis on individual series:  90%|█████████████████████████████████████████▌    | 903/1000 [00:15<00:01, 60.44it/s]
Performing wavelet analysis on individual series:  91%|█████████████████████████████████████████▊    | 910/1000 [00:15<00:01, 60.63it/s]
Performing wavelet analysis on individual series:  92%|██████████████████████████████████████████▏   | 917/1000 [00:15<00:01, 61.21it/s]
Performing wavelet analysis on individual series:  92%|██████████████████████████████████████████▌   | 924/1000 [00:15<00:01, 60.12it/s]
Performing wavelet analysis on individual series:  93%|██████████████████████████████████████████▊   | 931/1000 [00:15<00:01, 61.02it/s]
Performing wavelet analysis on individual series:  94%|███████████████████████████████████████████▏  | 938/1000 [00:15<00:01, 60.96it/s]
Performing wavelet analysis on individual series:  94%|███████████████████████████████████████████▍  | 945/1000 [00:15<00:00, 61.04it/s]
Performing wavelet analysis on individual series:  95%|███████████████████████████████████████████▊  | 952/1000 [00:16<00:00, 60.02it/s]
Performing wavelet analysis on individual series:  96%|████████████████████████████████████████████  | 959/1000 [00:16<00:00, 59.92it/s]
Performing wavelet analysis on individual series:  97%|████████████████████████████████████████████▍ | 966/1000 [00:16<00:00, 59.97it/s]
Performing wavelet analysis on individual series:  97%|████████████████████████████████████████████▊ | 973/1000 [00:16<00:00, 58.92it/s]
Performing wavelet analysis on individual series:  98%|█████████████████████████████████████████████ | 979/1000 [00:16<00:00, 57.75it/s]
Performing wavelet analysis on individual series:  98%|█████████████████████████████████████████████▎| 985/1000 [00:16<00:00, 56.41it/s]
Performing wavelet analysis on individual series:  99%|█████████████████████████████████████████████▋| 992/1000 [00:16<00:00, 57.88it/s]
Performing wavelet analysis on individual series: 100%|█████████████████████████████████████████████▉| 998/1000 [00:16<00:00, 57.33it/s]
Performing wavelet analysis on individual series: 100%|█████████████████████████████████████████████| 1000/1000 [00:16<00:00, 59.33it/s]

(<Figure size 1000x800 with 2 Axes>,
 <Axes: title={'center': 'NINO3 SST scalogram (CWT) with 95% threshold'}, xlabel='Time [year C.E.]', ylabel='Scale [yrs]'>)
../_images/1ffe76cd7d93a1949c1c7c33425d12e357d73c0496a0ebe0da06cab188c81318.png

To better match up the features of the scalogram and those of the timeseries’ trace, let’s use the summary_plot() method, which stacks together the timeseries itself, its scalogram (a plot of the magnitude of the wavelet power), and the power spectral density (PSD) obtained from summing the wavelet coefficients over time.

To speed things up, we’ll actually pass it the scalogram significance estimate just computed and the spectral density (psd) computed above:

nino3.summary_plot(psd=psd,scalogram=scal_sig2)
(<Figure size 800x1000 with 4 Axes>,
 {'ts': <Axes: xlabel='Time [year C.E.]', ylabel='NINO3 [$^{\\circ}$C]'>,
  'scal': <Axes: xlabel='Time [year C.E.]', ylabel='Scale [yrs]'>,
  'psd': <Axes: xlabel='mtm PSD'>,
  'cb': <Axes: xlabel='cwt Amplitude'>})
../_images/8818f61d15659c36b6f540b401385406de779351c15645d2ceae65d63036afb9.png

In a sense, the spectrum on the right is what you would get if you would average the scalogram values over time (it is not exactly so because the estimators used for the scalogram and the spectrum are slightly different, but this is not a bad way to conceptualize it).

Now we can better see how the broadband interannual peak glimpsed earlier in the spectrum figure is really the juxtaposition of several oscillations with a shifting frequency over time. It would have been impossible to know this from the spectrum alone, because it bunches together all time.

Now let’s do the same for AIR:

air_psd = air.spectral(method='mtm')
air_scal = air.wavelet().signif_test(number=1000)
air.summary_plot(psd = air_psd, scalogram=air_scal)
Performing wavelet analysis on individual series:   0%|                                                        | 0/1000 [00:00<?, ?it/s]
Performing wavelet analysis on individual series:   1%|▎                                               | 7/1000 [00:00<00:15, 64.54it/s]
Performing wavelet analysis on individual series:   1%|▋                                              | 14/1000 [00:00<00:16, 58.59it/s]
Performing wavelet analysis on individual series:   2%|▉                                              | 21/1000 [00:00<00:16, 59.37it/s]
Performing wavelet analysis on individual series:   3%|█▎                                             | 28/1000 [00:00<00:15, 60.99it/s]
Performing wavelet analysis on individual series:   4%|█▋                                             | 35/1000 [00:00<00:15, 60.51it/s]
Performing wavelet analysis on individual series:   4%|█▉                                             | 42/1000 [00:00<00:15, 60.45it/s]
Performing wavelet analysis on individual series:   5%|██▎                                            | 49/1000 [00:00<00:15, 62.03it/s]
Performing wavelet analysis on individual series:   6%|██▋                                            | 56/1000 [00:00<00:14, 63.30it/s]
Performing wavelet analysis on individual series:   6%|██▉                                            | 63/1000 [00:01<00:14, 63.48it/s]
Performing wavelet analysis on individual series:   7%|███▎                                           | 70/1000 [00:01<00:14, 64.32it/s]
Performing wavelet analysis on individual series:   8%|███▌                                           | 77/1000 [00:01<00:14, 62.64it/s]
Performing wavelet analysis on individual series:   8%|███▉                                           | 84/1000 [00:01<00:14, 63.45it/s]
Performing wavelet analysis on individual series:   9%|████▎                                          | 91/1000 [00:01<00:14, 64.32it/s]
Performing wavelet analysis on individual series:  10%|████▌                                          | 98/1000 [00:01<00:13, 64.51it/s]
Performing wavelet analysis on individual series:  10%|████▊                                         | 105/1000 [00:01<00:14, 63.14it/s]
Performing wavelet analysis on individual series:  11%|█████▏                                        | 112/1000 [00:01<00:13, 63.73it/s]
Performing wavelet analysis on individual series:  12%|█████▍                                        | 119/1000 [00:01<00:13, 63.87it/s]
Performing wavelet analysis on individual series:  13%|█████▊                                        | 126/1000 [00:01<00:13, 64.69it/s]
Performing wavelet analysis on individual series:  13%|██████                                        | 133/1000 [00:02<00:13, 64.73it/s]
Performing wavelet analysis on individual series:  14%|██████▍                                       | 140/1000 [00:02<00:13, 62.57it/s]
Performing wavelet analysis on individual series:  15%|██████▊                                       | 147/1000 [00:02<00:13, 62.16it/s]
Performing wavelet analysis on individual series:  15%|███████                                       | 154/1000 [00:02<00:13, 62.30it/s]
Performing wavelet analysis on individual series:  16%|███████▍                                      | 161/1000 [00:02<00:13, 62.61it/s]
Performing wavelet analysis on individual series:  17%|███████▋                                      | 168/1000 [00:02<00:13, 62.55it/s]
Performing wavelet analysis on individual series:  18%|████████                                      | 175/1000 [00:02<00:13, 62.24it/s]
Performing wavelet analysis on individual series:  18%|████████▎                                     | 182/1000 [00:02<00:13, 60.87it/s]
Performing wavelet analysis on individual series:  19%|████████▋                                     | 189/1000 [00:03<00:13, 58.91it/s]
Performing wavelet analysis on individual series:  20%|████████▉                                     | 195/1000 [00:03<00:13, 58.66it/s]
Performing wavelet analysis on individual series:  20%|█████████▎                                    | 202/1000 [00:03<00:13, 59.81it/s]
Performing wavelet analysis on individual series:  21%|█████████▌                                    | 209/1000 [00:03<00:12, 61.23it/s]
Performing wavelet analysis on individual series:  22%|█████████▉                                    | 216/1000 [00:03<00:12, 61.69it/s]
Performing wavelet analysis on individual series:  22%|██████████▎                                   | 223/1000 [00:03<00:12, 62.82it/s]
Performing wavelet analysis on individual series:  23%|██████████▌                                   | 230/1000 [00:03<00:12, 62.50it/s]
Performing wavelet analysis on individual series:  24%|██████████▉                                   | 237/1000 [00:03<00:12, 62.77it/s]
Performing wavelet analysis on individual series:  24%|███████████▏                                  | 244/1000 [00:03<00:11, 63.18it/s]
Performing wavelet analysis on individual series:  25%|███████████▌                                  | 251/1000 [00:04<00:11, 64.00it/s]
Performing wavelet analysis on individual series:  26%|███████████▊                                  | 258/1000 [00:04<00:11, 64.22it/s]
Performing wavelet analysis on individual series:  26%|████████████▏                                 | 265/1000 [00:04<00:11, 62.97it/s]
Performing wavelet analysis on individual series:  27%|████████████▌                                 | 272/1000 [00:04<00:11, 62.48it/s]
Performing wavelet analysis on individual series:  28%|████████████▊                                 | 279/1000 [00:04<00:11, 63.40it/s]
Performing wavelet analysis on individual series:  29%|█████████████▏                                | 286/1000 [00:04<00:11, 63.92it/s]
Performing wavelet analysis on individual series:  29%|█████████████▍                                | 293/1000 [00:04<00:11, 62.65it/s]
Performing wavelet analysis on individual series:  30%|█████████████▊                                | 300/1000 [00:04<00:10, 63.77it/s]
Performing wavelet analysis on individual series:  31%|██████████████                                | 307/1000 [00:04<00:10, 64.12it/s]
Performing wavelet analysis on individual series:  31%|██████████████▍                               | 314/1000 [00:05<00:10, 64.54it/s]
Performing wavelet analysis on individual series:  32%|██████████████▊                               | 321/1000 [00:05<00:10, 64.74it/s]
Performing wavelet analysis on individual series:  33%|███████████████                               | 328/1000 [00:05<00:10, 63.73it/s]
Performing wavelet analysis on individual series:  34%|███████████████▍                              | 335/1000 [00:05<00:10, 64.01it/s]
Performing wavelet analysis on individual series:  34%|███████████████▋                              | 342/1000 [00:05<00:10, 63.70it/s]
Performing wavelet analysis on individual series:  35%|████████████████                              | 349/1000 [00:05<00:10, 63.34it/s]
Performing wavelet analysis on individual series:  36%|████████████████▍                             | 356/1000 [00:05<00:10, 61.92it/s]
Performing wavelet analysis on individual series:  36%|████████████████▋                             | 363/1000 [00:05<00:10, 62.98it/s]
Performing wavelet analysis on individual series:  37%|█████████████████                             | 370/1000 [00:05<00:09, 64.60it/s]
Performing wavelet analysis on individual series:  38%|█████████████████▎                            | 377/1000 [00:05<00:09, 64.38it/s]
Performing wavelet analysis on individual series:  38%|█████████████████▋                            | 384/1000 [00:06<00:09, 64.44it/s]
Performing wavelet analysis on individual series:  39%|█████████████████▉                            | 391/1000 [00:06<00:09, 62.04it/s]
Performing wavelet analysis on individual series:  40%|██████████████████▎                           | 398/1000 [00:06<00:09, 61.63it/s]
Performing wavelet analysis on individual series:  40%|██████████████████▋                           | 405/1000 [00:06<00:09, 62.66it/s]
Performing wavelet analysis on individual series:  41%|██████████████████▉                           | 412/1000 [00:06<00:09, 62.94it/s]
Performing wavelet analysis on individual series:  42%|███████████████████▎                          | 419/1000 [00:06<00:09, 61.97it/s]
Performing wavelet analysis on individual series:  43%|███████████████████▌                          | 426/1000 [00:06<00:09, 62.01it/s]
Performing wavelet analysis on individual series:  43%|███████████████████▉                          | 433/1000 [00:06<00:08, 63.52it/s]
Performing wavelet analysis on individual series:  44%|████████████████████▏                         | 440/1000 [00:07<00:08, 64.09it/s]
Performing wavelet analysis on individual series:  45%|████████████████████▌                         | 447/1000 [00:07<00:08, 64.88it/s]
Performing wavelet analysis on individual series:  45%|████████████████████▉                         | 454/1000 [00:07<00:08, 63.99it/s]
Performing wavelet analysis on individual series:  46%|█████████████████████▏                        | 461/1000 [00:07<00:08, 64.39it/s]
Performing wavelet analysis on individual series:  47%|█████████████████████▌                        | 468/1000 [00:07<00:08, 64.57it/s]
Performing wavelet analysis on individual series:  48%|█████████████████████▊                        | 475/1000 [00:07<00:08, 64.57it/s]
Performing wavelet analysis on individual series:  48%|██████████████████████▏                       | 482/1000 [00:07<00:08, 61.52it/s]
Performing wavelet analysis on individual series:  49%|██████████████████████▍                       | 489/1000 [00:07<00:08, 61.77it/s]
Performing wavelet analysis on individual series:  50%|██████████████████████▊                       | 496/1000 [00:07<00:08, 62.48it/s]
Performing wavelet analysis on individual series:  50%|███████████████████████▏                      | 503/1000 [00:07<00:07, 63.43it/s]
Performing wavelet analysis on individual series:  51%|███████████████████████▍                      | 510/1000 [00:08<00:07, 63.80it/s]
Performing wavelet analysis on individual series:  52%|███████████████████████▊                      | 517/1000 [00:08<00:07, 63.64it/s]
Performing wavelet analysis on individual series:  52%|████████████████████████                      | 524/1000 [00:08<00:07, 63.59it/s]
Performing wavelet analysis on individual series:  53%|████████████████████████▍                     | 531/1000 [00:08<00:07, 64.59it/s]
Performing wavelet analysis on individual series:  54%|████████████████████████▋                     | 538/1000 [00:08<00:07, 64.52it/s]
Performing wavelet analysis on individual series:  55%|█████████████████████████                     | 545/1000 [00:08<00:07, 63.82it/s]
Performing wavelet analysis on individual series:  55%|█████████████████████████▍                    | 552/1000 [00:08<00:07, 63.05it/s]
Performing wavelet analysis on individual series:  56%|█████████████████████████▋                    | 559/1000 [00:08<00:07, 62.68it/s]
Performing wavelet analysis on individual series:  57%|██████████████████████████                    | 566/1000 [00:08<00:06, 63.36it/s]
Performing wavelet analysis on individual series:  57%|██████████████████████████▎                   | 573/1000 [00:09<00:06, 64.68it/s]
Performing wavelet analysis on individual series:  58%|██████████████████████████▋                   | 580/1000 [00:09<00:06, 63.52it/s]
Performing wavelet analysis on individual series:  59%|███████████████████████████                   | 587/1000 [00:09<00:06, 63.79it/s]
Performing wavelet analysis on individual series:  59%|███████████████████████████▎                  | 594/1000 [00:09<00:06, 64.98it/s]
Performing wavelet analysis on individual series:  60%|███████████████████████████▋                  | 601/1000 [00:09<00:06, 64.44it/s]
Performing wavelet analysis on individual series:  61%|███████████████████████████▉                  | 608/1000 [00:09<00:06, 64.23it/s]
Performing wavelet analysis on individual series:  62%|████████████████████████████▎                 | 615/1000 [00:09<00:06, 62.67it/s]
Performing wavelet analysis on individual series:  62%|████████████████████████████▌                 | 622/1000 [00:09<00:06, 61.96it/s]
Performing wavelet analysis on individual series:  63%|████████████████████████████▉                 | 629/1000 [00:09<00:06, 61.79it/s]
Performing wavelet analysis on individual series:  64%|█████████████████████████████▎                | 636/1000 [00:10<00:05, 61.43it/s]
Performing wavelet analysis on individual series:  64%|█████████████████████████████▌                | 643/1000 [00:10<00:05, 61.96it/s]
Performing wavelet analysis on individual series:  65%|█████████████████████████████▉                | 650/1000 [00:10<00:05, 62.80it/s]
Performing wavelet analysis on individual series:  66%|██████████████████████████████▏               | 657/1000 [00:10<00:05, 64.24it/s]
Performing wavelet analysis on individual series:  66%|██████████████████████████████▌               | 664/1000 [00:10<00:05, 64.23it/s]
Performing wavelet analysis on individual series:  67%|██████████████████████████████▊               | 671/1000 [00:10<00:05, 61.60it/s]
Performing wavelet analysis on individual series:  68%|███████████████████████████████▏              | 678/1000 [00:10<00:05, 61.08it/s]
Performing wavelet analysis on individual series:  68%|███████████████████████████████▌              | 685/1000 [00:10<00:05, 62.63it/s]
Performing wavelet analysis on individual series:  69%|███████████████████████████████▊              | 692/1000 [00:10<00:04, 63.35it/s]
Performing wavelet analysis on individual series:  70%|████████████████████████████████▏             | 699/1000 [00:11<00:04, 62.19it/s]
Performing wavelet analysis on individual series:  71%|████████████████████████████████▍             | 706/1000 [00:11<00:04, 61.68it/s]
Performing wavelet analysis on individual series:  71%|████████████████████████████████▊             | 713/1000 [00:11<00:04, 62.23it/s]
Performing wavelet analysis on individual series:  72%|█████████████████████████████████             | 720/1000 [00:11<00:04, 63.55it/s]
Performing wavelet analysis on individual series:  73%|█████████████████████████████████▍            | 727/1000 [00:11<00:04, 64.27it/s]
Performing wavelet analysis on individual series:  73%|█████████████████████████████████▊            | 734/1000 [00:11<00:04, 64.00it/s]
Performing wavelet analysis on individual series:  74%|██████████████████████████████████            | 741/1000 [00:11<00:04, 63.55it/s]
Performing wavelet analysis on individual series:  75%|██████████████████████████████████▍           | 748/1000 [00:11<00:03, 63.80it/s]
Performing wavelet analysis on individual series:  76%|██████████████████████████████████▋           | 755/1000 [00:11<00:03, 64.34it/s]
Performing wavelet analysis on individual series:  76%|███████████████████████████████████           | 762/1000 [00:12<00:03, 64.64it/s]
Performing wavelet analysis on individual series:  77%|███████████████████████████████████▎          | 769/1000 [00:12<00:03, 62.16it/s]
Performing wavelet analysis on individual series:  78%|███████████████████████████████████▋          | 776/1000 [00:12<00:03, 63.33it/s]
Performing wavelet analysis on individual series:  78%|████████████████████████████████████          | 783/1000 [00:12<00:03, 63.84it/s]
Performing wavelet analysis on individual series:  79%|████████████████████████████████████▎         | 790/1000 [00:12<00:03, 64.32it/s]
Performing wavelet analysis on individual series:  80%|████████████████████████████████████▋         | 797/1000 [00:12<00:03, 64.26it/s]
Performing wavelet analysis on individual series:  80%|████████████████████████████████████▉         | 804/1000 [00:12<00:03, 62.17it/s]
Performing wavelet analysis on individual series:  81%|█████████████████████████████████████▎        | 811/1000 [00:12<00:02, 63.07it/s]
Performing wavelet analysis on individual series:  82%|█████████████████████████████████████▋        | 818/1000 [00:12<00:02, 64.17it/s]
Performing wavelet analysis on individual series:  82%|█████████████████████████████████████▉        | 825/1000 [00:13<00:02, 63.85it/s]
Performing wavelet analysis on individual series:  83%|██████████████████████████████████████▎       | 832/1000 [00:13<00:02, 62.71it/s]
Performing wavelet analysis on individual series:  84%|██████████████████████████████████████▌       | 839/1000 [00:13<00:02, 62.92it/s]
Performing wavelet analysis on individual series:  85%|██████████████████████████████████████▉       | 846/1000 [00:13<00:02, 62.72it/s]
Performing wavelet analysis on individual series:  85%|███████████████████████████████████████▏      | 853/1000 [00:13<00:02, 62.65it/s]
Performing wavelet analysis on individual series:  86%|███████████████████████████████████████▌      | 860/1000 [00:13<00:02, 62.82it/s]
Performing wavelet analysis on individual series:  87%|███████████████████████████████████████▉      | 867/1000 [00:13<00:02, 61.91it/s]
Performing wavelet analysis on individual series:  87%|████████████████████████████████████████▏     | 874/1000 [00:13<00:02, 62.48it/s]
Performing wavelet analysis on individual series:  88%|████████████████████████████████████████▌     | 881/1000 [00:13<00:01, 63.45it/s]
Performing wavelet analysis on individual series:  89%|████████████████████████████████████████▊     | 888/1000 [00:14<00:01, 63.69it/s]
Performing wavelet analysis on individual series:  90%|█████████████████████████████████████████▏    | 895/1000 [00:14<00:01, 62.72it/s]
Performing wavelet analysis on individual series:  90%|█████████████████████████████████████████▍    | 902/1000 [00:14<00:01, 62.70it/s]
Performing wavelet analysis on individual series:  91%|█████████████████████████████████████████▊    | 909/1000 [00:14<00:01, 62.71it/s]
Performing wavelet analysis on individual series:  92%|██████████████████████████████████████████▏   | 916/1000 [00:14<00:01, 62.31it/s]
Performing wavelet analysis on individual series:  92%|██████████████████████████████████████████▍   | 923/1000 [00:14<00:01, 63.34it/s]
Performing wavelet analysis on individual series:  93%|██████████████████████████████████████████▊   | 930/1000 [00:14<00:01, 62.73it/s]
Performing wavelet analysis on individual series:  94%|███████████████████████████████████████████   | 937/1000 [00:14<00:00, 63.42it/s]
Performing wavelet analysis on individual series:  94%|███████████████████████████████████████████▍  | 944/1000 [00:14<00:00, 63.55it/s]
Performing wavelet analysis on individual series:  95%|███████████████████████████████████████████▋  | 951/1000 [00:15<00:00, 62.57it/s]
Performing wavelet analysis on individual series:  96%|████████████████████████████████████████████  | 958/1000 [00:15<00:00, 61.88it/s]
Performing wavelet analysis on individual series:  96%|████████████████████████████████████████████▍ | 965/1000 [00:15<00:00, 62.41it/s]
Performing wavelet analysis on individual series:  97%|████████████████████████████████████████████▋ | 972/1000 [00:15<00:00, 62.52it/s]
Performing wavelet analysis on individual series:  98%|█████████████████████████████████████████████ | 979/1000 [00:15<00:00, 60.96it/s]
Performing wavelet analysis on individual series:  99%|█████████████████████████████████████████████▎| 986/1000 [00:15<00:00, 59.29it/s]
Performing wavelet analysis on individual series:  99%|█████████████████████████████████████████████▋| 993/1000 [00:15<00:00, 60.04it/s]
Performing wavelet analysis on individual series: 100%|█████████████████████████████████████████████| 1000/1000 [00:15<00:00, 60.72it/s]
Performing wavelet analysis on individual series: 100%|█████████████████████████████████████████████| 1000/1000 [00:15<00:00, 62.89it/s]

(<Figure size 800x1000 with 4 Axes>,
 {'ts': <Axes: xlabel='Time [year C.E.]', ylabel='AIR [mm/month]'>,
  'scal': <Axes: xlabel='Time [year C.E.]', ylabel='Scale [yrs]'>,
  'psd': <Axes: xlabel='mtm PSD'>,
  'cb': <Axes: xlabel='cwt Amplitude'>})
../_images/8d176b55465f64606a7f6760e040bb9ce2b109258da584f038ee1cd35a1c03e9.png

NINO3 vs AIR#

Now let us delve into the relationship between NINO3 and AIR. To do that, we apply wavelet transform coherency to identify phase relationships between the two series at various scales:

coh = nino3.wavelet_coherence(air)
fig, ax = coh.plot()
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
Cell In[10], line 2
      1 coh = nino3.wavelet_coherence(air)
----> 2 fig, ax = coh.plot()

File ~/Documents/GitHub/Pyleoclim_util/pyleoclim/core/coherence.py:286, in Coherence.plot(self, var, xlabel, ylabel, title, figsize, ylim, xlim, in_scale, yticks, contourf_style, phase_style, cbar_style, savefig_settings, ax, signif_clr, signif_linestyles, signif_linewidths, signif_thresh, under_clr, over_clr, bad_clr)
    280 contourf_args = {
    281     'cmap': 'magma',
    282     'origin': 'lower',
    283 }
    284 contourf_args.update(contourf_style)
--> 286 cmap = cm.get_cmap(contourf_args['cmap'])
    287 cmap.set_under(under_clr)
    288 cmap.set_over(over_clr)

AttributeError: module 'matplotlib.cm' has no attribute 'get_cmap'
../_images/81df7aeac121a2d3c2d591681351af1646c73032232a440ac622e65cdc7d6416.png

This plot shows three things:

  • the wavelet transform coherency (WTC), which may be thought of as a (squared) correlation coefficient in time-scale space: 0 if the series do not covary, 1 if they vary in perfect unison at that time and scale.

  • the phase angle between the two series, represented by the little arrows. Their orientation follows a trigonometric convention: right = \(0^{\circ}\), top = \(90^{\circ}\), left = \(180^{\circ}\), bottom = \(-90^{\circ}\) or \(+270^{\circ}\).

  • the cone of influence is the white-shaded region, indicating the portions of the wavelet coefficients that are affected by edge effects. Those regions are narrow when analyzing short scales, but for the largest scale they encompass the entire series. Basically, anything in those regions is to be viewed with caution.

Arrows pointing to the right indicate a phase angle close to zero at all scales longer than precession. We can quantify that by computing the average phase angle in a given range of scales, like so:

ph = coh.phase_stats(scales=[2,8])
print("The mean angle is {:4.2f}°".format(ph.mean_angle/np.pi*180))
The mean angle is 154.29°

The result is compatible with an anti-phased relationship between ENSO and the Indian Monsoon on interannual timescales, with a small lag. \(154^{\circ}\) is \(26^{\circ}\) away from \(180^{\circ}\). For a 4y scale, \(360^{\circ}\) would be 4 years, so \(26^{\circ}\) is:

26/360*4*12
3.4666666666666663

About 3.5 months.

One might be tempted to interpret phase angles at shorter scales. Let us first see if they are significant against phase randomization. As before this can be done in one function call, though a little patience is required to obtain the result if we run many Monte Carlo simulations:

coh_sig = coh.signif_test(number=1000)
phase = coh_sig.phase_stats(scales=[2,8])
Performing wavelet coherence on surrogate pairs: 100%|██████████| 1000/1000 [02:56<00:00,  5.68it/s]
fig, ax = coh_sig.plot()
../_images/f8b7caad4bcbd293e272325e7639187575b07a6fdd27d6f3beb006668ea65499.png

We see indeed that very few of the arrows at scales shorter than 2y are associated with any significant “islands”. Note that Pyleoclim only displays arrows that correspond to coherence above a certain threshold. To change that, you may adjust the ‘pt’ parameter of the phase_style of the method.

Note too that we could have chosen a parametric test against an AR(1) benchmark (see [surrogates tutorial](URL TBD)).

Let us return to the estimate of the phase:

print(phase)
Results(mean_angle=2.6927825175802447, kappa=3.360315074427689, sigma=0.6012824554612396, kappa_hi=0.47829385281852543, sigma_lo=1.7079516174031517)

The result contains mean_angle (the mean angle for those scales), sigma (the circular standard deviation of the angles), kappa (the von Mises statistic), sigma_lo (alpha-level quantile for sigma) and kappa_hi, the (1-alpha)-level quantile for kappa. \(\kappa\) is a measure of concentration (a reciprocal measure of dispersion), so \(1/\kappa\) is analogous to \(\sigma^2\). For a phase relationship to be coherent, it should have a consistent angle throughout, so low \(\sigma\) and high \(\kappa\). The confidence limits are given by sigma_lo and kappa_hi.

From this example, one diagnoses a strong anti-phased relationship in the ENSO band, with high von Mises concentration (\(\kappa \sim 3.36 \gg \kappa_{hi} = 0.49\)) and low circular dispersion (\(\sigma \simeq 0.5 \ll \sigma_{lo}=1.69\)). This would be strong evidence of a consistent anti-phasing between NINO3 and AIR at those scales. That is, El Niño events tend to depress Indian Monsoon rainfall, as was observed particularly in the late 19th century.

Another consideration is that coherency is like a correlation coefficient in wavelet space: it tells you how similar two series are for a given time and scale, yet it says nothing about what fraction of the total variability is shared. This is better measured by the cross-wavelet transform (XWT), which highlights areas of high common power. Both of those, along with the original series, can be visualized with the dashboard() function:

coh_sig.dashboard()
(<Figure size 900x1200 with 6 Axes>,
 {'ts1': <Axes: ylabel='NINO3 [$^{\\circ}$C]'>,
  'ts2': <Axes: xlabel='Time [year C.E.]', ylabel='AIR [mm/month]'>,
  'wtc': <Axes: ylabel='Scale [yrs]'>,
  'xwt': <Axes: xlabel='Time [year C.E.]', ylabel='Scale [yrs]'>})
../_images/b00789774a672ae729038c86b39515def6619b44eb426f123d78435e3d3fc3bc.png

Here we see that the interannual scales are the only ones to show up consistently in both metrics (XWT and WTC). This means that, out of the large swathes of WTC one would consider “coherent”, only those areas highlighted in XWT in green-yellow in the 2-5y range correspond to a sizable signal. This conforms with intuition: ENSO operates on interannual timescales, and any variability at shorter timescales is either unrelated to it, or related in such a nonlinear fashion (e.g. energy cascades) that a method like this cannot divine it. There are hints of multidecadal coherence as well, but those do not appear significant with respect to phase randomization.

Takeways#

  • Pyleoclim enables wavelet and wavelet coherence analysis.

  • Both Scalogram and Coherence objects have a built-in signif_test() method, which the plot() method will know what to do with. There are currently two null hypotheses used for these tests: equal power spectrum, random phase (“phaseran”) or autoregressive of order one (“ar1sim”).

  • Wavelet Transform Coherency may be thought of as a (squared) correlation coefficient in the space of time and scale: 0 if the series do not covary, 1 if they vary in perfect unison at that time and scale.

  • Properly interpreting the results of wavelet and wavelet coherence analyses requires knowing something about the methods. Theory helps!

  • Here we had evenly-spaced data, handled with the CWT algorithm of Torrence & Compo (1998). Pyleoclim can also handle unevenly-spaced data, through the WWZ algorithm of Foster (1996), which is much gap-tolerant but much slower.