Skip to content

Commit

Permalink
update example notebooks
Browse files Browse the repository at this point in the history
  • Loading branch information
flaport committed Feb 12, 2022
1 parent 4e99939 commit 7054005
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 65 deletions.
Binary file modified docs/images/output_10_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 3 additions & 10 deletions examples/01_quick_start.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,8 @@
"id": "ab894499",
"metadata": {},
"source": [
"# SAX Quick Start"
]
},
{
"cell_type": "markdown",
"id": "ac603874",
"metadata": {},
"source": [
"Let's go over the core functionality of SAX."
"# SAX Quick Start\n",
"> Let's go over the core functionality of SAX."
]
},
{
Expand Down Expand Up @@ -55,7 +48,7 @@
},
{
"cell_type": "markdown",
"id": "4f9a078b",
"id": "4938b729-8b27-406f-b5fd-e118a9fb39f1",
"metadata": {},
"source": [
"## Imports"
Expand Down
19 changes: 2 additions & 17 deletions examples/02_all_pass_filter.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,8 @@
"id": "a234aed9",
"metadata": {},
"source": [
"# Simulating an All-Pass Filter"
]
},
{
"cell_type": "markdown",
"id": "0b359fd3",
"metadata": {},
"source": [
"A simple comparison between an analytical evaluation of an all pass filter and using SAX."
]
},
{
"cell_type": "markdown",
"id": "4ca237fd",
"metadata": {},
"source": [
"## Imports"
"# Simulating an All-Pass Filter\n",
"> A simple comparison between an analytical evaluation of an all pass filter and using SAX."
]
},
{
Expand Down
10 changes: 1 addition & 9 deletions examples/03_circuit_from_yaml.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,7 @@
"metadata": {},
"source": [
"# Circuit from YAML\n",
"Sometimes it's useful to be able to define circuits from YAML definitions. To not re-invent the wheel, SAX uses [GDSFactory](https://gdsfactory.readthedocs.io/en/latest/yaml.html)'s YAML netlist spec to define its circuits. This makes it very easy to convert a GDSFactory layout to a SAX circuit model!"
]
},
{
"cell_type": "markdown",
"id": "narrative-poverty",
"metadata": {},
"source": [
"## Imports"
"> Sometimes it's useful to be able to define circuits from YAML definitions. To not re-invent the wheel, SAX uses [GDSFactory](https://gdsfactory.readthedocs.io/en/latest/yaml.html)'s YAML netlist spec to define its circuits. This makes it very easy to convert a GDSFactory layout to a SAX circuit model!"
]
},
{
Expand Down
13 changes: 3 additions & 10 deletions examples/04_multimode_simulations.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,8 @@
"id": "textile-panel",
"metadata": {},
"source": [
"# Multimode simulations"
]
},
{
"cell_type": "markdown",
"id": "latin-strike",
"metadata": {},
"source": [
"## Imports"
"# Multimode simulations\n",
"> SAX can handle multiple modes too!"
]
},
{
Expand All @@ -23,7 +16,7 @@
"metadata": {},
"outputs": [],
"source": [
"from itertools import combinations, combinations_with_replacement, product\n",
"from itertools import combinations_with_replacement, product\n",
"\n",
"import jax\n",
"import jax.numpy as jnp\n",
Expand Down
29 changes: 20 additions & 9 deletions examples/05_thinfilm.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,19 @@
"cells": [
{
"cell_type": "markdown",
"id": "96f9e68f",
"id": "828187f9-e15f-4da1-b6bc-d94808ce7f2f",
"metadata": {},
"source": [
"# Thin film optimization\n",
"\n",
"contributed by [simbilod](https://github.com/simbilod), adapted by [flaport](https://github.com/flaport)\n",
"\n",
"In this notebook, we apply SAX to thin-film optimization and show how it can be used for wavelength-dependent parameter optimization.\n",
"\n",
"The language of transfer/scatter matrices is commonly used to calculate optical properties of thin-films. Many specialized methods exist for their optimization. However, SAX can be useful to cut down on developer time by circumventing the need to manually take gradients of complicated or often-changed objective functions, and by generating efficient code from simple syntax. "
"> Let's optimize a thin film..."
]
},
{
"cell_type": "markdown",
"id": "085ae33c",
"id": "07171d66-a595-4412-b975-681ffb558ab5",
"metadata": {},
"source": [
"## Imports"
"> This notebook was contributed by [simbilod](https://github.com/simbilod)."
]
},
{
Expand All @@ -38,6 +33,22 @@
"from tmm import coh_tmm"
]
},
{
"cell_type": "markdown",
"id": "c09fa16c-05fb-4120-80ae-17d64453fcb1",
"metadata": {},
"source": [
"In this notebook, we apply SAX to thin-film optimization and show how it can be used for wavelength-dependent parameter optimization."
]
},
{
"cell_type": "markdown",
"id": "508b27a5-7fee-409b-b381-988ca07f5b35",
"metadata": {},
"source": [
"The language of transfer/scatter matrices is commonly used to calculate optical properties of thin-films. Many specialized methods exist for their optimization. However, SAX can be useful to cut down on developer time by circumventing the need to manually take gradients of complicated or often-changed objective functions, and by generating efficient code from simple syntax. "
]
},
{
"cell_type": "markdown",
"id": "77e24e88",
Expand Down
12 changes: 2 additions & 10 deletions examples/06_additive_backend.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,15 @@
"id": "6f097557",
"metadata": {},
"source": [
"# Additive Backend: pathlengths and group delays"
"# Additive Backend"
]
},
{
"cell_type": "markdown",
"id": "56868383",
"metadata": {},
"source": [
"Let's go over the core functionality of SAX."
]
},
{
"cell_type": "markdown",
"id": "e0d25c8e",
"metadata": {},
"source": [
"## Imports"
"> The additive backend can be used to obtain pathlengths and group delays."
]
},
{
Expand Down

0 comments on commit 7054005

Please sign in to comment.