prefab 1.1.0__py3-none-any.whl → 1.1.1__py3-none-any.whl
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/__init__.py +1 -1
- prefab/device.py +6 -2
- {prefab-1.1.0.dist-info → prefab-1.1.1.dist-info}/METADATA +1 -1
- {prefab-1.1.0.dist-info → prefab-1.1.1.dist-info}/RECORD +6 -6
- {prefab-1.1.0.dist-info → prefab-1.1.1.dist-info}/WHEEL +0 -0
- {prefab-1.1.0.dist-info → prefab-1.1.1.dist-info}/licenses/LICENSE +0 -0
prefab/__init__.py
CHANGED
prefab/device.py
CHANGED
|
@@ -493,6 +493,7 @@ class Device(BaseModel):
|
|
|
493
493
|
binarize=False,
|
|
494
494
|
gpu=gpu,
|
|
495
495
|
)
|
|
496
|
+
semulated_array += np.random.normal(0, 0.03, semulated_array.shape)
|
|
496
497
|
return self.model_copy(update={"device_array": semulated_array})
|
|
497
498
|
|
|
498
499
|
def to_ndarray(self) -> np.ndarray:
|
|
@@ -695,8 +696,8 @@ class Device(BaseModel):
|
|
|
695
696
|
"try `pip install gdsfactory`."
|
|
696
697
|
) from None
|
|
697
698
|
|
|
698
|
-
device_array = np.rot90(self.
|
|
699
|
-
return gf.read.from_np(device_array
|
|
699
|
+
device_array = np.rot90(self.to_ndarray(), k=-1)
|
|
700
|
+
return gf.read.from_np(device_array, nm_per_pixel=1)
|
|
700
701
|
|
|
701
702
|
def to_tidy3d(
|
|
702
703
|
self,
|
|
@@ -808,6 +809,9 @@ class Device(BaseModel):
|
|
|
808
809
|
raise ValueError("Thickness must be a positive integer.")
|
|
809
810
|
|
|
810
811
|
layered_array = self.to_3d(thickness_nm)
|
|
812
|
+
layered_array = np.pad(
|
|
813
|
+
layered_array, ((0, 0), (0, 0), (10, 10)), mode="constant"
|
|
814
|
+
)
|
|
811
815
|
verts, faces, _, _ = measure.marching_cubes(layered_array, level=0.5)
|
|
812
816
|
cube = mesh.Mesh(np.zeros(faces.shape[0], dtype=mesh.Mesh.dtype))
|
|
813
817
|
for i, f in enumerate(faces):
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: prefab
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.1
|
|
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,12 +1,12 @@
|
|
|
1
|
-
prefab/__init__.py,sha256=
|
|
1
|
+
prefab/__init__.py,sha256=v7MDKK-aRRrdT77IJ5jUcfBc3k6zmGUQnn_fqzNoj_A,401
|
|
2
2
|
prefab/__main__.py,sha256=aAgt1WXa44k1nJqsiSD3uAfNeGpwtjWqMUYCHN5_Qrw,2759
|
|
3
3
|
prefab/compare.py,sha256=AfLJ69DTqvt0mkMqNCTdn2KWKoclt_0htGVXvarEhkY,2709
|
|
4
|
-
prefab/device.py,sha256=
|
|
4
|
+
prefab/device.py,sha256=Fxgl1Yhc-5KQyrt80NlLsmsr47kz3fShjZdoXw9zZbc,58687
|
|
5
5
|
prefab/geometry.py,sha256=pXsVeu4Ycnq60bG6WqFNoUWnyiNStIaYQgbMIrEyndM,9614
|
|
6
6
|
prefab/models.py,sha256=UMzYZzKouroxlwkXCMKIYozmQCMhNhvt8kQrZmwmZB4,3671
|
|
7
7
|
prefab/read.py,sha256=Rzj9GGrszsKWdY8GxtmpfYcA4nsiuxgwSdEDVvfHN80,14624
|
|
8
8
|
prefab/shapes.py,sha256=Hc6dc2Y5Wmb2mZAxhdjBNEJF7C7tF2o460HNvcqcQdo,24856
|
|
9
|
-
prefab-1.1.
|
|
10
|
-
prefab-1.1.
|
|
11
|
-
prefab-1.1.
|
|
12
|
-
prefab-1.1.
|
|
9
|
+
prefab-1.1.1.dist-info/METADATA,sha256=ZHKTRE8c39t2itPHkTWJ8wZUJ4Wk0BQcDgmkjLIYRGQ,34817
|
|
10
|
+
prefab-1.1.1.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
|
|
11
|
+
prefab-1.1.1.dist-info/licenses/LICENSE,sha256=IMF9i4xIpgCADf0U-V1cuf9HBmqWQd3qtI3FSuyW4zE,26526
|
|
12
|
+
prefab-1.1.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|