-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
474 additions
and
278 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
import inspect | ||
|
||
from cspdk.sin300 import _cells as cells | ||
from cspdk.sin300.config import PATH | ||
|
||
filepath = PATH.repo / "docs" / "cells_sin300.rst" | ||
|
||
skip = {} | ||
|
||
skip_plot: tuple[str, ...] = ("",) | ||
skip_settings: tuple[str, ...] = () | ||
|
||
|
||
with open(filepath, "w+") as f: | ||
f.write( | ||
""" | ||
Cells SiN300 | ||
============================= | ||
""" | ||
) | ||
|
||
for name in sorted(cells.keys()): | ||
if name in skip or name.startswith("_"): | ||
continue | ||
print(name) | ||
sig = inspect.signature(cells[name]) | ||
kwargs = ", ".join( | ||
[ | ||
f"{p}={repr(sig.parameters[p].default)}" | ||
for p in sig.parameters | ||
if isinstance(sig.parameters[p].default, int | float | str | tuple) | ||
and p not in skip_settings | ||
] | ||
) | ||
if name in skip_plot: | ||
f.write( | ||
f""" | ||
{name} | ||
---------------------------------------------------- | ||
.. autofunction:: cspdk.si220.cells.{name} | ||
""" | ||
) | ||
else: | ||
f.write( | ||
f""" | ||
{name} | ||
---------------------------------------------------- | ||
.. autofunction:: cspdk.si220.cells.{name} | ||
.. plot:: | ||
:include-source: | ||
import cspdk | ||
c = cspdk.si220.cells.{name}({kwargs}) | ||
c.plot() | ||
""" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
"""Silicon rib mode solver.""" | ||
|
||
import gplugins.tidy3d as gt | ||
|
||
nm = 1e-3 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
"""Silicon mode solver.""" | ||
|
||
import gplugins.tidy3d as gt | ||
|
||
nm = 1e-3 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
"""Nitride mode solver.""" | ||
|
||
import gplugins.tidy3d as gt | ||
|
||
nm = 1e-3 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.