Skip to content

Commit 297ee3d

Browse files
authored
Address Cookbook edits for release (#14)
1 parent 4a747a5 commit 297ee3d

File tree

5 files changed

+25
-25
lines changed

5 files changed

+25
-25
lines changed

README.md

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,18 @@ Wavelets are a powerful tool to analyze time-series data. When data frequencies
2525

2626
This cookbook is broken into two main sections:
2727

28-
- Foundations
29-
- Example Workflows
28+
- Introduction
29+
- Example Geoscience Workflows
3030

31-
### Foundations
32-
33-
_"Wavelet Basics"_ covers the motivation and background for wavelet analysis by reviewing time-series data and the strengths and weaknesses of other signal analysis tools like Fourier Transform
34-
35-
### Example Workflows
31+
### Introduction
3632

33+
- _"Wavelet Basics"_: Understand the motivation and background for wavelet analysis by reviewing time-series data and the strengths and weaknesses of other signal analysis tools like Fourier Transform
3734
- _"PyWavelets and Jingle Bells"_: Learn how to use `PyWavelets`, a Python implementation of wavelet analysis, to determine the order of notes in a simple musical piece
3835
- _"Spy Keypad"_: Learn how to use wavelets to undercover the frequency and order of notes in an unknown piece of audio data
39-
- _"Atmospheric Data: Nino 3 SST Index"_: Learn how to apply wavelets to real atmospheric and oceanic data to generate a power wavelet scalogram, similiar to the 1999 paper ["A Practical Guide to Wavelet Analysis"](https://psl.noaa.gov/people/gilbert.p.compo/Torrence_compo1998.pdf) by Torrence and Compo in Python
36+
37+
### Geoscience Workflows
38+
39+
- _"Atmospheric Data: Nino 3 SST Index"_: Learn how to apply wavelets to real atmospheric and oceanic data to generate a power wavelet scalogram, similar to the 1999 paper ["A Practical Guide to Wavelet Analysis"](https://psl.noaa.gov/people/gilbert.p.compo/Torrence_compo1998.pdf) by Torrence and Compo in Python
4040

4141
## Running the Notebooks
4242

@@ -63,17 +63,15 @@ Jupyter](https://foundations.projectpythia.org/foundations/getting-started-jupyt
6363

6464
If you are interested in running this material locally on your computer, you will need to follow this workflow:
6565

66-
(Replace "cookbook-example" with the title of your cookbooks)
67-
68-
1. Clone the `https://github.com/ProjectPythia/cookbook-example` repository:
66+
1. Clone the `https://github.com/ProjectPythia/wavelet-cookbook` repository:
6967

7068
```bash
71-
git clone https://github.com/ProjectPythia/cookbook-example.git
69+
git clone https://github.com/ProjectPythia/wavelet-cookbook.git
7270
```
7371

74-
1. Move into the `cookbook-example` directory
72+
1. Move into the `wavelet-cookbook` directory
7573
```bash
76-
cd cookbook-example
74+
cd wavelet-cookbook
7775
```
7876
1. Create and activate your conda environment from the `environment.yml` file
7977
```bash

_toc.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ parts:
77
- caption: Introduction
88
chapters:
99
- file: notebooks/wavelet-introduction/wavelet-basics
10-
- caption: Example Workflows
10+
- file: notebooks/wavelet-introduction/jingle-bells
11+
- file: notebooks/wavelet-introduction/spy-keypad
12+
- caption: Geoscience Workflows
1113
chapters:
12-
- file: notebooks/example-workflows/jingle-bells
13-
- file: notebooks/example-workflows/spy-keypad
1414
- file: notebooks/example-workflows/nino3

notebooks/example-workflows/nino3.ipynb

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -231,8 +231,10 @@
231231
]
232232
},
233233
{
234-
"cell_type": "markdown",
234+
"cell_type": "code",
235+
"execution_count": null,
235236
"metadata": {},
237+
"outputs": [],
236238
"source": [
237239
"wavelets = [f\"cmor{x:.1f}-{y:.1f}\" for x in [0.5, 1.5, 2.5] for y in [0.5, 1.0, 1.5]]\n",
238240
"fig, axs = plt.subplots(3, 3, figsize=(10, 10), sharex=True, sharey=True)\n",
@@ -349,7 +351,7 @@
349351
"metadata": {},
350352
"source": [
351353
"## Power Spectrum\n",
352-
"The power spectrum is the real component of the wavelet coefficents. We can find this value by squaring the absolute value of the `wavelet_coeffs` to return the magnitude of the real component to make a better graph."
354+
"The power spectrum is the real component of the wavelet coefficients. We can find this value by squaring the absolute value of the `wavelet_coeffs` to return the magnitude of the real component to make a better graph."
353355
]
354356
},
355357
{
@@ -460,7 +462,7 @@
460462
"metadata": {},
461463
"source": [
462464
"## Summary\n",
463-
"Frequency signals appear in more than just audio! A frequency analysis of weather data can inform us about how weather trends change through a year and over a decades worth of data\n",
465+
"Frequency signals appear in more than just audio! A frequency analysis of weather data can inform us about how weather trends change through a year and over a decades worth of data.\n",
464466
"\n",
465467
"### What's next?\n",
466468
"\n",

notebooks/example-workflows/jingle-bells.ipynb renamed to notebooks/wavelet-introduction/jingle-bells.ipynb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@
107107
"source": [
108108
"## PyWavelets Overview\n",
109109
"\n",
110-
"PyWavelets returns both the coefficents and frequency information for wavelets from the input data\n",
110+
"PyWavelets returns both the coefficients and frequency information for wavelets from the input data\n",
111111
"\n",
112112
"```\n",
113113
"coeffs, frequencies = pywt.cwt(data, scales, wavelet, sampling_period)\n",
@@ -124,10 +124,10 @@
124124
"Required:\n",
125125
"- data: input data (as an array)\n",
126126
"- wavelet: name of the Mother wavelet\n",
127-
"- scales: collection of the scales to use will determine the range which the wavelet will be streched or squished\n",
127+
"- scales: collection of the scales to use will determine the range which the wavelet will be stretched or squished\n",
128128
"\n",
129129
"Optional:\n",
130-
"- sampling_period: sampling period for frequencies output. Scales are not scaled by the period (and coefficents are independent of the sampling_period)"
130+
"- sampling_period: sampling period for frequencies output. Scales are not scaled by the period (and coefficients are independent of the sampling_period)"
131131
]
132132
},
133133
{
@@ -137,7 +137,7 @@
137137
"### Return Values\n",
138138
"The continuous wavelet transforms in PyWavelets returns two values:\n",
139139
"\n",
140-
"- coefficents: collection of complex number outputs for wavelet coefficients\n",
140+
"- coefficients: collection of complex number outputs for wavelet coefficients\n",
141141
"- frequencies: collection of frequencies (if the sampling period are in seconds then frequencies are in hertz otherwise a sampling period of 1 is assumed)\n",
142142
"\n",
143143
"The final size of coefficients depends on the length of the input data and the length of the given scales."

notebooks/example-workflows/spy-keypad.ipynb renamed to notebooks/wavelet-introduction/spy-keypad.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@
159159
"source": [
160160
"## Wavelet Analysis: Power Spectrum\n",
161161
"\n",
162-
"The power spectrum plots the real component of the complex number returns from wavelet coefficents. This will return information about the frequency and time that we need to use to determine which notes are used in what order for the keypad.\n",
162+
"The power spectrum plots the real component of the complex number returns from wavelet coefficients. This will return information about the frequency and time that we need to use to determine which notes are used in what order for the keypad.\n",
163163
"\n",
164164
"For the purpose of this example, we will use the Morlet mother wavelet. Morlet is one type of mother wavelet useful for working with audio signals and is a good general wavelet to start with when analyzing frequencies of a signal.\n",
165165
"\n",

0 commit comments

Comments
 (0)