Classes and functions for the visualization of layouts cerated with the gdspy Python module.
Provide a GUI where the layout can be viewed.
The view can be scrolled vertically with the mouse wheel, and horizontally by holding the shift key and using the mouse wheel. Dragging the 2nd mouse button also scrolls the view, and if control is held down, it scrolls 10 times faster.
You can zoom in or out using control plus the mouse wheel, or drag a rectangle on the window with the 1st mouse button to zoom into that area.
A ruler is available by clicking the 1st mouse button anywhere on the view and moving the mouse around. The distance is shown in the status area.
Double-clicking on any polygon gives some information about it.
Layer colors can be changed by double-clicking on the layer list or clicking the 3rd mouse button on any polygon. On the color chooser, clicking cancel will make the selected layer transparent. To change the outline color, use shift + double click on the layer list, or shift + click with the 3rd button on any polygon.
The background color can be changed by clicking on the background with the 3rd mouse button.
Parameters : | cells : array-like
exclude_layers : array-like
width : integer
height : integer
colors : array-like
outlines : array-like
|
---|
Examples
All layers filled (in red, green, and blue) and with light outlines:
>>> LayoutViewer(colors=[(255, 0, 0), (0, 255, 0), (0, 0, 255)],
... outlines=[(192, 192, 192)])
No filling, colored outlines:
>>> LayoutViewer(colors=[None] * 64)
Methods
Rasterize the GDSII elements onto an image buffer that can be saved or edited latter.
Parameters : | colors : array
outlines : array
resolution : number
bounding_box : array-like[4]
|
---|
Methods
Generates an image from each cell and saves them to files.
Parameters : | cells : gdspy.Cell or list
exclude_layers : array-like
image_name : string
image_format : string
colors : array-like
outlines : array-like
resolution : number
bounding_box : array-like[4]
antialias : non-negative integer
|
---|
Examples
>>> colors = [(255,0,0), (0,255,0), (0,0,255)]
>>> gds_image(image_name='/output_folder/layout', colors=colors)
Output a list of cells as a GDSII stream library.
The dimensions actually written on the GDSII file will be the dimensions of the objects created times the ratio unit/precision. For example, if a circle with radius 1.5 is created and we set unit=1.0e-06 (1 um) and precision=1.0e-09 (1 nm), the radius of the circle will be 1.5 um and the GDSII file will contain the dimension 1500 nm.
Parameters : | output : file
cells : array-like
name : string
unit : number
precision : number
|
---|
Examples
>>> out = open('out-file.gds', 'wb')
>>> gdspy.gds_print(out, unit=1.0e-6, precision=1.0e-9)
>>> out.close()