Phidl Versions Save

Python GDS layout and CAD geometry creation

1.7.1

3 weeks ago

1.7.1 (April 26, 2024)

New features

  • Allow Device.get_ports() to be used with arrays
  • Allow setting num_cpu in the new pg.kl_boolean(), pg.kl_offset, pg.kl_invert() functions. Global defaults for the number of CPU to be used can be set with e.g. phidl.config["NUM_CPU"] = 8
  • Added pg.flatten() convenience function. This is identical to Device.flatten() but instead of modifying the geometry in-place, returns a flattened copy (thanks Bas Nijholt @basnijholt)
  • Fixed an issue from gdspy where property keys are incorrectly interpreted as signed integers when importing GDS files using import_gds() (thanks Bas Nijholt @basnijholt)

Bugfixes

  • Fixed rare problem with mew pg.kl_invert() function when tile_size was too small

1.7.0

1 month ago

1.7.0 (April 9, 2024)

Major optimization update!

New features

  • New KLayout-based boolean/offset/outline functions! These are under the name pg.kl_boolean(), pg.kl_offset, etc. They utilize the excellent KLayout tile processor, which allows breaking down & parallelizing these operations--in a nutshell, these operations should be much, much faster.
  • Added D.simplify(), which allows you to significantly reduce memory usage of a geometry by discarding unnecessarily-precise points from all polygons within a Device. Uses the very robust Ramer–Douglas–Peucker algorithm for simplification.
  • Now pg.gridsweep() allows param_x or param_y to be integers, which creates copies of the same parameters in the x or y direction.

Bugfixes

  • 20x speedup to the internal operation _merge_nearby_floating_points() which should significantly speed up large operations (thanks Alex Tait @atait)
  • New pre-commit using ruff (thanks Bas Nijholt @basnijholt)
  • Grammar fix to documentation (thanks Ashish Panigrahi @paniash)

1.6.4

9 months ago

1.6.4 (July 20, 2023)

New features

  • Optimized/vectorized point rotation, speeding up the rotate() operation by as much as 150x(!) (thanks Bas Nijholt @basnijholt)
  • Added proper pg.fill_rectangle() examples and documentation

Bugfixes

  • Fixed pg.grid() to allow for empty shape parameter (thanks Samuel Gyger @gyger)
  • Allow pg.grid() spacing to be a single integer (thanks Samuel Gyger @gyger)
  • Fix to np.bool

1.6.3

1 year ago

1.6.3 (Feb 9, 2023)

Bugfixes

  • Fixed error in pg.euler() and pp.smooth() for edge case of nearly-colinear points
  • Specify certain numpy arrays as object to avoid numpy deprecation (thanks Bas Nijholt @basnijholt and Samuel Gyger @gyger)
  • Corrected docstring for pg.union() as it does not accept lists of Devices (improvement for future, thanks Samuel Gyger @gyger)

1.6.2

1 year ago

1.6.2 (July 25, 2022)

New features

  • Addition of pg.snspd_candelabra() which creates an optimally-rounded SNSPD with low current crowding and arbtitrarily-high fill factor (thanks Dileep Reddy @dileepvr)
  • Lazy loading of matplotlib, allowing loading the base phidl libraries much faster (thanks Joaquin Matres @joamatab)

Changes

  • Modification to pg.boolean() s othat OR/union will merge all shapes within one Device, even if the second Device is None (thanks Stijn Balk @sbalk)

Bugfixes

  • Modifying the parent of a DeviceReference now correctly updates the reference cell (thanks Joaquin Matres @joamatab)
  • Fix bug in pg.outline() when distance < 0 (thanks @yoshi74ls181)
  • GDS path objects now copy over when using pg.import_gds() (thanks Bas Nijholt @basnijholt)
  • Preserve Polygon.properties and DeviceReference.properties when saving and loading (thanks Bas Nijholt @basnijholt)
  • D.remove_layers() works also with GDS path objects (thanks Joaquin Matres @joamatab)

1.6.1

2 years ago

1.6.1 (April 7, 2022)

New features

  • Re-added Device.get_info() that gathers the Device.info dictionaries from every sub-Device and returns them in a list. Useful for collecting information about every Device in a layout
  • Updated documentation

Changes

  • Deprecated Python 2
  • Removal of 1023-character limit for labels (will only show warning instead now)
  • Deprecated reflect() has been fully removed, use mirror() instead

Bugfixes

  • Much code sanitization under the hood (thanks Bas Nijholt @basnijholt)
  • Device.absorb() now preserves labels from the parent component (thanks Joaquin Matres @joamatab)
  • Fixed extrusion error of pp.spiral() caused by overlapping points
  • Bugfix for pg.optimal_step(), now works correctly when start_width == end_width
  • Fixed naming of some previously-unnamed geometries
  • Future-proofing for upcoming Numpy changes
  • Bugfix for CrossSection.extrude() since cross_section parameter renamed to width

1.6.0

2 years ago

1.6.0 (Sept 28, 2021)

New features

  • Huge new routing rewrite for phidl.routing, including automatic manhattan routing with custom cross-sections! See the routing documentation for details. Big thanks to Jeffrey Holzgrafe @jolzgrafe for this contribution
  • Paths can now be used to produce sharp angles, in addition to smooth bends. See the Path documentation

Changes

  • The Path() constructor no longer forces the path to start at (0,0)

Bugfixes

  • Interactive zoom for quickplot() is now disabled by default in Jupyter-type notebooks to avoid strange scrolling behavior. This can be manually changed using set_quickplot_options(interactive_zoom = True)

1.5.2

3 years ago

Hotfix to ensure Python 2 compatibility

1.5.1

3 years ago

1.5.1 (May 19, 2021)

New features

  • New pg.gridsweep() function, allowing for easy creation of parameter sweeps on a grid. See the documentation for details.

phidl example image

  • New tutorial on layers
  • Can now define layer to be None to prevent creation of polygons
  • Added pg.litho_ruler() for creation of lithographic rulers/measurement

1.5.0

3 years ago

1.5.0 (April 19, 2021)

New features

  • Better interactive windows for quickplot()! Now you can use the mousewheel/trackpad scroll to zoom in and out, and right-click or left-click to zoom to a region.
  • Added blocking option for quickplot() (thanks @giumc)

Changes

  • Quickplot options (such as displaying ports, subports, or aliases) are now set using set_quickplot_options()

Bugfixes

  • Fix for Path function smooth(), which broke when sequential waypoints were co-linear (thanks @giumc)
  • Fix for non-C-continguous arrays in hash_geometry() (thanks Joaquin Matres @joamatab)