ArrayCopy
A single copy in an arrayed Instance.
Produced by Instance.copies() and iteration over
an Instance. Exposes the copy's grid position, its world-space
transform, and a port(name) helper for retrieving the transformed
port of this specific copy.
ArrayCopy is a lightweight view over its parent instance — it
does not add geometry or a GDS reference when constructed. The parent
AREF is the only thing written to the output. This lets you attach
per-copy labels, compute per-copy routing endpoints, or build
side-channel metadata (netlists, measurement scripts) without bloating
the GDS with columns * rows extra SREFs.
# 8x8 photodiode array: one AREF in the GDS, per-copy metadata in Python.
pds = pd_cell.array(8, 8, 50.0, 50.0)
top.add_ref(pds)
netlist = []
for copy in pds.copies():
netlist.append({
"name": f"PD_{copy.col}_{copy.row}",
"anode": copy.port("A").position,
"cathode": copy.port("K").position,
})Attributes
attributecolintGrid column of this copy (0-indexed).
attributerowintGrid row of this copy (0-indexed).
attributetransformTransformWorld-space transform of this copy. The outer transform of the parent
Instance composed with the local copy offset. Applying it to the
parent cell's local coordinates gives world-space coordinates for
this copy specifically.
attributepositionPointWorld-space position of the copy's anchor (its local origin).
Equivalent to copy.transform.apply(Point.origin()).
attributecellCellThe underlying cell definition (shared with the parent Instance).
attributecell_namestrName of the referenced cell.
Methods
funcport(name) -> PortGet the transformed port of this specific copy.
Both position and direction are transformed into world space.
Equivalent to parent.port(name, col=self.col, row=self.row).
Example
# Ring bank with per-ring labels.
bank = ring_cell.array(8, 1, 30.0, 0.0)
top.add_ref(bank)
for copy in bank.copies():
top.add_text(
f"R{copy.col}",
copy.port("in").position,
layer=Layer(10, 0),
)paramnamestrName of the port to retrieve.
Returns
PortThe port with position and direction transformed into world space.