prefab 1.1.7__py3-none-any.whl → 1.1.9__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 CHANGED
@@ -5,7 +5,7 @@ Usage:
5
5
  import prefab as pf
6
6
  """
7
7
 
8
- __version__ = "1.1.7"
8
+ __version__ = "1.1.9"
9
9
 
10
10
  from . import compare, geometry, predict, read, shapes
11
11
  from .device import BufferSpec, Device
prefab/__main__.py CHANGED
@@ -50,9 +50,22 @@ class CallbackHandler(BaseHTTPRequestHandler):
50
50
  self.send_response_only(200, "OK")
51
51
  self.send_header("Content-type", "text/html")
52
52
  self.end_headers()
53
- self.wfile.write(
54
- b"Authentication successful, you can close this window."
55
- )
53
+ redirect_html = b"""
54
+ <html>
55
+ <head>
56
+ <meta http-equiv="refresh" content="0;url=https://www.prefabphotonics.com/token-success">
57
+ <style>
58
+ body {
59
+ background-color: #0A0A0A;
60
+ color: #ffffff;
61
+ }
62
+ </style>
63
+ </head>
64
+ <body>
65
+ </body>
66
+ </html>
67
+ """
68
+ self.wfile.write(redirect_html)
56
69
  threading.Thread(target=self.server.shutdown).start()
57
70
  else:
58
71
  self.send_error(400, "Bad Request: Missing tokens in callback URL.")
prefab/device.py CHANGED
@@ -413,22 +413,17 @@ class Device(BaseModel):
413
413
  """
414
414
  device_array = np.copy(self.device_array)
415
415
  buffer_thickness = self.buffer_spec.thickness
416
- buffer_mode = self.buffer_spec.mode
417
416
 
418
- crop_top = buffer_thickness["top"] if buffer_mode["top"] == "constant" else 0
419
- crop_bottom = (
420
- buffer_thickness["bottom"] if buffer_mode["bottom"] == "constant" else 0
421
- )
422
- crop_left = buffer_thickness["left"] if buffer_mode["left"] == "constant" else 0
423
- crop_right = (
424
- buffer_thickness["right"] if buffer_mode["right"] == "constant" else 0
425
- )
417
+ crop_top = buffer_thickness["top"]
418
+ crop_bottom = buffer_thickness["bottom"]
419
+ crop_left = buffer_thickness["left"]
420
+ crop_right = buffer_thickness["right"]
426
421
 
427
422
  ndarray = device_array[
428
423
  crop_top : device_array.shape[0] - crop_bottom,
429
424
  crop_left : device_array.shape[1] - crop_right,
430
425
  ]
431
- return np.squeeze(ndarray)
426
+ return ndarray
432
427
 
433
428
  def to_img(self, img_path: str = "prefab_device.png"):
434
429
  """
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: prefab
3
- Version: 1.1.7
3
+ Version: 1.1.9
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
@@ -558,7 +558,6 @@ Each photonic nanofabrication process requires unique models, which are regularl
558
558
  | ------- | ------- | ----------------- | ---------------- | ----------- |
559
559
  | ANT | NanoSOI | ANF1 (May 6 2024) | d10 (Jun 8 2024) | ANT_NanoSOI_ANF1_d10 |
560
560
  | ANT | SiN | ANF1 (May 6 2024) | d1 (Jan 31 2024) | ANT_SiN_ANF1_d1 |
561
- | Generic | DUV-SOI | ANF1 (May 6 2024) | d0 (Jul 30 2024) | generic_DUV_SOI_ANF1_d0 |
562
561
 
563
562
  > _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._
564
563
 
@@ -0,0 +1,14 @@
1
+ prefab/__init__.py,sha256=lrYoADI1MlequuC41Rly8vr1kAiFrG8zGw1PILM1rf4,425
2
+ prefab/__main__.py,sha256=1eXWiEoG7eetJMm1qRbK2I5MnzuRgKIoQtBeT-Ps8es,3523
3
+ prefab/compare.py,sha256=0Xgp3tFuP4of-ce9Opc19p8i8lIyXkbVGLuwWBaHSeE,3486
4
+ prefab/device.py,sha256=bN-RkbjhUOXlrnYEJW4H2HqhyxvFrQa15EvhOmGXgkY,54603
5
+ prefab/geometry.py,sha256=4fekWMlkdS_qlPNTdPXPhwKuQ5qdQ1Zjf8m9JKd1dA8,12049
6
+ prefab/models.py,sha256=waPNGtuISyY0f8cz7dnbD451CKYCt8EpPGt-4lSOPNU,2581
7
+ prefab/predict.py,sha256=h13523jasg1WbdiYbkXy43SWTGfQXjq6oEe0O8DT2U0,11731
8
+ prefab/read.py,sha256=WNqC3xENlndzFwXeCF2E7H3Iq2dO_6rPEPZ58DuloqY,16259
9
+ prefab/shapes.py,sha256=58cyXFNh1kEErq2jEbGd3dWSediU1OSmor_FWwc1V8A,25098
10
+ prefab-1.1.9.dist-info/METADATA,sha256=Un--7bA5ihvvtaXK733Q1Zd_8d-EBl1ohWfcdJCdOBI,35036
11
+ prefab-1.1.9.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
12
+ prefab-1.1.9.dist-info/entry_points.txt,sha256=h1_A9O9F3NAIoKXD1RPb3Eo-WCSiHhMB_AnagBi6XTQ,48
13
+ prefab-1.1.9.dist-info/licenses/LICENSE,sha256=IMF9i4xIpgCADf0U-V1cuf9HBmqWQd3qtI3FSuyW4zE,26526
14
+ prefab-1.1.9.dist-info/RECORD,,
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ prefab = prefab.__main__:main
@@ -1,13 +0,0 @@
1
- prefab/__init__.py,sha256=OLQgyDLvrqPHeXa9nudEEDm4blSMY8vzqx3gZngnCaI,425
2
- prefab/__main__.py,sha256=CGb63UhUkN_4_GpS3twqT1613OBeuli-qBiLMHORZU4,2987
3
- prefab/compare.py,sha256=0Xgp3tFuP4of-ce9Opc19p8i8lIyXkbVGLuwWBaHSeE,3486
4
- prefab/device.py,sha256=1rqs_VQ7am6W473C-EZTsPFDlqNIMMd26VZAUV1tNS0,54885
5
- prefab/geometry.py,sha256=4fekWMlkdS_qlPNTdPXPhwKuQ5qdQ1Zjf8m9JKd1dA8,12049
6
- prefab/models.py,sha256=waPNGtuISyY0f8cz7dnbD451CKYCt8EpPGt-4lSOPNU,2581
7
- prefab/predict.py,sha256=h13523jasg1WbdiYbkXy43SWTGfQXjq6oEe0O8DT2U0,11731
8
- prefab/read.py,sha256=WNqC3xENlndzFwXeCF2E7H3Iq2dO_6rPEPZ58DuloqY,16259
9
- prefab/shapes.py,sha256=58cyXFNh1kEErq2jEbGd3dWSediU1OSmor_FWwc1V8A,25098
10
- prefab-1.1.7.dist-info/METADATA,sha256=W4HNl5N6Lxvjf2GZoBA8PxCDEnKOs9fEhrB4OTNKuTk,35123
11
- prefab-1.1.7.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
12
- prefab-1.1.7.dist-info/licenses/LICENSE,sha256=IMF9i4xIpgCADf0U-V1cuf9HBmqWQd3qtI3FSuyW4zE,26526
13
- prefab-1.1.7.dist-info/RECORD,,
File without changes