prefab 1.1.1__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.1 → prefab-1.1.3}/.github/workflows/docs-deploy.yml +4 -3
- {prefab-1.1.1 → prefab-1.1.3}/PKG-INFO +12 -12
- prefab-1.1.3/README.md +73 -0
- {prefab-1.1.1 → prefab-1.1.3/docs}/CHANGELOG.md +19 -26
- prefab-1.1.3/docs/assets/blog-cards/python-for-photonics.png +0 -0
- prefab-1.1.3/docs/assets/logo-white.png +0 -0
- prefab-1.1.3/docs/assets/logo.png +0 -0
- prefab-1.1.3/docs/assets/promo_c.png +0 -0
- prefab-1.1.3/docs/assets/promo_p.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.3/docs/blog/posts/python-for-photonics.md +333 -0
- prefab-1.1.1/docs/blog/PreFab-v1.1.0.ipynb → prefab-1.1.3/docs/blog/prefab-v1.1.0.ipynb +1 -1
- {prefab-1.1.1 → prefab-1.1.3}/docs/index.md +4 -1
- prefab-1.1.3/docs/overrides/main.html +19 -0
- {prefab-1.1.1 → prefab-1.1.3}/mkdocs.yml +24 -14
- {prefab-1.1.1 → prefab-1.1.3}/prefab/__init__.py +3 -2
- {prefab-1.1.1 → prefab-1.1.3}/prefab/compare.py +17 -0
- {prefab-1.1.1 → prefab-1.1.3}/prefab/device.py +40 -177
- {prefab-1.1.1 → prefab-1.1.3}/prefab/geometry.py +43 -1
- {prefab-1.1.1 → prefab-1.1.3}/prefab/models.py +1 -1
- prefab-1.1.3/prefab/predict.py +260 -0
- {prefab-1.1.1 → prefab-1.1.3}/prefab/read.py +5 -1
- {prefab-1.1.1 → prefab-1.1.3}/prefab/shapes.py +208 -201
- {prefab-1.1.1 → prefab-1.1.3}/pyproject.toml +2 -2
- prefab-1.1.1/README.md +0 -73
- prefab-1.1.1/docs/assets/logo.png +0 -0
- prefab-1.1.1/site/assets/promo_c.png +0 -0
- prefab-1.1.1/site/assets/promo_p.png +0 -0
- {prefab-1.1.1 → prefab-1.1.3}/.gitattributes +0 -0
- {prefab-1.1.1 → prefab-1.1.3}/.github/workflows/python-publish.yml +0 -0
- {prefab-1.1.1 → prefab-1.1.3}/.gitignore +0 -0
- {prefab-1.1.1 → prefab-1.1.3}/LICENSE +0 -0
- {prefab-1.1.1 → prefab-1.1.3}/docs/CNAME +0 -0
- {prefab-1.1.1 → prefab-1.1.3}/docs/assets/favicon.ico +0 -0
- {prefab-1.1.1 → prefab-1.1.3}/docs/assets/prefab_logo_white.svg +0 -0
- {prefab-1.1.1 → prefab-1.1.3}/docs/examples/1_prediction.ipynb +0 -0
- {prefab-1.1.1 → prefab-1.1.3}/docs/examples/2_correction.ipynb +0 -0
- {prefab-1.1.1 → prefab-1.1.3}/docs/examples/3_sidewall_angle.ipynb +0 -0
- {prefab-1.1.1 → prefab-1.1.3}/docs/examples/4_SEM_generation.ipynb +0 -0
- {prefab-1.1.1 → prefab-1.1.3}/docs/models.md +0 -0
- {prefab-1.1.1 → prefab-1.1.3}/docs/reference/compare.md +0 -0
- {prefab-1.1.1 → prefab-1.1.3}/docs/reference/device.md +0 -0
- {prefab-1.1.1 → prefab-1.1.3}/docs/reference/geometry.md +0 -0
- {prefab-1.1.1 → prefab-1.1.3}/docs/reference/models.md +0 -0
- {prefab-1.1.1 → prefab-1.1.3}/docs/reference/read.md +0 -0
- {prefab-1.1.1 → prefab-1.1.3}/docs/reference/shapes.md +0 -0
- {prefab-1.1.1 → prefab-1.1.3}/prefab/__main__.py +0 -0
- {prefab-1.1.1 → prefab-1.1.3}/site/404.html +0 -0
- {prefab-1.1.1 → prefab-1.1.3}/site/assets/_mkdocstrings.css +0 -0
- {prefab-1.1.1 → prefab-1.1.3}/site/assets/favicon.ico +0 -0
- {prefab-1.1.1 → prefab-1.1.3}/site/assets/images/favicon.png +0 -0
- {prefab-1.1.1 → prefab-1.1.3}/site/assets/javascripts/bundle.a7c05c9e.min.js +0 -0
- {prefab-1.1.1 → prefab-1.1.3}/site/assets/javascripts/bundle.a7c05c9e.min.js.map +0 -0
- {prefab-1.1.1 → prefab-1.1.3}/site/assets/javascripts/lunr/min/lunr.ar.min.js +0 -0
- {prefab-1.1.1 → prefab-1.1.3}/site/assets/javascripts/lunr/min/lunr.da.min.js +0 -0
- {prefab-1.1.1 → prefab-1.1.3}/site/assets/javascripts/lunr/min/lunr.de.min.js +0 -0
- {prefab-1.1.1 → prefab-1.1.3}/site/assets/javascripts/lunr/min/lunr.du.min.js +0 -0
- {prefab-1.1.1 → prefab-1.1.3}/site/assets/javascripts/lunr/min/lunr.el.min.js +0 -0
- {prefab-1.1.1 → prefab-1.1.3}/site/assets/javascripts/lunr/min/lunr.es.min.js +0 -0
- {prefab-1.1.1 → prefab-1.1.3}/site/assets/javascripts/lunr/min/lunr.fi.min.js +0 -0
- {prefab-1.1.1 → prefab-1.1.3}/site/assets/javascripts/lunr/min/lunr.fr.min.js +0 -0
- {prefab-1.1.1 → prefab-1.1.3}/site/assets/javascripts/lunr/min/lunr.he.min.js +0 -0
- {prefab-1.1.1 → prefab-1.1.3}/site/assets/javascripts/lunr/min/lunr.hi.min.js +0 -0
- {prefab-1.1.1 → prefab-1.1.3}/site/assets/javascripts/lunr/min/lunr.hu.min.js +0 -0
- {prefab-1.1.1 → prefab-1.1.3}/site/assets/javascripts/lunr/min/lunr.hy.min.js +0 -0
- {prefab-1.1.1 → prefab-1.1.3}/site/assets/javascripts/lunr/min/lunr.it.min.js +0 -0
- {prefab-1.1.1 → prefab-1.1.3}/site/assets/javascripts/lunr/min/lunr.ja.min.js +0 -0
- {prefab-1.1.1 → prefab-1.1.3}/site/assets/javascripts/lunr/min/lunr.jp.min.js +0 -0
- {prefab-1.1.1 → prefab-1.1.3}/site/assets/javascripts/lunr/min/lunr.kn.min.js +0 -0
- {prefab-1.1.1 → prefab-1.1.3}/site/assets/javascripts/lunr/min/lunr.ko.min.js +0 -0
- {prefab-1.1.1 → prefab-1.1.3}/site/assets/javascripts/lunr/min/lunr.multi.min.js +0 -0
- {prefab-1.1.1 → prefab-1.1.3}/site/assets/javascripts/lunr/min/lunr.nl.min.js +0 -0
- {prefab-1.1.1 → prefab-1.1.3}/site/assets/javascripts/lunr/min/lunr.no.min.js +0 -0
- {prefab-1.1.1 → prefab-1.1.3}/site/assets/javascripts/lunr/min/lunr.pt.min.js +0 -0
- {prefab-1.1.1 → prefab-1.1.3}/site/assets/javascripts/lunr/min/lunr.ro.min.js +0 -0
- {prefab-1.1.1 → prefab-1.1.3}/site/assets/javascripts/lunr/min/lunr.ru.min.js +0 -0
- {prefab-1.1.1 → prefab-1.1.3}/site/assets/javascripts/lunr/min/lunr.sa.min.js +0 -0
- {prefab-1.1.1 → prefab-1.1.3}/site/assets/javascripts/lunr/min/lunr.stemmer.support.min.js +0 -0
- {prefab-1.1.1 → prefab-1.1.3}/site/assets/javascripts/lunr/min/lunr.sv.min.js +0 -0
- {prefab-1.1.1 → prefab-1.1.3}/site/assets/javascripts/lunr/min/lunr.ta.min.js +0 -0
- {prefab-1.1.1 → prefab-1.1.3}/site/assets/javascripts/lunr/min/lunr.te.min.js +0 -0
- {prefab-1.1.1 → prefab-1.1.3}/site/assets/javascripts/lunr/min/lunr.th.min.js +0 -0
- {prefab-1.1.1 → prefab-1.1.3}/site/assets/javascripts/lunr/min/lunr.tr.min.js +0 -0
- {prefab-1.1.1 → prefab-1.1.3}/site/assets/javascripts/lunr/min/lunr.vi.min.js +0 -0
- {prefab-1.1.1 → prefab-1.1.3}/site/assets/javascripts/lunr/min/lunr.zh.min.js +0 -0
- {prefab-1.1.1 → prefab-1.1.3}/site/assets/javascripts/lunr/tinyseg.js +0 -0
- {prefab-1.1.1 → prefab-1.1.3}/site/assets/javascripts/lunr/wordcut.js +0 -0
- {prefab-1.1.1 → prefab-1.1.3}/site/assets/javascripts/workers/search.b8dbb3d2.min.js +0 -0
- {prefab-1.1.1 → prefab-1.1.3}/site/assets/javascripts/workers/search.b8dbb3d2.min.js.map +0 -0
- {prefab-1.1.1 → prefab-1.1.3}/site/assets/logo.png +0 -0
- {prefab-1.1.1 → prefab-1.1.3}/site/assets/logo_neue.svg +0 -0
- {prefab-1.1.1/docs → prefab-1.1.3/site}/assets/promo_c.png +0 -0
- {prefab-1.1.1/docs → prefab-1.1.3/site}/assets/promo_p.png +0 -0
- {prefab-1.1.1 → prefab-1.1.3}/site/assets/stylesheets/main.66ac8b77.min.css +0 -0
- {prefab-1.1.1 → prefab-1.1.3}/site/assets/stylesheets/main.66ac8b77.min.css.map +0 -0
- {prefab-1.1.1 → prefab-1.1.3}/site/assets/stylesheets/palette.06af60db.min.css +0 -0
- {prefab-1.1.1 → prefab-1.1.3}/site/assets/stylesheets/palette.06af60db.min.css.map +0 -0
- {prefab-1.1.1 → prefab-1.1.3}/site/css/ansi-colours.css +0 -0
- {prefab-1.1.1 → prefab-1.1.3}/site/css/jupyter-cells.css +0 -0
- {prefab-1.1.1 → prefab-1.1.3}/site/css/pandas-dataframe.css +0 -0
- {prefab-1.1.1 → prefab-1.1.3}/site/examples/1_prediction/index.html +0 -0
- {prefab-1.1.1 → prefab-1.1.3}/site/examples/2_correction/index.html +0 -0
- {prefab-1.1.1 → prefab-1.1.3}/site/index.html +0 -0
- {prefab-1.1.1 → prefab-1.1.3}/site/models/index.html +0 -0
- {prefab-1.1.1 → prefab-1.1.3}/site/objects.inv +0 -0
- {prefab-1.1.1 → prefab-1.1.3}/site/reference/compare/index.html +0 -0
- {prefab-1.1.1 → prefab-1.1.3}/site/reference/device/index.html +0 -0
- {prefab-1.1.1 → prefab-1.1.3}/site/reference/geometry/index.html +0 -0
- {prefab-1.1.1 → prefab-1.1.3}/site/reference/models/index.html +0 -0
- {prefab-1.1.1 → prefab-1.1.3}/site/reference/read/index.html +0 -0
- {prefab-1.1.1 → prefab-1.1.3}/site/search/search_index.json +0 -0
- {prefab-1.1.1 → prefab-1.1.3}/site/sitemap.xml +0 -0
- {prefab-1.1.1 → 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
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
|
|
@@ -516,7 +516,7 @@ Classifier: License :: OSI Approved :: GNU Lesser General Public License v2 (LGP
|
|
|
516
516
|
Classifier: Operating System :: OS Independent
|
|
517
517
|
Classifier: Programming Language :: Python :: 3
|
|
518
518
|
Requires-Python: >=3.9
|
|
519
|
-
Requires-Dist: gdstk
|
|
519
|
+
Requires-Dist: gdstk>=0.9.55
|
|
520
520
|
Requires-Dist: matplotlib
|
|
521
521
|
Requires-Dist: numpy
|
|
522
522
|
Requires-Dist: opencv-python-headless
|
|
@@ -533,23 +533,23 @@ Description-Content-Type: text/markdown
|
|
|
533
533
|
|
|
534
534
|

|
|
535
535
|
|
|
536
|
-
PreFab leverages **deep learning** to
|
|
536
|
+
PreFab is a _virtual nanofabrication environment_ that leverages **deep learning** and **computer vision** to predict and correct for structural variations in integrated photonic devices during nanofabrication.
|
|
537
537
|
|
|
538
538
|
## Prediction
|
|
539
539
|
|
|
540
|
-
PreFab
|
|
540
|
+
PreFab predicts process-induced structural variations, including corner rounding, loss of small lines and islands, filling of narrow holes and channels, sidewall angle deviations, and stochastic effects. This allows designers to rapidly prototype and evaluate expected performance pre-fabrication.
|
|
541
541
|
|
|
542
542
|

|
|
543
543
|
|
|
544
544
|
## Correction
|
|
545
545
|
|
|
546
|
-
PreFab
|
|
546
|
+
PreFab corrects device designs to ensure that the fabricated outcome closely matches the intended specifications. This minimizes structural variations and reduces performance discrepancies between simulations and actual experiments.
|
|
547
547
|
|
|
548
548
|

|
|
549
549
|
|
|
550
550
|
## Models
|
|
551
551
|
|
|
552
|
-
|
|
552
|
+
Each photonic nanofabrication process requires unique models, which are regularly updated with the latest data. The current models include (see the full list in [`docs/models.md`](https://github.com/PreFab-Photonics/PreFab/blob/main/docs/models.md)):
|
|
553
553
|
|
|
554
554
|
| Foundry | Process | Latest Version | Latest Dataset | Model Name |
|
|
555
555
|
| ------- | ------- | ----------------- | ---------------- | ----------- |
|
|
@@ -557,7 +557,7 @@ PreFab accommodates unique _predictor_ and _corrector_ models for each photonic
|
|
|
557
557
|
| ANT | SiN | ANF1 (May 6 2024) | d1 (Jan 31 2024) | ANT_SiN_ANF1_d1 |
|
|
558
558
|
| Generic | DUV-SOI | ANF1 (May 6 2024) | d0 (Jul 30 2024) | generic_DUV_SOI_ANF1_d0 |
|
|
559
559
|
|
|
560
|
-
> _New models
|
|
560
|
+
> _New models are to be regularly added. Usage may change. For additional foundry and process models, feel free to [contact us](mailto:hi@prefabphotonics.com) or raise an issue._
|
|
561
561
|
|
|
562
562
|
## Installation
|
|
563
563
|
|
|
@@ -581,7 +581,7 @@ pip install -e .
|
|
|
581
581
|
|
|
582
582
|
Before you can make PreFab requests, you will need to [create an account](https://www.prefabphotonics.com/login).
|
|
583
583
|
|
|
584
|
-
To link your account, you will need
|
|
584
|
+
To link your account, you will need an token. You can do this by running the following command in your terminal. This will open a browser window where you can log in and authenticate your token.
|
|
585
585
|
|
|
586
586
|
```sh
|
|
587
587
|
python3 -m prefab setup
|
|
@@ -593,11 +593,11 @@ Visit [`/docs/examples`](https://github.com/PreFab-Photonics/PreFab/tree/main/do
|
|
|
593
593
|
|
|
594
594
|
## Performance and Usage
|
|
595
595
|
|
|
596
|
-
PreFab models are
|
|
596
|
+
PreFab models are hosted on a [serverless cloud platform](https://modal.com/). Please keep in mind:
|
|
597
597
|
|
|
598
|
-
- 🐢 CPU inference may
|
|
599
|
-
- 🥶 The first prediction may take longer due to cold start server loading. Subsequent predictions will be faster.
|
|
600
|
-
- 😊
|
|
598
|
+
- 🐢 Default CPU inference may be slower.
|
|
599
|
+
- 🥶 The first prediction using optional GPU inference may take longer due to cold start server loading. Subsequent predictions will be faster.
|
|
600
|
+
- 😊 Please be considerate of usage. Start with small tasks and limit usage during the initial stages. Thank you!
|
|
601
601
|
|
|
602
602
|
## License
|
|
603
603
|
|
prefab-1.1.3/README.md
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# PreFab
|
|
2
|
+
|
|
3
|
+

|
|
4
|
+
|
|
5
|
+
PreFab is a _virtual nanofabrication environment_ that leverages **deep learning** and **computer vision** to predict and correct for structural variations in integrated photonic devices during nanofabrication.
|
|
6
|
+
|
|
7
|
+
## Prediction
|
|
8
|
+
|
|
9
|
+
PreFab predicts process-induced structural variations, including corner rounding, loss of small lines and islands, filling of narrow holes and channels, sidewall angle deviations, and stochastic effects. This allows designers to rapidly prototype and evaluate expected performance pre-fabrication.
|
|
10
|
+
|
|
11
|
+

|
|
12
|
+
|
|
13
|
+
## Correction
|
|
14
|
+
|
|
15
|
+
PreFab corrects device designs to ensure that the fabricated outcome closely matches the intended specifications. This minimizes structural variations and reduces performance discrepancies between simulations and actual experiments.
|
|
16
|
+
|
|
17
|
+

|
|
18
|
+
|
|
19
|
+
## Models
|
|
20
|
+
|
|
21
|
+
Each photonic nanofabrication process requires unique models, which are regularly updated with the latest data. The current models include (see the full list in [`docs/models.md`](https://github.com/PreFab-Photonics/PreFab/blob/main/docs/models.md)):
|
|
22
|
+
|
|
23
|
+
| Foundry | Process | Latest Version | Latest Dataset | Model Name |
|
|
24
|
+
| ------- | ------- | ----------------- | ---------------- | ----------- |
|
|
25
|
+
| ANT | NanoSOI | ANF1 (May 6 2024) | d10 (Jun 8 2024) | ANT_NanoSOI_ANF1_d10 |
|
|
26
|
+
| ANT | SiN | ANF1 (May 6 2024) | d1 (Jan 31 2024) | ANT_SiN_ANF1_d1 |
|
|
27
|
+
| Generic | DUV-SOI | ANF1 (May 6 2024) | d0 (Jul 30 2024) | generic_DUV_SOI_ANF1_d0 |
|
|
28
|
+
|
|
29
|
+
> _New models are to be regularly added. Usage may change. For additional foundry and process models, feel free to [contact us](mailto:hi@prefabphotonics.com) or raise an issue._
|
|
30
|
+
|
|
31
|
+
## Installation
|
|
32
|
+
|
|
33
|
+
Install PreFab via pip:
|
|
34
|
+
|
|
35
|
+
```sh
|
|
36
|
+
pip install prefab
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Or clone the repository and install in development mode:
|
|
40
|
+
|
|
41
|
+
```sh
|
|
42
|
+
git clone https://github.com/PreFab-Photonics/PreFab.git
|
|
43
|
+
cd PreFab
|
|
44
|
+
pip install -e .
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Getting Started
|
|
48
|
+
|
|
49
|
+
### Account setup
|
|
50
|
+
|
|
51
|
+
Before you can make PreFab requests, you will need to [create an account](https://www.prefabphotonics.com/login).
|
|
52
|
+
|
|
53
|
+
To link your account, you will need an token. You can do this by running the following command in your terminal. This will open a browser window where you can log in and authenticate your token.
|
|
54
|
+
|
|
55
|
+
```sh
|
|
56
|
+
python3 -m prefab setup
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Guides
|
|
60
|
+
|
|
61
|
+
Visit [`/docs/examples`](https://github.com/PreFab-Photonics/PreFab/tree/main/docs/examples) or our [docs](https://docs.prefabphotonics.com/) to get started with your first predictions.
|
|
62
|
+
|
|
63
|
+
## Performance and Usage
|
|
64
|
+
|
|
65
|
+
PreFab models are hosted on a [serverless cloud platform](https://modal.com/). Please keep in mind:
|
|
66
|
+
|
|
67
|
+
- 🐢 Default CPU inference may be slower.
|
|
68
|
+
- 🥶 The first prediction using optional GPU inference may take longer due to cold start server loading. Subsequent predictions will be faster.
|
|
69
|
+
- 😊 Please be considerate of usage. Start with small tasks and limit usage during the initial stages. Thank you!
|
|
70
|
+
|
|
71
|
+
## License
|
|
72
|
+
|
|
73
|
+
This project is licensed under the LGPL-2.1 license. © 2024 PreFab Photonics.
|
|
@@ -1,44 +1,43 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## 1.1.1 - 2024-
|
|
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.
|
|
6
9
|
|
|
7
|
-
|
|
8
|
-
- Added z-padding to the device array before exporting to STL with `Device.to_stl` to ensure that the exported device is closed.
|
|
10
|
+
## [1.1.2](https://github.com/PreFab-Photonics/PreFab/releases/tag/v1.1.2) - 2024-10-10
|
|
9
11
|
|
|
10
|
-
|
|
12
|
+
- User warning if `compare.intersection_over_union`, `compare.hamming_distance`, or `compare.dice_coefficient` are called with non-binarized devices.
|
|
13
|
+
- Added `height` parameter to many shape constructors in `prefab.shapes` to give more flexibility.
|
|
14
|
+
- Updates to the `README.md` to keep current.
|
|
15
|
+
- `Device.is_binary` is now a property.
|
|
16
|
+
- Moved `Device.enforce_feature_size` logic to `prefab.geometry` module.
|
|
17
|
+
- Added required version of `gdstk` to `pyproject.toml`.
|
|
18
|
+
- Removed leftover return statement in `geometry.rotate`.
|
|
11
19
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
### Added
|
|
20
|
+
## [1.1.1](https://github.com/PreFab-Photonics/PreFab/releases/tag/v1.1.1) - 2024-09-24
|
|
15
21
|
|
|
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.
|
|
23
|
+
- Added z-padding to the device array before exporting to STL with `Device.to_stl` to ensure that the exported device is closed.
|
|
24
|
+
- Removed buffer from `Device.device_array` before exporting to with `Device.to_gdsfactory`.
|
|
16
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.
|
|
17
26
|
- Import and export from/to Tidy3D simulations with `Device.to_tidy3d` and `read.from_tidy3d`.
|
|
18
27
|
- Import and export from/to gdsfactory components with `Device.to_gdsfactory` and `read.from_gdsfactory`.
|
|
19
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.
|
|
20
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`.
|
|
21
30
|
|
|
22
|
-
## 1.0.4 - 2024-09-19
|
|
23
|
-
|
|
24
|
-
### Added
|
|
31
|
+
## [1.0.4](https://github.com/PreFab-Photonics/PreFab/releases/tag/v1.0.4) - 2024-09-19
|
|
25
32
|
|
|
26
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.
|
|
27
|
-
|
|
28
|
-
### Changed
|
|
29
|
-
|
|
30
34
|
- Improve clarity of messaging for authentication errors.
|
|
31
35
|
|
|
32
|
-
## 1.0.3 - 2024-09-14
|
|
33
|
-
|
|
34
|
-
### Added
|
|
36
|
+
## [1.0.3](https://github.com/PreFab-Photonics/PreFab/releases/tag/v1.0.3) - 2024-09-14
|
|
35
37
|
|
|
36
38
|
- Added this `CHANGELOG.md` file.
|
|
37
39
|
- Added `prefab.shapes` module to replace the now removed `devices` directory. This module contains helpful device constructors for testing PreFab models on.
|
|
38
40
|
- Added `__version__` class attribute to `prefab` package.
|
|
39
|
-
|
|
40
|
-
### Changed
|
|
41
|
-
|
|
42
41
|
- Added `ANT_NanoSOI_ANF1-d8` and `ANT_NanoSOI_ANF1-d10` models (see `prefab.models` and `docs/models.md`).
|
|
43
42
|
- Updated notebook examples to use `prefab.shapes` module and newest models.
|
|
44
43
|
- Updated dependencies in `pyproject.toml`.
|
|
@@ -46,13 +45,7 @@
|
|
|
46
45
|
- Docstring improvements to `prefab.compare` module.
|
|
47
46
|
- Ability to specify thickness to all four sides of buffer thickness in `prefab.device.BufferSpec`.
|
|
48
47
|
- Changed some of the array resizing logic in `prefab.read` module to be more robust.
|
|
49
|
-
|
|
50
|
-
### Fixed
|
|
51
|
-
|
|
52
48
|
- Minor fixes to `prefab.device` module.
|
|
53
49
|
- Minor fixes to `prefab.geometry` module.
|
|
54
|
-
|
|
55
|
-
### Removed
|
|
56
|
-
|
|
57
50
|
- Removed `devices` directory from the repository. Effectively replaced with `prefab.shapes` module.
|
|
58
51
|
- Remove `requirements.txt` file as `pyproject.toml` contains all dependencies.
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
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
|