Skip to content

LayerSpec

LayerSpec(
layer,
description,
color=None,
pattern='',
*,
conductive=False,
device_marker=False,
min_width=None,
min_spacing=None,
)

Layer specification.

This class is mainly used to create layers for a Technology.

Args

  • layer (tuple[int, int]): Sequence of 2 integers describing layer and datatype (or texttype) numbers.
  • description (str): Layer description.
  • color (str | tuple[int, int, int] | tuple[int, int, int, int] | None): Layer display color. It can be a string of hexadecimal values in the formats ‘RGBA’ or ‘RRGGBBAA’ (with an optional ’#’ prefix), or a tuple with 3 or 4 non-negative integers for each component. A random color based on layer will be used if set to None. A random variation of a basic color can also be used by when set to ‘red’, ‘orange’, ‘yellow’, ‘green’, ‘cyan’, ‘blue’, ‘purple’, ‘magenta’, ‘gray’, or ‘grey’.
  • pattern (str): Hatch pattern used to display the layer. Must be one of ‘solid’, ‘hollow’, ’\’, ’\\’, ’/’, ’//’, ’-’, ’=’, ‘x’, ‘xx’, ’+’, ’++’, ’.’, ’:’, or "" (random selection).
  • conductive (bool): Whether the layer carries electrical current.
  • device_marker (bool): Whether geometry on the layer marks regions to remove from electrical conductors during connectivity extraction.
  • min_width (float | None): Minimum feature width on this layer. None sets no minimum.
  • min_spacing (float | None): Minimum clearance between features on this layer. None sets no minimum.

Example

>>> layer_spec = pf.LayerSpec((1, 0), "Silicon layer", "blue", "//")

See Also

Layers guide

MethodDescription
copyCreate a copy of this layer specification.

copy(self)

Create a copy of this layer specification.

Returns

LayerSpec: New copy.

AttributeDescription
colorndarray: Layer display color.
conductivebool: Whether the layer carries electrical current.
descriptionstr: LayerSpec description.
device_markerbool: Whether the layer marks regions to remove from electrical conductors.
layertuple[int, int]: Layer and datatype tuple.
min_spacingfloat | None: Minimum clearance between features, or None when the layer sets none.
min_widthfloat | None: Minimum feature width, or None when the layer sets none.
patternstr: Layer display pattern.
propertiesProperties: Object properties.

ndarray: Layer display color.

bool: Whether the layer carries electrical current.

str: LayerSpec description.

bool: Whether the layer marks regions to remove from electrical conductors.

tuple[int, int]: Layer and datatype tuple.

float | None: Minimum clearance between features, or None when the layer sets none.

float | None: Minimum feature width, or None when the layer sets none.

str: Layer display pattern.

Properties: Object properties.