Skip to content

Commit

Permalink
Merge pull request gdsfactory#1151 from gdsfactory/622
Browse files Browse the repository at this point in the history
fix mode hashing and change gdslib branch to main

Former-commit-id: 359a53e [formerly bc4f76f]
Former-commit-id: f48fc424de964f4d9e1c4edbe6fbfd0d00bc676a
  • Loading branch information
joamatab committed Jan 15, 2023
2 parents 4899727 + 66bfba3 commit 35cf1e0
Show file tree
Hide file tree
Showing 16 changed files with 226 additions and 186 deletions.
5 changes: 4 additions & 1 deletion Makefile
Expand Up @@ -65,7 +65,7 @@ gds:
python gdsfactory/components/straight.py

gdslib:
git clone https://github.com/gdsfactory/gdslib.git -b data
git clone https://github.com/gdsfactory/gdslib.git -b main

test:
flake8 gdsfactory
Expand Down Expand Up @@ -197,5 +197,8 @@ nbqa:
nbqa autopep8 -i docs/notebooks/*.ipynb
nbqa autopep8 -i docs/notebooks/**/*.ipynb

notebooks:
nbstripout --drop-empty-cells docs/notebooks/*.ipynb


.PHONY: gdsdiff build conda
7 changes: 0 additions & 7 deletions docs/notebooks/plugins/devsim/01_pin_waveguide.ipynb
Expand Up @@ -360,13 +360,6 @@
"plt.ylim(1.72e-6, 2.5e-6)\n",
"plt.title(\"Voltage = -4V\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down
2 changes: 1 addition & 1 deletion docs/notebooks/plugins/eme/01_meow.ipynb
Expand Up @@ -260,7 +260,7 @@
"\n",
"```\n",
"\n",
"![](https://user-images.githubusercontent.com/46427609/209006396-86afc058-a992-49a4-93be-54d98ab822f4.png)"
"![](https://i.imgur.com/70dU6fo.png)"
]
},
{
Expand Down
44 changes: 18 additions & 26 deletions docs/notebooks/plugins/fem/01_mode_solving.ipynb
Expand Up @@ -19,12 +19,10 @@
{
"cell_type": "code",
"execution_count": null,
"id": "7dde51ba",
"id": "490fdb00-c13b-4428-877b-670a0ac3d0b9",
"metadata": {},
"outputs": [],
"source": [
"%%capture\n",
"\n",
"import matplotlib.pyplot as plt\n",
"import gdsfactory as gf\n",
"from tqdm.auto import tqdm\n",
Expand All @@ -35,6 +33,22 @@
"from gdsfactory.cross_section import rib\n",
"from gdsfactory.generic_tech import LAYER_STACK\n",
"\n",
"import sys\n",
"import logging\n",
"from rich.logging import RichHandler\n",
"\n",
"logger = logging.getLogger()\n",
"logger.removeHandler(sys.stderr)\n",
"logging.basicConfig(level=\"WARNING\", datefmt=\"[%X]\", handlers=[RichHandler()])"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "7fd24a1b-7641-4f33-880a-f4027973323d",
"metadata": {},
"outputs": [],
"source": [
"filtered_layerstack = LayerStack(\n",
" layers={\n",
" k: LAYER_STACK.layers[k]\n",
Expand Down Expand Up @@ -100,8 +114,6 @@
"metadata": {},
"outputs": [],
"source": [
"%%capture\n",
"\n",
"fig = mode_solver.plot_mode(\n",
" basis, np.real(xs[0]), plot_vectors=False, colorbar=True, title=\"E\", direction=\"y\"\n",
")"
Expand All @@ -124,17 +136,7 @@
"metadata": {},
"outputs": [],
"source": [
"%%capture\n",
"te_frac = mode_solver.calculate_te_frac(basis, xs[0])"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "7ebb3723-7592-4894-8f52-778c1ce3335b",
"metadata": {},
"outputs": [],
"source": [
"te_frac = mode_solver.calculate_te_frac(basis, xs[0])\n",
"te_frac"
]
},
Expand All @@ -153,8 +155,6 @@
"metadata": {},
"outputs": [],
"source": [
"%%capture\n",
"\n",
"widths = np.linspace(0.2, 2, 20)\n",
"num_modes = 4\n",
"all_lams = np.zeros((widths.shape[0], num_modes))\n",
Expand Down Expand Up @@ -190,14 +190,6 @@
" plt.plot(widths, lams)\n",
" plt.scatter(widths, lams, c=te_fracs, cmap=\"cool\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "cecadd6e",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down
7 changes: 0 additions & 7 deletions docs/notebooks/plugins/meep/001_meep_sparameters.ipynb
Expand Up @@ -1170,13 +1170,6 @@
"\n",
"![optimization](https://user-images.githubusercontent.com/100642027/194617366-97b3e797-1fa4-40ed-8487-a5ac2b679493.png)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down
7 changes: 0 additions & 7 deletions docs/notebooks/plugins/meep/002_gratings.ipynb
Expand Up @@ -148,13 +148,6 @@
"\n",
"TODO"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down
7 changes: 0 additions & 7 deletions docs/notebooks/plugins/meshing/01_intro.ipynb
Expand Up @@ -230,13 +230,6 @@
"plotter.camera_position = \"xy\"\n",
"plotter.show()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down
7 changes: 0 additions & 7 deletions docs/notebooks/plugins/meshing/03_2D_uz_mesh.ipynb
Expand Up @@ -141,13 +141,6 @@
"plotter.camera_position = \"xy\"\n",
"plotter.show()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down
9 changes: 1 addition & 8 deletions docs/notebooks/plugins/mpb/001_mpb_waveguide.ipynb
Expand Up @@ -1051,13 +1051,6 @@
"plt.xlabel(\"waveguide width (um)\")\n",
"plt.ylabel(\"dn/dT (%)\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand All @@ -1076,7 +1069,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.5"
"version": "3.10.6"
}
},
"nbformat": 4,
Expand Down
8 changes: 0 additions & 8 deletions docs/notebooks/plugins/sax/sax.ipynb
Expand Up @@ -1980,14 +1980,6 @@
"plt.legend()\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "6ba30561-3982-4a8a-8411-1ec08fc78cbe",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down
7 changes: 0 additions & 7 deletions docs/notebooks/plugins/tcad/02_srim.ipynb
Expand Up @@ -265,13 +265,6 @@
"pprint.pprint(f\"Implant skew: {implant_skew}\")\n",
"pprint.pprint(f\"Implant kurtosis: {implant_kurtosis}\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down
7 changes: 0 additions & 7 deletions docs/notebooks/plugins/thermal/thermal.ipynb
Expand Up @@ -87,13 +87,6 @@
"source": [
"![time](https://i.imgur.com/uaR6klM.png)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down
8 changes: 0 additions & 8 deletions docs/notebooks/plugins/tidy3d/00_tidy3d.ipynb
Expand Up @@ -815,14 +815,6 @@
"plt.title(\"transmission vs xoffset\")\n",
"plt.legend()"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "8d9ec06a-190a-4186-bdb7-581dac9ab4f5",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down

0 comments on commit 35cf1e0

Please sign in to comment.