Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Example Workflows #2

Merged
merged 8 commits into from
Jul 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
This Project Pythia Cookbook covers working with wavelets in Python

## Motivation

(Add a few sentences stating why this cookbook will be useful. What skills will you, "the chef", gain once you have reached the end of the cookbook?)
Wavelets are a tool to analysis time-series data. When data frequencies vary over time, wavelets can be applied to analysis trends and overcome the time vs. frequency limitations of Fourier Transforms

## Authors

Expand All @@ -28,11 +27,13 @@ This Project Pythia Cookbook covers working with wavelets in Python

### Foundations

(Add content for this section, e.g., "The foundational content includes ... ")
- Wavelet Basics

### Example Workflows

(Add content for this section, e.g., "Example workflows include ... ")
- PyWavelets and Jingle Bells
- Spy Keypad
- Atmospheric Data: nino3

## Running the Notebooks

Expand Down
3 changes: 3 additions & 0 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@ channels:
dependencies:
- jupyter-book
- jupyterlab
- geocat-datafiles
- sphinx-pythia-theme
- numpy
- xarray
- nodejs
- matplotlib
- pandas
- scipy
Expand Down
Binary file added notebooks/data/jingle_bells.wav
Binary file not shown.
Binary file added notebooks/data/mystery_signal.wav
Binary file not shown.
22 changes: 5 additions & 17 deletions notebooks/example-workflows/jingle-bells.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,6 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Let's start here! If you can directly link to an image relevant to your notebook, such as [canonical logos](https://github.com/numpy/numpy/blob/main/doc/source/_static/numpylogo.svg), do so here at the top of your notebook. You can do this with Markdown syntax,\n",
"\n",
"> `![<image title>](http://link.com/to/image.png \"image alt text\")`\n",
"\n",
"or edit this cell to see raw HTML `img` demonstration. This is preferred if you need to shrink your embedded image. **Either way be sure to include `alt` text for any embedded images to make your content more accessible.**\n",
"\n",
"<img src=\"images/ProjectPythia_Logo_Final-01-Blue.svg\" width=250 alt=\"Project Pythia Logo\"></img>"
]
},
Expand Down Expand Up @@ -50,17 +44,13 @@
"metadata": {},
"source": [
"## Prerequisites\n",
"This section was inspired by [this template](https://github.com/alan-turing-institute/the-turing-way/blob/master/book/templates/chapter-template/chapter-landing-page.md) of the wonderful [The Turing Way](https://the-turing-way.netlify.app) Jupyter Book.\n",
"\n",
"Following your overview, tell your reader what concepts, packages, or other background information they'll **need** before learning your material. Tie this explicitly with links to other pages here in Foundations or to relevant external resources. Remove this body text, then populate the Markdown table, denoted in this cell with `|` vertical brackets, below, and fill out the information following. In this table, lay out prerequisite concepts by explicitly linking to other Foundations material or external resources, or describe generally helpful concepts.\n",
"\n",
"Label the importance of each concept explicitly as **helpful/necessary**.\n",
"\n",
"| Concepts | Importance | Notes |\n",
"| --- | --- | --- |\n",
"| [Intro to Cartopy](https://foundations.projectpythia.org/core/cartopy/cartopy.html) | Necessary | |\n",
"| [Understanding of NetCDF](https://foundations.projectpythia.org/core/data-formats/netcdf-cf.html) | Helpful | Familiarity with metadata structure |\n",
"| Project management | Helpful | |\n",
"| [Wavelet Basics](https://projectpythia.org/wavelet-cookbook/notebooks/wavelet-introduction/wavelet-basics.html) | Necessary | Wavelet Terminology |\n",
"| [Intro to Matplotlib](https://foundations.projectpythia.org/core/matplotlib/matplotlib-basics.html) | Necessary | Plotting on a data |\n",
"| [Intro to Numpy](https://foundations.projectpythia.org/core/numpy/numpy-basics.html)| Necessary | Familiarity with working with arrays |\n",
"\n",
"\n",
"- **Time to learn**: estimate in minutes. For a rough idea, use 5 mins per subsection, 10 if longer; add these up for a total. Safer to round up and overestimate.\n",
"- **System requirements**:\n",
Expand All @@ -86,7 +76,6 @@
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -113,7 +102,6 @@
"metadata": {},
"source": [
"### Input Values\n",
"- data: inpt data as a array_like\n",
"- scales: array_like collection of the scales to use (np.arange(s0, jtot, dj))\n",
"- wavelet: name of Mother wavelet\n",
"- sampling_period: optional sampling period for frequencies output"
Expand Down Expand Up @@ -234,7 +222,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Wavelet_coeff is a complex numbre with a real and an imaginary number (1 + 2i). The less common phase plot uses the imaginary component of the complex number\n",
"Wavelet_coeff is a complex number with a real and an imaginary number (1 + 2i). The less common phase plot uses the imaginary component of the complex number\n",
"\n",
"```\n",
"import numpy as np\n",
Expand Down
318 changes: 262 additions & 56 deletions notebooks/example-workflows/nino3.ipynb

Large diffs are not rendered by default.

519 changes: 406 additions & 113 deletions notebooks/example-workflows/spy-keypad.ipynb

Large diffs are not rendered by default.

378 changes: 214 additions & 164 deletions notebooks/wavelet-introduction/wavelet-basics.ipynb

Large diffs are not rendered by default.

Loading