legume.gds.generate_gds_raster

legume.gds.generate_gds_raster(lattice, raster, filename, unit=1e-06, tolerance=0.01, cell_bound=True, levels=[0.5])

Traces a rasterization projected onto a lattice to generate a GDS file

Note

The gdspy and scikit-image packages are required for exporting rasterized GDS files.

Parameters:
  • lattice (Lattice) –
  • raster (2D array of floats) –
  • filename (str) –
  • unit (float, optional) – The GDS spatial units. Default is 1e-6, or 1 um.
  • tolerance (float , optional) – The GDS tolerance parameter. Default is 0.01.
  • cell_bound (bool, optional) – Whether a Polygon should be added to define the unit cell boundary. Default is True.
  • levels (List[float], optional) – List of the raster levels to trace with skimage.measure.find_contours. Default is [0.5].