Phidl

Latest version: v1.7.2

Safety actively analyzes 681866 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 7 of 9

0.8.1

New features
- New function `pg.extract()` which extracts all the polygons from a set of specified layers from a Device, and creates a new Device with those polygons in them. See [tutorial](https://github.com/amccaugh/phidl/blob/master/phidl/phidl_tutorial_example.py) for details
- New Device-copying functions `pg.copy()` and `pg.deepcopy()` which allows you to copy a Device wholesale (very useful if you want to flatten() a Device but not destroy the original). `pg.copy` maintains the underlying connections & references to other Devices, while `pg.deepcopy` creates completely new copies of every underlying polygon and reference. See [tutorial](https://github.com/amccaugh/phidl/blob/master/phidl/phidl_tutorial_example.py) for details
- Introduced an LRU cache for computationally-intensive Device-making functions. By using the `device_lru_cache` decorator, any function which returns a Device can be memoized. See [tutorial](https://github.com/amccaugh/phidl/blob/master/phidl/phidl_tutorial_example.py) for more details

Changes
- Since the `extract()` process creates new geometry, `D.extract()` has been removed in favor of placing it in the geometry library `pg.extract()`
- `pg.import_gds` default argument is now `flatten = False`
- Updated [tutorial](https://github.com/amccaugh/phidl/blob/master/phidl/phidl_tutorial_example.py) text

Bugfixes
- Fixed port deepcopy bug, should result in large performance enhancement for Devices with lots of sub-references and ports
- Fixed some rare errors with D.flatten()
- Some internal changes to make working with Device.uid easier

0.8.0

New features
- `pg.import_gds()` can now import without flattening all the polygons to a single layer
- Added `Device.flatten()` function to flatten references into raw polygons. See [tutorial](https://github.com/amccaugh/phidl/blob/master/phidl/phidl_tutorial_example.py) for details
- Added `Device.remove()` function to remove geometry. See [tutorial](https://github.com/amccaugh/phidl/blob/master/phidl/phidl_tutorial_example.py) for details
- Added more informative error messages
- `__repr__` and `__str__` implemented for Device & DeviceReference: You can now quickly get useful information about a Device by just typing the variable into the console. For instance entering `D` or `print(D)` into the Python console will print `Device (name "Myshape003191", ports ['R_center', 'bottom', 'input'], aliases ['hello'], 13 elements, 13 references)`

Changes
- Using a config dictionary as a specification is no longer done with `Device(device_function, config = myconfig)`. Now it is done with an explicit function, `make_device(device_function, config = myconfig)` (importable as `import phidl.make_device`). See the [tutorial](https://github.com/amccaugh/phidl/blob/master/phidl/phidl_tutorial_example.py) for more info
- `Device.meta` is now being replaced with `Device.info` for clarity of nomenclature. `Device.meta` will still work but will issue a warning.
- `Device.annotate()` is now being replaced with `Device.label()` to be more consistent with GDS naming conventions. `Device.annotate()` will still work but will issue a warning.

Bugfixes
- Made compatible with gdspy >= 1.2
- Specified names for phidl.geometry objects

0.7.1

New features
- Updated [tutorial](https://github.com/amccaugh/phidl/blob/master/phidl/phidl_tutorial_example.py) text

Changes
- Large changes to pg.import_gds(). If your GDS file only has one toplevel cell, you do not need to specify a cellname, pg.import_gds() will automatically grab that cell. Also, it imports all layers by default now, although you can still choose which layers and even create a layer mapping based on whether you pass the `layers` argument a list or dict. See tutorial for more information.

Bugfixes
- Many small ones under the hood

0.7.0

New features
- Updated tutorial text significantly
- Added import_gds() function! You can now import existing GDS files and use them in your geometry. Try adding premade organization logos and hand-drawn test structures without having to code them from scratch. See tutorial for full explanation.
- Added ``overlap`` keyword argument to the connect() function. Now when connecting two ports together, you can force them to overlap. See tutorial for full explanation.
- Added point_path() function to phidl.routing. It takes a width value and list of points and and will create path of constant width which follows the list of points.

Changes
- Text scaling has been changed to be more sensible; now pg.text('abc', size = 100) will produce letters 100 units tall (previously would produce text 125 units tall).

Bugfixes
- Many small ones under the hood

0.6.5

New features
- Added pg.boolean() to perform AND/NOT/OR/XOR operations on shapes
- Added pg.outline() to create outlines of shapes, useful for positive-tone resist processes

Changes
- Switched development to Python 3. Python 2 will still be supported going forward however
- The function to expand/contract polygons pg.inset() has been deprecated in favor of the more aptly-named pg.offset(). pg.offset(D, distance = -1) will contract the shapes in D, pg.offset(D, distance = 1) will expand them.

Bugfixes
- Fixes necessary to make compatible with Python 3
- Fixed pg.connector() midpoint argument
- Compatibility fixes to make compatible with gdspy>=1.1.2

0.6.4

New features
- Added "quickplot2", a more robust/easier to use viewer which instead of being based on matplotlib is based Qt.
- Zoom/scroll uses same buttons as KLayout
- Toggle labels for ports/aliases with F1, F2, F3
- Reset view with Escape key

Page 7 of 9

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.