Skip to content

Commit

Permalink
add thin film notebook to docs
Browse files Browse the repository at this point in the history
  • Loading branch information
flaport committed Feb 3, 2021
1 parent 64e5e2f commit 5d9953c
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 10 deletions.
1 change: 1 addition & 0 deletions docs/source/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ Examples
:maxdepth: 1

examples/01_quick_start.ipynb
examples/02_thinfilm.ipynb
4 changes: 2 additions & 2 deletions examples/01_quick_start.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -838,9 +838,9 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python [conda env:thinfilmjax]",
"display_name": "",
"language": "python",
"name": "conda-env-thinfilmjax-py"
"name": ""
},
"language_info": {
"codemirror_mode": {
Expand Down
11 changes: 4 additions & 7 deletions examples/02_thinfilm.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,13 @@
"import matplotlib.pyplot as plt\n",
"\n",
"# GPU setup\n",
"#%env XLA_FLAGS=--xla_gpu_cuda_data_dir=path/to/cuda\n",
"%env XLA_FLAGS=--xla_gpu_cuda_data_dir=/usr/local/cuda-10.0\n",
"#%env XLA_FLAGS=--xla_gpu_cuda_data_dir=/path/to/cuda\n",
"\n",
"import jax\n",
"import jax.numpy as jnp\n",
"import jax.experimental.optimizers as opt\n",
"\n",
"# sax circuit simulator\n",
"import sys\n",
"sys.path.append(\"..\")\n",
"import sax"
]
},
Expand Down Expand Up @@ -660,7 +657,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Wavelength-dependent Fabry-Pérot étalon\n",
"## Wavelength-dependent Fabry-Pérot étalon\n",
"\n",
"Let's repeat with a model where parameters can be wavelength-dependent. To comply with the optimizer object, we will stack all design parameters in a single array :"
]
Expand Down Expand Up @@ -923,9 +920,9 @@
],
"metadata": {
"kernelspec": {
"display_name": "thinfilmjax",
"display_name": "",
"language": "python",
"name": "thinfilmjax"
"name": ""
},
"language_info": {
"codemirror_mode": {
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ matplotlib
sphinx
nbsphinx
sphinx-rtd-theme
tmm
2 changes: 1 addition & 1 deletion sax/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
""" SAX """

__author__ = "Floris Laporte"
__version__ = "0.0.0"
__version__ = "0.0.1"


from . import core
Expand Down
2 changes: 2 additions & 0 deletions sax/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import pic
from . import thinfilm

0 comments on commit 5d9953c

Please sign in to comment.