prefab 1.1.2__tar.gz → 1.1.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {prefab-1.1.2 → prefab-1.1.3}/.github/workflows/docs-deploy.yml +5 -4
- {prefab-1.1.2 → prefab-1.1.3}/PKG-INFO +1 -1
- {prefab-1.1.2 → prefab-1.1.3/docs}/CHANGELOG.md +10 -35
- prefab-1.1.3/docs/assets/logo-white.png +0 -0
- prefab-1.1.3/docs/blog/.authors.yml +6 -0
- prefab-1.1.3/docs/blog/index.md +2 -0
- prefab-1.1.3/docs/blog/posts/prefab-v1.1.0.md +273 -0
- prefab-1.1.3/docs/blog/posts/prefab-v1.1.0_files/prefab-v1.1.0_11_1.png +0 -0
- prefab-1.1.3/docs/blog/posts/prefab-v1.1.0_files/prefab-v1.1.0_11_2.png +0 -0
- prefab-1.1.3/docs/blog/posts/prefab-v1.1.0_files/prefab-v1.1.0_13_2.png +0 -0
- prefab-1.1.3/docs/blog/posts/prefab-v1.1.0_files/prefab-v1.1.0_13_3.png +0 -0
- prefab-1.1.3/docs/blog/posts/prefab-v1.1.0_files/prefab-v1.1.0_13_4.png +0 -0
- prefab-1.1.3/docs/blog/posts/prefab-v1.1.0_files/prefab-v1.1.0_3_1.png +0 -0
- prefab-1.1.3/docs/blog/posts/prefab-v1.1.0_files/prefab-v1.1.0_3_2.png +0 -0
- prefab-1.1.3/docs/blog/posts/prefab-v1.1.0_files/prefab-v1.1.0_3_3.png +0 -0
- prefab-1.1.3/docs/blog/posts/prefab-v1.1.0_files/prefab-v1.1.0_7_2.png +0 -0
- prefab-1.1.3/docs/blog/posts/prefab-v1.1.0_files/prefab-v1.1.0_7_3.png +0 -0
- prefab-1.1.3/docs/blog/posts/prefab-v1.1.0_files/prefab-v1.1.0_7_4.png +0 -0
- prefab-1.1.3/docs/blog/posts/prefab-v1.1.0_files/prefab-v1.1.0_9_2.png +0 -0
- {prefab-1.1.2/docs/blog → prefab-1.1.3/docs/blog/posts}/python-for-photonics.md +8 -1
- prefab-1.1.2/docs/blog/PreFab-v1.1.0.ipynb → prefab-1.1.3/docs/blog/prefab-v1.1.0.ipynb +1 -1
- {prefab-1.1.2 → prefab-1.1.3}/docs/index.md +1 -1
- prefab-1.1.3/docs/overrides/main.html +19 -0
- {prefab-1.1.2 → prefab-1.1.3}/mkdocs.yml +23 -14
- {prefab-1.1.2 → prefab-1.1.3}/prefab/__init__.py +3 -2
- {prefab-1.1.2 → prefab-1.1.3}/prefab/device.py +34 -166
- {prefab-1.1.2 → prefab-1.1.3}/prefab/models.py +1 -1
- prefab-1.1.3/prefab/predict.py +260 -0
- {prefab-1.1.2 → prefab-1.1.3}/pyproject.toml +1 -1
- {prefab-1.1.2 → prefab-1.1.3}/.gitattributes +0 -0
- {prefab-1.1.2 → prefab-1.1.3}/.github/workflows/python-publish.yml +0 -0
- {prefab-1.1.2 → prefab-1.1.3}/.gitignore +0 -0
- {prefab-1.1.2 → prefab-1.1.3}/LICENSE +0 -0
- {prefab-1.1.2 → prefab-1.1.3}/README.md +0 -0
- {prefab-1.1.2 → prefab-1.1.3}/docs/CNAME +0 -0
- {prefab-1.1.2 → prefab-1.1.3}/docs/assets/blog-cards/python-for-photonics.png +0 -0
- {prefab-1.1.2 → prefab-1.1.3}/docs/assets/favicon.ico +0 -0
- {prefab-1.1.2 → prefab-1.1.3}/docs/assets/logo.png +0 -0
- {prefab-1.1.2 → prefab-1.1.3}/docs/assets/prefab_logo_white.svg +0 -0
- {prefab-1.1.2 → prefab-1.1.3}/docs/assets/promo_c.png +0 -0
- {prefab-1.1.2 → prefab-1.1.3}/docs/assets/promo_p.png +0 -0
- {prefab-1.1.2 → prefab-1.1.3}/docs/examples/1_prediction.ipynb +0 -0
- {prefab-1.1.2 → prefab-1.1.3}/docs/examples/2_correction.ipynb +0 -0
- {prefab-1.1.2 → prefab-1.1.3}/docs/examples/3_sidewall_angle.ipynb +0 -0
- {prefab-1.1.2 → prefab-1.1.3}/docs/examples/4_SEM_generation.ipynb +0 -0
- {prefab-1.1.2 → prefab-1.1.3}/docs/models.md +0 -0
- {prefab-1.1.2 → prefab-1.1.3}/docs/reference/compare.md +0 -0
- {prefab-1.1.2 → prefab-1.1.3}/docs/reference/device.md +0 -0
- {prefab-1.1.2 → prefab-1.1.3}/docs/reference/geometry.md +0 -0
- {prefab-1.1.2 → prefab-1.1.3}/docs/reference/models.md +0 -0
- {prefab-1.1.2 → prefab-1.1.3}/docs/reference/read.md +0 -0
- {prefab-1.1.2 → prefab-1.1.3}/docs/reference/shapes.md +0 -0
- {prefab-1.1.2 → prefab-1.1.3}/prefab/__main__.py +0 -0
- {prefab-1.1.2 → prefab-1.1.3}/prefab/compare.py +0 -0
- {prefab-1.1.2 → prefab-1.1.3}/prefab/geometry.py +0 -0
- {prefab-1.1.2 → prefab-1.1.3}/prefab/read.py +0 -0
- {prefab-1.1.2 → prefab-1.1.3}/prefab/shapes.py +0 -0
- {prefab-1.1.2 → prefab-1.1.3}/site/404.html +0 -0
- {prefab-1.1.2 → prefab-1.1.3}/site/assets/_mkdocstrings.css +0 -0
- {prefab-1.1.2 → prefab-1.1.3}/site/assets/favicon.ico +0 -0
- {prefab-1.1.2 → prefab-1.1.3}/site/assets/images/favicon.png +0 -0
- {prefab-1.1.2 → prefab-1.1.3}/site/assets/javascripts/bundle.a7c05c9e.min.js +0 -0
- {prefab-1.1.2 → prefab-1.1.3}/site/assets/javascripts/bundle.a7c05c9e.min.js.map +0 -0
- {prefab-1.1.2 → prefab-1.1.3}/site/assets/javascripts/lunr/min/lunr.ar.min.js +0 -0
- {prefab-1.1.2 → prefab-1.1.3}/site/assets/javascripts/lunr/min/lunr.da.min.js +0 -0
- {prefab-1.1.2 → prefab-1.1.3}/site/assets/javascripts/lunr/min/lunr.de.min.js +0 -0
- {prefab-1.1.2 → prefab-1.1.3}/site/assets/javascripts/lunr/min/lunr.du.min.js +0 -0
- {prefab-1.1.2 → prefab-1.1.3}/site/assets/javascripts/lunr/min/lunr.el.min.js +0 -0
- {prefab-1.1.2 → prefab-1.1.3}/site/assets/javascripts/lunr/min/lunr.es.min.js +0 -0
- {prefab-1.1.2 → prefab-1.1.3}/site/assets/javascripts/lunr/min/lunr.fi.min.js +0 -0
- {prefab-1.1.2 → prefab-1.1.3}/site/assets/javascripts/lunr/min/lunr.fr.min.js +0 -0
- {prefab-1.1.2 → prefab-1.1.3}/site/assets/javascripts/lunr/min/lunr.he.min.js +0 -0
- {prefab-1.1.2 → prefab-1.1.3}/site/assets/javascripts/lunr/min/lunr.hi.min.js +0 -0
- {prefab-1.1.2 → prefab-1.1.3}/site/assets/javascripts/lunr/min/lunr.hu.min.js +0 -0
- {prefab-1.1.2 → prefab-1.1.3}/site/assets/javascripts/lunr/min/lunr.hy.min.js +0 -0
- {prefab-1.1.2 → prefab-1.1.3}/site/assets/javascripts/lunr/min/lunr.it.min.js +0 -0
- {prefab-1.1.2 → prefab-1.1.3}/site/assets/javascripts/lunr/min/lunr.ja.min.js +0 -0
- {prefab-1.1.2 → prefab-1.1.3}/site/assets/javascripts/lunr/min/lunr.jp.min.js +0 -0
- {prefab-1.1.2 → prefab-1.1.3}/site/assets/javascripts/lunr/min/lunr.kn.min.js +0 -0
- {prefab-1.1.2 → prefab-1.1.3}/site/assets/javascripts/lunr/min/lunr.ko.min.js +0 -0
- {prefab-1.1.2 → prefab-1.1.3}/site/assets/javascripts/lunr/min/lunr.multi.min.js +0 -0
- {prefab-1.1.2 → prefab-1.1.3}/site/assets/javascripts/lunr/min/lunr.nl.min.js +0 -0
- {prefab-1.1.2 → prefab-1.1.3}/site/assets/javascripts/lunr/min/lunr.no.min.js +0 -0
- {prefab-1.1.2 → prefab-1.1.3}/site/assets/javascripts/lunr/min/lunr.pt.min.js +0 -0
- {prefab-1.1.2 → prefab-1.1.3}/site/assets/javascripts/lunr/min/lunr.ro.min.js +0 -0
- {prefab-1.1.2 → prefab-1.1.3}/site/assets/javascripts/lunr/min/lunr.ru.min.js +0 -0
- {prefab-1.1.2 → prefab-1.1.3}/site/assets/javascripts/lunr/min/lunr.sa.min.js +0 -0
- {prefab-1.1.2 → prefab-1.1.3}/site/assets/javascripts/lunr/min/lunr.stemmer.support.min.js +0 -0
- {prefab-1.1.2 → prefab-1.1.3}/site/assets/javascripts/lunr/min/lunr.sv.min.js +0 -0
- {prefab-1.1.2 → prefab-1.1.3}/site/assets/javascripts/lunr/min/lunr.ta.min.js +0 -0
- {prefab-1.1.2 → prefab-1.1.3}/site/assets/javascripts/lunr/min/lunr.te.min.js +0 -0
- {prefab-1.1.2 → prefab-1.1.3}/site/assets/javascripts/lunr/min/lunr.th.min.js +0 -0
- {prefab-1.1.2 → prefab-1.1.3}/site/assets/javascripts/lunr/min/lunr.tr.min.js +0 -0
- {prefab-1.1.2 → prefab-1.1.3}/site/assets/javascripts/lunr/min/lunr.vi.min.js +0 -0
- {prefab-1.1.2 → prefab-1.1.3}/site/assets/javascripts/lunr/min/lunr.zh.min.js +0 -0
- {prefab-1.1.2 → prefab-1.1.3}/site/assets/javascripts/lunr/tinyseg.js +0 -0
- {prefab-1.1.2 → prefab-1.1.3}/site/assets/javascripts/lunr/wordcut.js +0 -0
- {prefab-1.1.2 → prefab-1.1.3}/site/assets/javascripts/workers/search.b8dbb3d2.min.js +0 -0
- {prefab-1.1.2 → prefab-1.1.3}/site/assets/javascripts/workers/search.b8dbb3d2.min.js.map +0 -0
- {prefab-1.1.2 → prefab-1.1.3}/site/assets/logo.png +0 -0
- {prefab-1.1.2 → prefab-1.1.3}/site/assets/logo_neue.svg +0 -0
- {prefab-1.1.2 → prefab-1.1.3}/site/assets/promo_c.png +0 -0
- {prefab-1.1.2 → prefab-1.1.3}/site/assets/promo_p.png +0 -0
- {prefab-1.1.2 → prefab-1.1.3}/site/assets/stylesheets/main.66ac8b77.min.css +0 -0
- {prefab-1.1.2 → prefab-1.1.3}/site/assets/stylesheets/main.66ac8b77.min.css.map +0 -0
- {prefab-1.1.2 → prefab-1.1.3}/site/assets/stylesheets/palette.06af60db.min.css +0 -0
- {prefab-1.1.2 → prefab-1.1.3}/site/assets/stylesheets/palette.06af60db.min.css.map +0 -0
- {prefab-1.1.2 → prefab-1.1.3}/site/css/ansi-colours.css +0 -0
- {prefab-1.1.2 → prefab-1.1.3}/site/css/jupyter-cells.css +0 -0
- {prefab-1.1.2 → prefab-1.1.3}/site/css/pandas-dataframe.css +0 -0
- {prefab-1.1.2 → prefab-1.1.3}/site/examples/1_prediction/index.html +0 -0
- {prefab-1.1.2 → prefab-1.1.3}/site/examples/2_correction/index.html +0 -0
- {prefab-1.1.2 → prefab-1.1.3}/site/index.html +0 -0
- {prefab-1.1.2 → prefab-1.1.3}/site/models/index.html +0 -0
- {prefab-1.1.2 → prefab-1.1.3}/site/objects.inv +0 -0
- {prefab-1.1.2 → prefab-1.1.3}/site/reference/compare/index.html +0 -0
- {prefab-1.1.2 → prefab-1.1.3}/site/reference/device/index.html +0 -0
- {prefab-1.1.2 → prefab-1.1.3}/site/reference/geometry/index.html +0 -0
- {prefab-1.1.2 → prefab-1.1.3}/site/reference/models/index.html +0 -0
- {prefab-1.1.2 → prefab-1.1.3}/site/reference/read/index.html +0 -0
- {prefab-1.1.2 → prefab-1.1.3}/site/search/search_index.json +0 -0
- {prefab-1.1.2 → prefab-1.1.3}/site/sitemap.xml +0 -0
- {prefab-1.1.2 → prefab-1.1.3}/site/sitemap.xml.gz +0 -0
|
@@ -18,17 +18,18 @@ jobs:
|
|
|
18
18
|
- uses: actions/setup-python@v5
|
|
19
19
|
with:
|
|
20
20
|
python-version: 3.x
|
|
21
|
-
-
|
|
21
|
+
- id: get_cache_id
|
|
22
|
+
run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_OUTPUT
|
|
22
23
|
- uses: actions/cache@v4
|
|
23
24
|
with:
|
|
24
|
-
key: mkdocs-material-${{
|
|
25
|
+
key: mkdocs-material-${{ steps.get_cache_id.outputs.cache_id }}
|
|
25
26
|
path: .cache
|
|
26
27
|
restore-keys: |
|
|
27
28
|
mkdocs-material-
|
|
28
29
|
- run: pip install mkdocs
|
|
29
|
-
- run: pip install mkdocs-material
|
|
30
|
+
- run: pip install mkdocs-material
|
|
30
31
|
- run: pip install mkdocstrings[python]
|
|
31
|
-
- run: pip install
|
|
32
|
+
- run: pip install mkdocs-jupyter
|
|
32
33
|
- name: Create CNAME file
|
|
33
34
|
run: echo "docs.prefabphotonics.com" > docs/CNAME
|
|
34
35
|
- run: mkdocs gh-deploy --force
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: prefab
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.3
|
|
4
4
|
Summary: Artificial nanofabrication of integrated photonic circuits using deep learning
|
|
5
5
|
Project-URL: Homepage, https://prefabphotonics.com
|
|
6
6
|
Project-URL: Repository, https://github.com/PreFab-Photonics/PreFab
|
|
@@ -1,62 +1,43 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## 1.1.
|
|
3
|
+
## [1.1.3](https://github.com/PreFab-Photonics/PreFab/releases/tag/v1.1.3) - 2024-10-26
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
- Moved prediction logic to `prefab.predict` module.
|
|
6
|
+
- First version of `predict.predict_array_with_grad`, which returns both the predicted array and its gradient. This is useful to fabrication-aware inverse design (FAID). More to come.
|
|
7
|
+
- Added `origin` parameter to GDS-related export methods.
|
|
8
|
+
- Small docstring fixes.
|
|
9
|
+
|
|
10
|
+
## [1.1.2](https://github.com/PreFab-Photonics/PreFab/releases/tag/v1.1.2) - 2024-10-10
|
|
6
11
|
|
|
7
12
|
- User warning if `compare.intersection_over_union`, `compare.hamming_distance`, or `compare.dice_coefficient` are called with non-binarized devices.
|
|
8
13
|
- Added `height` parameter to many shape constructors in `prefab.shapes` to give more flexibility.
|
|
9
|
-
|
|
10
|
-
### Changed
|
|
11
|
-
|
|
12
14
|
- Updates to the `README.md` to keep current.
|
|
13
15
|
- `Device.is_binary` is now a property.
|
|
14
16
|
- Moved `Device.enforce_feature_size` logic to `prefab.geometry` module.
|
|
15
|
-
|
|
16
|
-
### Fixed
|
|
17
|
-
|
|
18
17
|
- Added required version of `gdstk` to `pyproject.toml`.
|
|
19
18
|
- Removed leftover return statement in `geometry.rotate`.
|
|
20
19
|
|
|
21
|
-
## 1.1.1 - 2024-09-24
|
|
22
|
-
|
|
23
|
-
### Changed
|
|
20
|
+
## [1.1.1](https://github.com/PreFab-Photonics/PreFab/releases/tag/v1.1.1) - 2024-09-24
|
|
24
21
|
|
|
25
22
|
- Manually adding small random noise to the semulated images to better match the real data. This is ideally included in the model training, but for now this is a quick fix.
|
|
26
23
|
- Added z-padding to the device array before exporting to STL with `Device.to_stl` to ensure that the exported device is closed.
|
|
27
|
-
|
|
28
|
-
### Fixed
|
|
29
|
-
|
|
30
24
|
- Removed buffer from `Device.device_array` before exporting to with `Device.to_gdsfactory`.
|
|
31
|
-
|
|
32
|
-
### Added
|
|
33
|
-
|
|
34
25
|
- The additions from `1.0.3` and `1.0.4` releases, which should be considered part of this release. Release planning a work in progress.
|
|
35
26
|
- Import and export from/to Tidy3D simulations with `Device.to_tidy3d` and `read.from_tidy3d`.
|
|
36
27
|
- Import and export from/to gdsfactory components with `Device.to_gdsfactory` and `read.from_gdsfactory`.
|
|
37
28
|
- Convert 2D device structures into 3D arrays or STL files with `Device.to_3d` and `Device.to_stl`. This is useful for simulating processes with angled sidewalls.
|
|
38
29
|
- Check and visualize the effect of enforcing a minimum feature size on the device geometry with `Device.check_feature_size` and `Device.enforce_feature_size`.
|
|
39
30
|
|
|
40
|
-
## 1.0.4 - 2024-09-19
|
|
41
|
-
|
|
42
|
-
### Added
|
|
31
|
+
## [1.0.4](https://github.com/PreFab-Photonics/PreFab/releases/tag/v1.0.4) - 2024-09-19
|
|
43
32
|
|
|
44
33
|
- Option to specify GPU or CPU in `predict`, `correct`, and `semulate` functions. GPU option has more overhead and will take longer for small devices, but will be faster for larger devices.
|
|
45
|
-
|
|
46
|
-
### Changed
|
|
47
|
-
|
|
48
34
|
- Improve clarity of messaging for authentication errors.
|
|
49
35
|
|
|
50
|
-
## 1.0.3 - 2024-09-14
|
|
51
|
-
|
|
52
|
-
### Added
|
|
36
|
+
## [1.0.3](https://github.com/PreFab-Photonics/PreFab/releases/tag/v1.0.3) - 2024-09-14
|
|
53
37
|
|
|
54
38
|
- Added this `CHANGELOG.md` file.
|
|
55
39
|
- Added `prefab.shapes` module to replace the now removed `devices` directory. This module contains helpful device constructors for testing PreFab models on.
|
|
56
40
|
- Added `__version__` class attribute to `prefab` package.
|
|
57
|
-
|
|
58
|
-
### Changed
|
|
59
|
-
|
|
60
41
|
- Added `ANT_NanoSOI_ANF1-d8` and `ANT_NanoSOI_ANF1-d10` models (see `prefab.models` and `docs/models.md`).
|
|
61
42
|
- Updated notebook examples to use `prefab.shapes` module and newest models.
|
|
62
43
|
- Updated dependencies in `pyproject.toml`.
|
|
@@ -64,13 +45,7 @@
|
|
|
64
45
|
- Docstring improvements to `prefab.compare` module.
|
|
65
46
|
- Ability to specify thickness to all four sides of buffer thickness in `prefab.device.BufferSpec`.
|
|
66
47
|
- Changed some of the array resizing logic in `prefab.read` module to be more robust.
|
|
67
|
-
|
|
68
|
-
### Fixed
|
|
69
|
-
|
|
70
48
|
- Minor fixes to `prefab.device` module.
|
|
71
49
|
- Minor fixes to `prefab.geometry` module.
|
|
72
|
-
|
|
73
|
-
### Removed
|
|
74
|
-
|
|
75
50
|
- Removed `devices` directory from the repository. Effectively replaced with `prefab.shapes` module.
|
|
76
51
|
- Remove `requirements.txt` file as `pyproject.toml` contains all dependencies.
|
|
Binary file
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
authors:
|
|
2
|
+
dusan:
|
|
3
|
+
name: Dusan Gostimirovic
|
|
4
|
+
description: Founder
|
|
5
|
+
avatar: https://media.licdn.com/dms/image/v2/C4E03AQGWxb8cTGgvjg/profile-displayphoto-shrink_400_400/profile-displayphoto-shrink_400_400/0/1516680366321?e=1734566400&v=beta&t=h0PjBVxodvAKFt-MpKUNZOkXG6t-Tvn4HAdHwNoAWQY
|
|
6
|
+
url: https://www.linkedin.com/in/dusangostimirovic/
|
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
---
|
|
2
|
+
date: 2024-09-23
|
|
3
|
+
authors: [dusan]
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# PreFab v1.1.0
|
|
7
|
+
|
|
8
|
+
[PreFab v1.1.0](https://github.com/PreFab-Photonics/PreFab) is now available! Install it via [PyPI](https://pypi.org/project/prefab/) with the following command:
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
pip install --upgrade prefab
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
**PreFab is a Python library designed to predict and correct nanofabrication variations in integrated photonic devices using advanced computer vision models.** It helps enhance fabrication awareness and boosts efficiency in the design, fabrication, and testing of photonic circuits.
|
|
15
|
+
|
|
16
|
+
<!-- more -->
|
|
17
|
+
|
|
18
|
+
## What's new with us
|
|
19
|
+
|
|
20
|
+
PreFab is a new startup originating from [McGill University](https://www.mcgill.ca/) in Montreal, Canada. As we continue to grow, we are eager to learn about your needs and how we can enhance our platform. Our team is small, so we appreciate your patience as we work on these improvements. Reach out to us at [hi@prefabphotonics.com](mailto:hi@prefabphotonics.com) to work together.
|
|
21
|
+
|
|
22
|
+
- **We have launched a new LinkedIn page** [here](https://www.linkedin.com/company/prefab-photonics/) where we will announce new features and updates. Follow us to stay informed.
|
|
23
|
+
|
|
24
|
+
- **We've updated our logo** to be less busy while retaining its original charm and essence. We hope you like the new design!
|
|
25
|
+
|
|
26
|
+

|
|
27
|
+
|
|
28
|
+
## Features
|
|
29
|
+
|
|
30
|
+
This release brings a host of new features and enhancements to elevate your experience with PreFab. While our core functionality of predicting and correcting nanofabrication variations remains unchanged, we've added several valuable tools for working with nanostructure geometries.
|
|
31
|
+
|
|
32
|
+
### Shapes
|
|
33
|
+
|
|
34
|
+
While `read.from_gds` is used to import your GDS cells, the new `shapes` module allows you to create basic nanostructure devices directly. This feature is not only beneficial for our internal testing but also provides a convenient way for you to test PreFab models on simple geometries. Below are some examples.
|
|
35
|
+
|
|
36
|
+
```python
|
|
37
|
+
import prefab as pf
|
|
38
|
+
|
|
39
|
+
target = pf.shapes.target(width=500, arm_width=60)
|
|
40
|
+
target.plot()
|
|
41
|
+
|
|
42
|
+
grating = pf.shapes.grating(height=500, pitch=120, duty_cycle=0.5, num_gratings=10)
|
|
43
|
+
grating.plot()
|
|
44
|
+
|
|
45
|
+
radial_grating = pf.shapes.radial_grating(width=500, num_gratings=10)
|
|
46
|
+
radial_grating.plot()
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
<Axes: xlabel='x (nm)', ylabel='y (nm)'>
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+

|
|
56
|
+
|
|
57
|
+

|
|
58
|
+
|
|
59
|
+

|
|
60
|
+
|
|
61
|
+
### GPU acceleration
|
|
62
|
+
|
|
63
|
+
We've introduced GPU acceleration to the backend of PreFab by specifying `gpu=True` in `Device.predict` and `Device.correct`. This enhancement should speed up predictions for larger devices. As PreFab is a free service, CPU inference remains the default to keep the service readily available ("hot") for users. For now, the GPU will be in a "cold" state, requiring additional time to start up. Consequently, the first GPU prediction will be slower due to this overhead. We kindly ask that you use the GPU feature modestly (scouts' honor).
|
|
64
|
+
|
|
65
|
+
```python
|
|
66
|
+
import time
|
|
67
|
+
|
|
68
|
+
import prefab as pf
|
|
69
|
+
|
|
70
|
+
grating = pf.shapes.grating(height=500, pitch=120, duty_cycle=0.5, num_gratings=200)
|
|
71
|
+
|
|
72
|
+
# Timing the CPU correction
|
|
73
|
+
start_time = time.time()
|
|
74
|
+
grating_c_cpu = grating.correct(model=pf.models["ANT_NanoSOI_ANF1_d10"], gpu=False)
|
|
75
|
+
cpu_duration = time.time() - start_time
|
|
76
|
+
print(f"CPU correction time: {cpu_duration:.2f} seconds")
|
|
77
|
+
|
|
78
|
+
# Timing the first GPU correction (cold start)
|
|
79
|
+
start_time = time.time()
|
|
80
|
+
grating_c_gpu = grating.correct(model=pf.models["ANT_NanoSOI_ANF1_d10"], gpu=True)
|
|
81
|
+
gpu_duration = time.time() - start_time
|
|
82
|
+
print(f"Cold GPU correction time: {gpu_duration:.2f} seconds")
|
|
83
|
+
|
|
84
|
+
# Timing the second GPU correction (hot start)
|
|
85
|
+
start_time = time.time()
|
|
86
|
+
grating_c_gpu2 = grating.correct(model=pf.models["ANT_NanoSOI_ANF1_d10"], gpu=True)
|
|
87
|
+
gpu_duration2 = time.time() - start_time
|
|
88
|
+
print(f"Hot GPU correction time: {gpu_duration2:.2f} seconds")
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Correction: 100%|[32m██████████████████████████████[0m| 100/100 [00:17<00:00, 5.75%/s][32m[0m
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
CPU correction time: 17.68 seconds
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
Correction: 100%|[32m██████████████████████████████[0m| 100/100 [00:08<00:00, 12.39%/s][32m[0m
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
Cold GPU correction time: 27.42 seconds
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
Correction: 100%|[32m██████████████████████████████[0m| 100/100 [00:02<00:00, 44.18%/s][32m[0m
|
|
104
|
+
|
|
105
|
+
Hot GPU correction time: 2.47 seconds
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
### Minimum feature size
|
|
111
|
+
|
|
112
|
+
We've added tools to check and enforce minimum feature sizes of devices you are working with. The `Device.check_feature_size` and `Device.enforce_feature_size` methods help ensure your designs meet sizing requirements. While these tools are not full design rule checking (DRC) solutions, we believe they can be useful early in the design process.
|
|
113
|
+
|
|
114
|
+
```python
|
|
115
|
+
import prefab as pf
|
|
116
|
+
|
|
117
|
+
star = pf.shapes.star(width=500, num_points=4)
|
|
118
|
+
star.plot()
|
|
119
|
+
|
|
120
|
+
star.check_feature_size(min_feature_size=30, strel="disk")
|
|
121
|
+
star_e = star.enforce_feature_size(min_feature_size=30, strel="disk")
|
|
122
|
+
star_e.plot()
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
Feature size check with minimum size 30 using 'disk' structuring element resulted in a Hamming distance of: 702
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
<Axes: xlabel='x (nm)', ylabel='y (nm)'>
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+

|
|
138
|
+
|
|
139
|
+

|
|
140
|
+
|
|
141
|
+

|
|
142
|
+
|
|
143
|
+
### 3D structures
|
|
144
|
+
|
|
145
|
+
We have introduced the `Device.to_3d` and `Device.to_stl` methods to convert your 2D device structures into 3D arrays or STL files. These features are particularly useful for simulating processes with angled sidewalls. For more details on working with angled sidewalls, refer to this [notebook](../../examples/3_sidewall_angle.ipynb).
|
|
146
|
+
|
|
147
|
+
The `Device.plot` method displays the upper and lower edges of the sidewall-angled device structure. These two new methods use the edges as boundaries for the 3D extrusion.
|
|
148
|
+
|
|
149
|
+
```python
|
|
150
|
+
import prefab as pf
|
|
151
|
+
|
|
152
|
+
target = pf.shapes.target(width=1000, arm_width=200)
|
|
153
|
+
target_p = target.predict(model=pf.models["ANT_SiN_ANF1_d1"], binarize=True)
|
|
154
|
+
target_p.plot()
|
|
155
|
+
|
|
156
|
+
target_p_3d = target_p.to_3d(thickness_nm=400) # visualizer to come soon
|
|
157
|
+
target_p.to_stl(thickness_nm=400) # this will create a 3D STL file you can inspect
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
Prediction: 100%|[32m██████████████████████████████[0m| 100/100 [00:04<00:00, 22.84%/s][32m[0m
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
Saved Device to 'prefab_device.stl'
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+

|
|
169
|
+
|
|
170
|
+
### 3rd-party libraries
|
|
171
|
+
|
|
172
|
+
PreFab should seamlessly fit into your existing design flow. As such, we're adding tools to read and write from/to common libraries such as [Tidy3D](https://www.flexcompute.com/tidy3d/) and [gdsfactory](https://gdsfactory.github.io/gdsfactory/).
|
|
173
|
+
|
|
174
|
+
This first example shows how to read a gdsfactory component, correct it using PreFab, and then convert it back to a gdsfactory component.
|
|
175
|
+
|
|
176
|
+
```python
|
|
177
|
+
import gdsfactory as gf
|
|
178
|
+
import prefab as pf
|
|
179
|
+
|
|
180
|
+
component = gf.components.triangle(x=1, xtop=0, y=2, ybot=0, layer="WG")
|
|
181
|
+
component.plot()
|
|
182
|
+
device = pf.read.from_gdsfactory(component)
|
|
183
|
+
|
|
184
|
+
device_c = device.correct(model=pf.models["ANT_NanoSOI_ANF1_d10"], binarize=True)
|
|
185
|
+
component_c = device_c.to_gdsfactory()
|
|
186
|
+
component_c.plot()
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
Correction: 100%|[32m██████████████████████████████[0m| 100/100 [00:02<00:00, 46.44%/s][32m[0m
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+

|
|
195
|
+
|
|
196
|
+

|
|
197
|
+
|
|
198
|
+
This second example shows how to read a Tidy3D simulation, correct the structure using PreFab, and then send it back to a Tidy3D simulation.
|
|
199
|
+
|
|
200
|
+
```python
|
|
201
|
+
import prefab as pf
|
|
202
|
+
import tidy3d as td
|
|
203
|
+
|
|
204
|
+
freq0 = td.C_0 / 0.75
|
|
205
|
+
arm1 = td.Structure(
|
|
206
|
+
geometry=td.Box(center=(0, 0, 0), size=(0.1, 0.75, 0.22)),
|
|
207
|
+
medium=td.Medium(permittivity=2.0),
|
|
208
|
+
)
|
|
209
|
+
arm2 = td.Structure(
|
|
210
|
+
geometry=td.Box(center=(0, 0, 0), size=(0.75, 0.1, 0.22)),
|
|
211
|
+
medium=td.Medium(permittivity=2.0),
|
|
212
|
+
)
|
|
213
|
+
source = td.PointDipole(
|
|
214
|
+
center=(-0.75, 0, 0),
|
|
215
|
+
source_time=td.GaussianPulse(freq0=freq0, fwidth=freq0 / 10.0),
|
|
216
|
+
polarization="Ey",
|
|
217
|
+
)
|
|
218
|
+
monitor = td.FieldMonitor(
|
|
219
|
+
size=(td.inf, td.inf, 0),
|
|
220
|
+
freqs=[freq0],
|
|
221
|
+
name="fields",
|
|
222
|
+
colocate=True,
|
|
223
|
+
)
|
|
224
|
+
sim = td.Simulation(
|
|
225
|
+
size=(2, 2, 3),
|
|
226
|
+
grid_spec=td.GridSpec.auto(min_steps_per_wvl=100),
|
|
227
|
+
structures=[arm1, arm2],
|
|
228
|
+
sources=[source],
|
|
229
|
+
monitors=[monitor],
|
|
230
|
+
run_time=120 / freq0,
|
|
231
|
+
)
|
|
232
|
+
|
|
233
|
+
sim.plot_eps(z=0)
|
|
234
|
+
|
|
235
|
+
device = pf.read.from_tidy3d(tidy3d_sim=sim, eps_threshold=1.5, z=0)
|
|
236
|
+
device.plot()
|
|
237
|
+
|
|
238
|
+
device_p = device.predict(model=pf.models["ANT_NanoSOI_ANF1_d10"], binarize=True)
|
|
239
|
+
structure_p = device_p.to_tidy3d(eps0=2.0, thickness=1.5)
|
|
240
|
+
|
|
241
|
+
sim_p = sim.updated_copy(structures=[structure_p])
|
|
242
|
+
sim_p.plot_eps(z=0)
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
Prediction: 100%|[32m██████████████████████████████[0m| 100/100 [00:10<00:00, 9.26%/s][32m[0m
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
<Axes: title={'center': 'cross section at z=0.00'}, xlabel='x', ylabel='y'>
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+

|
|
258
|
+
|
|
259
|
+

|
|
260
|
+
|
|
261
|
+

|
|
262
|
+
|
|
263
|
+
## What's next
|
|
264
|
+
|
|
265
|
+
We're excited about the future of PreFab and how we can help you gain more control over your nanofabrication process. Here are our key focus areas for the upcoming months:
|
|
266
|
+
|
|
267
|
+
- **Performance Enhancements**: We are implementing several improvements to accelerate predictions, particularly for larger devices.
|
|
268
|
+
- **Expanding Model Library**: We are adding more models to our platform. If you have a specific nanofabrication process in mind, please reach out to us!
|
|
269
|
+
- **Innovative Usage Methods**: We have exciting ideas to make PreFab even more powerful, particularly within the design optimization process. Look out for more updates on this front.
|
|
270
|
+
- **Code Quality**: We are working on improving the code quality of PreFab to make it more robust and easier to maintain. This will lay the foundation for future development and collaboration.
|
|
271
|
+
- **Community Engagement**: We value your input and are eager to hear your ideas and suggestions. Please reach out to us at [support@prefabphotonics.com](mailto:hi@prefabphotonics.com) with your feedback.
|
|
272
|
+
|
|
273
|
+
Thank you for your support, and happy designing!
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,9 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
date: 2024-10-10
|
|
3
|
+
authors: [dusan]
|
|
4
|
+
---
|
|
5
|
+
|
|
1
6
|
# Python for Photonics Development
|
|
2
7
|
|
|
3
8
|
[Python](https://www.python.org/) has become an indispensable tool in many technical fields, including ours. It gives researchers and engineers a versatile platform for simulating, modeling, and analyzing photonic systems, effectively streamlining the **entire development workflow.** With its extensive ecosystem of libraries and tools, Python enables efficient and innovative solutions in photonics that we think are worth exploring.
|
|
4
9
|
|
|
5
10
|
In this guide, we'll walk you through setting up your Python development environment, introduce essential libraries, explore cloud and remote tools to leverage computational resources, share valuable settings for an enhanced coding experience, and provide additional tips to elevate your photonics projects using Python.
|
|
6
11
|
|
|
12
|
+
<!-- more -->
|
|
13
|
+
|
|
7
14
|
!!! note "Note"
|
|
8
15
|
|
|
9
16
|
PreFab is developed using Python, and we leverage many Python packages to enhance our development process. This guide is a compilation of resources and insights that have been beneficial in *our* work. While it's not exhaustive, we hope it proves useful to you in your photonics development endeavors.
|
|
@@ -323,4 +330,4 @@ To further advance your photonics development journey with Python:
|
|
|
323
330
|
|
|
324
331
|
3. **Develop Your Own Tools!**: We can't wait to see what you build.
|
|
325
332
|
|
|
326
|
-
And of course, you can run our [notebook examples](
|
|
333
|
+
And of course, you can run our [notebook examples](../../examples/1_prediction.ipynb) on using virtual nanofabrication models to add fabrication-awareness to your photonics simulations and designs.
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"\n",
|
|
23
23
|
"- **We've updated our logo** to be less busy while retaining its original charm and essence. We hope you like the new design!\n",
|
|
24
24
|
"\n",
|
|
25
|
-
"\n"
|
|
26
26
|
]
|
|
27
27
|
},
|
|
28
28
|
{
|
|
@@ -49,7 +49,7 @@ See the following guides to get started with making your first predictions and c
|
|
|
49
49
|
1. [Making a prediction](examples/1_prediction.ipynb)
|
|
50
50
|
2. [Making a correction](examples/2_correction.ipynb)
|
|
51
51
|
|
|
52
|
-
If you are new to Python, we recommend starting with the [Python for Photonics](blog/python-for-photonics.md) blog post.
|
|
52
|
+
If you are new to Python, we recommend starting with the [Python for Photonics](blog/posts/python-for-photonics.md) blog post.
|
|
53
53
|
|
|
54
54
|
!!! tip "Performance and usage"
|
|
55
55
|
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{% extends "base.html" %}
|
|
2
|
+
|
|
3
|
+
{% block announce %}
|
|
4
|
+
<span style="color: #b0b0b0;">For updates follow</span> <strong>PreFab Photonics</strong> <span
|
|
5
|
+
style="color: #b0b0b0;">on</span> <a rel="me"
|
|
6
|
+
href="https://www.linkedin.com/company/102847109/"><strong>LinkedIn</strong>
|
|
7
|
+
</a>
|
|
8
|
+
{% endblock %}
|
|
9
|
+
|
|
10
|
+
{% block content %}
|
|
11
|
+
{% if page.nb_url %}
|
|
12
|
+
<a href="{{ page.nb_url }}" title="Download Notebook" class="md-content__button md-icon"
|
|
13
|
+
style="display: inline; color: #b0b0b0;">
|
|
14
|
+
{% include ".icons/material/download.svg" %}
|
|
15
|
+
</a>
|
|
16
|
+
{% endif %}
|
|
17
|
+
|
|
18
|
+
{{ super() }}
|
|
19
|
+
{% endblock content %}
|
|
@@ -1,44 +1,49 @@
|
|
|
1
|
-
site_name: "Docs"
|
|
1
|
+
site_name: "PreFab Docs"
|
|
2
2
|
|
|
3
3
|
site_url: https://docs.prefabphotonics.com/
|
|
4
4
|
repo_url: https://github.com/PreFab-Photonics/PreFab
|
|
5
5
|
repo_name: PreFab-Photonics/PreFab
|
|
6
6
|
|
|
7
7
|
nav:
|
|
8
|
-
-
|
|
9
|
-
|
|
8
|
+
- Home:
|
|
9
|
+
- Getting started: index.md
|
|
10
|
+
- Model library: models.md
|
|
11
|
+
- Changelog: CHANGELOG.md
|
|
10
12
|
- Examples:
|
|
11
13
|
- Making a prediction: examples/1_prediction.ipynb
|
|
12
14
|
- Making a correction: examples/2_correction.ipynb
|
|
13
15
|
- Working with sidewall angles: examples/3_sidewall_angle.ipynb
|
|
14
16
|
- SEM generation: examples/4_SEM_generation.ipynb
|
|
15
17
|
- Blog:
|
|
16
|
-
-
|
|
17
|
-
- PreFab v1.1.0: blog/PreFab-v1.1.0.ipynb
|
|
18
|
+
- blog/index.md
|
|
18
19
|
- Reference:
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
- Compare: reference/compare.md
|
|
21
|
+
- Device: reference/device.md
|
|
22
|
+
- Geometry: reference/geometry.md
|
|
23
|
+
- Models: reference/models.md
|
|
24
|
+
- Read: reference/read.md
|
|
25
|
+
- Shapes: reference/shapes.md
|
|
25
26
|
|
|
26
27
|
theme:
|
|
27
28
|
name: "material"
|
|
29
|
+
custom_dir: docs/overrides
|
|
28
30
|
palette:
|
|
29
31
|
scheme: slate
|
|
30
32
|
primary: black
|
|
31
|
-
accent:
|
|
33
|
+
accent: yellow
|
|
32
34
|
font:
|
|
33
35
|
text: Roboto
|
|
34
36
|
code: Roboto Mono
|
|
35
37
|
language: en
|
|
36
|
-
logo: assets/
|
|
38
|
+
logo: assets/logo-white.png
|
|
37
39
|
favicon: assets/favicon.ico
|
|
38
40
|
# icon:
|
|
39
41
|
# repo: fontawesome/brands/github
|
|
40
42
|
features:
|
|
43
|
+
- announce.dismiss
|
|
41
44
|
- navigation.instant
|
|
45
|
+
- navigation.instant.progress
|
|
46
|
+
- navigation.tabs
|
|
42
47
|
- navigation.sections
|
|
43
48
|
- navigation.footer
|
|
44
49
|
- content.code.copy
|
|
@@ -87,6 +92,8 @@ markdown_extensions:
|
|
|
87
92
|
|
|
88
93
|
plugins:
|
|
89
94
|
- search
|
|
95
|
+
- blog:
|
|
96
|
+
authors: true
|
|
90
97
|
- mkdocstrings:
|
|
91
98
|
handlers:
|
|
92
99
|
python:
|
|
@@ -95,4 +102,6 @@ plugins:
|
|
|
95
102
|
options:
|
|
96
103
|
docstring_style: numpy
|
|
97
104
|
show_docstring_examples: true
|
|
98
|
-
-
|
|
105
|
+
- mkdocs-jupyter:
|
|
106
|
+
include_source: true
|
|
107
|
+
theme: dark
|
|
@@ -5,9 +5,9 @@ Usage:
|
|
|
5
5
|
import prefab as pf
|
|
6
6
|
"""
|
|
7
7
|
|
|
8
|
-
__version__ = "1.1.
|
|
8
|
+
__version__ = "1.1.3"
|
|
9
9
|
|
|
10
|
-
from . import compare, geometry, read, shapes
|
|
10
|
+
from . import compare, geometry, predict, read, shapes
|
|
11
11
|
from .device import BufferSpec, Device
|
|
12
12
|
from .models import models
|
|
13
13
|
|
|
@@ -15,6 +15,7 @@ __all__ = [
|
|
|
15
15
|
"Device",
|
|
16
16
|
"BufferSpec",
|
|
17
17
|
"geometry",
|
|
18
|
+
"predict",
|
|
18
19
|
"read",
|
|
19
20
|
"shapes",
|
|
20
21
|
"compare",
|