Skip to content

parametric.rectangular_spiral

rectangular_spiral(
*,
port_spec: Annotated[str | photonforge.PortSpec, _] | None = None,
turns: Annotated[int, minimum=2] | None = None,
radius: Annotated[float, exclusiveMinimum=0, units='μm'] | None = None,
separation: Annotated[float, minimum=0, units='μm'] | None = None,
size: Annotated[
collections.abc.Sequence[Annotated[float, minimum=0, units='μm']],
maxItems=2,
minItems=2,
]
| None = None,
full_length: Annotated[float, exclusiveMinimum=0, units='μm'] = None,
align_ports: Literal['', 'x', 'y'] | None = None,
technology: photonforge.Technology | None = None,
name: str | None = None,
model: photonforge.Model | None = None,
straight_kwargs: Annotated[dict[str, Any], _] | None = None,
bend_kwargs: Annotated[dict[str, Any], _] | None = None,
) -> photonforge.Component

Rectangular spiral.

Args

  • port_spec: Port specification describing waveguide cross-section.
  • turns: Number of turns in each of the 2 spiral arms.
  • radius: Bend radius for the spiral turns.
  • separation: Distance between waveguide centers in parallel sections. If None, defaults to the port width.
  • size: Spiral dimensions measured from the waveguide centers. If None, defaults to (0, 0).
  • full_length: Desired spiral length. If set to a positive value, ‘turns’ and ‘size[1]’ are calculated automatically.
  • align_ports: Optionally align ports to have centers with same "x" or "y" coordinates.
  • technology: Component technology. If None, the default technology is used.
  • name: Component name.
  • model: Model to be used with this component. If None a CircuitModel is used.
  • straight_kwargs: Dictionary of keyword arguments for straight.
  • bend_kwargs: Dictionary of keyword arguments for bend.

Returns

Component with path sections, ports and model.

Note

The full length of the spiral can be computed with the route_length function.

Example

>>> # Compact spiral
>>> component1 = pf.parametric.rectangular_spiral(
... port_spec="Strip", radius=5, turns=7, bend_kwargs={"euler_fraction": 0.5}
... )
>>> # Horizontally aligned ports
>>> component2 = pf.parametric.rectangular_spiral(
... port_spec="Strip",
... radius=5,
... turns=7,
... align_ports="y",
... bend_kwargs={"euler_fraction": 0.5},
... )
>>> # Vertically aligned ports, predefined length, bulging straight sections
>>> component3 = pf.parametric.rectangular_spiral(
... port_spec="Strip",
... radius=5,
... full_length=500,
... size=(75, 0),
... align_ports="x",
... bend_kwargs={"euler_fraction": 0.5},
... straight_kwargs={
... "bulge_width": 0.7,
... "bulge_taper_length": 10,
... "bulge_margin": 2,
... },
... )
>>> layout = pf.Component().add(
... pf.Reference(component1),
... pf.Reference(component2, (40, 0)),
... pf.Reference(component3, (1, -35)),
... )

rectangular_spiral