Skip to content

Commit

Permalink
Merge pull request #42 from flaport/40-documentation-suggestions
Browse files Browse the repository at this point in the history
DOC: Documentation additions + nbstripout
  • Loading branch information
flaport authored Oct 21, 2024
2 parents 53531cc + d4e6b7c commit 0d17126
Showing 1 changed file with 27 additions and 29 deletions.
56 changes: 27 additions & 29 deletions examples/00_introduction.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
"id": "dd643a5d-d081-48d7-a8ed-2c4b80faa122",
"id": "0",
"metadata": {
"papermill": {
"duration": 0.011108,
Expand All @@ -22,7 +22,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "4859f69dd76d8b17",
"id": "1",
"metadata": {
"papermill": {
"duration": 6.398944,
Expand All @@ -45,7 +45,7 @@
},
{
"cell_type": "markdown",
"id": "2d28a1cd-a5db-4e58-b141-c6a20a0a5657",
"id": "2",
"metadata": {
"papermill": {
"duration": 0.004485,
Expand All @@ -66,7 +66,7 @@
},
{
"cell_type": "markdown",
"id": "e563a59a-6494-431b-b124-6c1804a6c7cb",
"id": "3",
"metadata": {
"papermill": {
"duration": 0.00443,
Expand All @@ -83,7 +83,7 @@
},
{
"cell_type": "markdown",
"id": "18f7b08a-7303-4454-a31c-1fea3d7c42af",
"id": "4",
"metadata": {
"papermill": {
"duration": 0.004589,
Expand All @@ -106,7 +106,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "873fae6e-3435-4a89-8f3f-06a33a8755ed",
"id": "5",
"metadata": {
"papermill": {
"duration": 0.380012,
Expand Down Expand Up @@ -151,7 +151,7 @@
},
{
"cell_type": "markdown",
"id": "ec547819-c3c3-42ac-9cb4-33c183680bf2",
"id": "6",
"metadata": {
"papermill": {
"duration": 0.059906,
Expand All @@ -170,7 +170,7 @@
},
{
"cell_type": "markdown",
"id": "5e7eee72-2ab4-498f-bd0b-3b80feba483e",
"id": "7",
"metadata": {
"papermill": {
"duration": 0.069542,
Expand All @@ -190,7 +190,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "50df56f0-ce78-41f5-a854-8d1cfa486392",
"id": "8",
"metadata": {
"papermill": {
"duration": 0.075818,
Expand Down Expand Up @@ -221,7 +221,7 @@
},
{
"cell_type": "markdown",
"id": "53b6f32e-e2ae-491d-bfee-3db2616e6063",
"id": "9",
"metadata": {
"papermill": {
"duration": 0.078736,
Expand All @@ -239,7 +239,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "51f21eed-1004-4b27-b471-d5d3b3232359",
"id": "10",
"metadata": {
"papermill": {
"duration": 1.31571,
Expand All @@ -257,7 +257,7 @@
},
{
"cell_type": "markdown",
"id": "ee4e586c-bc2d-427f-a95e-83cc7b0af5e2",
"id": "11",
"metadata": {
"papermill": {
"duration": 0.101113,
Expand All @@ -278,7 +278,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "a88e01ae-06c4-43d9-8c2e-dfe2ee4e0d91",
"id": "12",
"metadata": {
"papermill": {
"duration": 2.239601,
Expand All @@ -298,7 +298,7 @@
},
{
"cell_type": "markdown",
"id": "08c90cb2-e6f5-4251-8e05-c927be29fd29",
"id": "13",
"metadata": {
"papermill": {
"duration": 0.148495,
Expand All @@ -317,7 +317,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "47e444c0-987e-4601-a8cd-c3cdeb8e0824",
"id": "14",
"metadata": {
"papermill": {
"duration": 78.778884,
Expand All @@ -341,7 +341,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "98bd86d4-fb46-4b2c-be39-0fcd6f5d8cce",
"id": "15",
"metadata": {
"papermill": {
"duration": 1.668541,
Expand All @@ -354,15 +354,17 @@
},
"outputs": [],
"source": [
"# show Hx component of the second mode (idx 1)\n",
"# show Ex component of the first mode (idx 0)\n",
"# of the first cell (idx 0):\n",
"mw.visualize(modes[0][0], fields=[\"Ex\"])\n",
"mw.visualize(modes[-1][0], fields=[\"Ex\"])"
"# show Hx component of the second mode (idx 1)\n",
"# of the first cell (idx 0):\n",
"mw.visualize(modes[0][1], fields=[\"Hx\"])"
]
},
{
"cell_type": "markdown",
"id": "a08e7375-3fe5-4f86-a7bc-260add35dac4",
"id": "16",
"metadata": {
"papermill": {
"duration": 0.038594,
Expand All @@ -381,7 +383,7 @@
},
{
"cell_type": "markdown",
"id": "7abc9801-fc8b-43ef-b7ba-4328957d4370",
"id": "17",
"metadata": {
"papermill": {
"duration": 0.045521,
Expand All @@ -395,13 +397,14 @@
"source": [
"### 5. Calculate S-matrix (EME)\n",
"\n",
"The S-matrix of a collection of modes can now easily be calculated with {func}`~.meow.eme.tidy3d.compute_s_matrix`. This step uses the [sax](https://github.com/flaport/sax) circuit solver under the hood."
"The S-matrix of a collection of modes can now easily be calculated with {func}`~.meow.eme.tidy3d.compute_s_matrix`. This step uses the [sax](https://github.com/flaport/sax) circuit solver under the hood.\n",
"The resulting S-matrix has is formated such that `S[0][0]` is the complex reflection coefficient from the fundamental mode into the backwards propagating fundamental mode. `S[num_modes][0]` is the transmission from the fundamental mode into the fundamental mode, following the pattern `S[<to_port>][<from_port>]`. The mapping from ports to indices is provided in `port_map`."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "8600e5a7-5e34-4b5c-abf5-737cd01734dc",
"id": "18",
"metadata": {
"papermill": {
"duration": 7.31733,
Expand All @@ -422,7 +425,7 @@
},
{
"cell_type": "markdown",
"id": "afff8c93-5a21-46bf-b5e6-8b5530b75523",
"id": "19",
"metadata": {
"papermill": {
"duration": 0.112775,
Expand All @@ -440,7 +443,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"display_name": "phd",
"language": "python",
"name": "python3"
},
Expand All @@ -467,11 +470,6 @@
"parameters": {},
"start_time": "2024-06-14T09:06:40.872137",
"version": "2.3.4"
},
"vscode": {
"interpreter": {
"hash": "0dd118673efdbefb7257b2235dc4c000959f664fa5386b3652213e4a49c44469"
}
}
},
"nbformat": 4,
Expand Down

0 comments on commit 0d17126

Please sign in to comment.