---
title: "ArrayCopy"
description: "A read-only view of one copy in an arrayed Instance."
canonical_url: "https://www.rosette.dev/docs/api-reference/ArrayCopy"
markdown_url: "https://www.rosette.dev/docs/api-reference/ArrayCopy.md"
source_url: "https://github.com/PreFab-Photonics/rosette/blob/f086d7670645fd36c05362d696d442a2b2e74850/www/content/docs/api-reference/ArrayCopy.mdx"
docs_channel: "main"
docs_revision: "f086d7670645fd36c05362d696d442a2b2e74850"
---

# ArrayCopy

A read-only view of one copy in an arrayed [`Instance`](/docs/api-reference/Instance).

Import with `from rosette.layout import ArrayCopy`.

Produced by [`Instance.copy()`](/docs/api-reference/Instance#copy) and
[`Instance.copies()`](/docs/api-reference/Instance#copies). 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 observational, not a competing placement abstraction. It
cannot be added to a `Cell` or transformed into an independent placement;
add its parent `Instance` instead. Creating or iterating these views does not
add geometry or GDS references. The parent AREF is the only placement 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.

```python
# 8x8 photodiode array: one AREF in the GDS, per-copy metadata in Python.
pds = pd_cell.at(0, 0).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



### `col`

```python
col: int
```

Grid column of this copy (0-indexed).





### `row`

```python
row: int
```

Grid row of this copy (0-indexed).





### `transform`

```python
transform: Transform
```

World-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.





### `position`

```python
position: Point
```

World-space position of the copy's anchor (its local origin).

Equivalent to `copy.transform.apply(Point.origin())`.





### `cell`

```python
cell: Cell
```

The underlying cell definition (shared with the parent `Instance`).



## Methods



### `__init__`

```python
__init__(instance, col, row) -> None
```

Create a read-only view for one array position.



- **`instance`** (`Instance`)

  Parent arrayed instance.





- **`col`** (`int`)

  Zero-based column index.





- **`row`** (`int`)

  Zero-based row index.





**Returns:** `None`





### `port`

```python
port(name) -> Port
```

Get the transformed port of this specific copy.

Both position and direction are transformed into world space.



> **Example**
>
> ```python
> # Ring bank with per-ring labels.
> bank = ring_cell.at(0, 0).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),
>     )
> ```





- **`name`** (`str`)

  Name of the port to retrieve.





**Returns:** `Port`

The port with position and direction transformed into world space.