ubcpdk.cells.pack_doe#
- ubcpdk.cells.pack_doe(doe, settings, do_permutations=False, function=None, **kwargs)[source]#
Packs a component DOE (Design of Experiment) using pack.
- Parameters:
doe (str | Callable[[...], Component] | dict[str, Any] | DKCell) – function to return Components.
settings (dict[str, tuple[Any, ...]]) – component settings.
do_permutations (bool) – for each setting.
function (str | Callable[[...], Component] | dict[str, Any] | None) – to apply (add padding, grating couplers).
kwargs – for pack.
- Keyword Arguments:
spacing – Minimum distance between adjacent shapes.
aspect_ratio – (width, height) ratio of the rectangular bin.
max_size – Limits the size into which the shapes will be packed.
sort_by_area – Pre-sorts the shapes by area.
density – Values closer to 1 pack tighter but require more computation.
precision – Desired precision for rounding vertex coordinates.
text – Optional function to add text labels.
text_prefix – for labels. For example. ‘A’ for ‘A1’, ‘A2’…
text_offsets – relative to component size info anchor. Defaults to center.
text_anchors – relative to component (ce cw nc ne nw sc se sw center cc).
name_prefix – for each packed component (avoids the Unnamed cells warning). Note that the suffix contains a uuid so the name will not be deterministic.
rotation – for each component in degrees.
h_mirror – horizontal mirror in y axis (x, 1) (1, 0). This is the most common.
v_mirror – vertical mirror using x axis (1, y) (0, y).
- Return type:
Component