fdtdx.GDSLayerSpec#

class fdtdx.GDSLayerSpec(gds_layer, material_name, thickness, gds_datatype=0, z_base=0.0, name=None, etch_by=(), sidewall_angle=90.0, reference_plane='bottom', subpixel_smoothing=False, subpixel_full_tensor=False, fill_supersample=8, color=Color(r=0.8470588235294118, g=0.8627450980392157, b=0.8392156862745098))[source]#

Bases: object

Specification for a single GDS layer to be imported as a simulation object.

Quick Reference#

Attributes

Methods

Attributes#

GDSLayerSpec.color: Color | None = Color(r=0.8470588235294118, g=0.8627450980392157, b=0.8392156862745098)#
GDSLayerSpec.etch_by: tuple[tuple[int, int], ...] = ()#

Tuple of (layer, datatype) pairs whose polygons are subtracted from this layer via a boolean NOT operation before voxelization. Useful for etched features such as via holes.

GDSLayerSpec.fill_supersample: int = 8#

Number of sub-samples per axis used to estimate the in-plane fill fraction when subpixel_smoothing is on. See fill_supersample.

GDSLayerSpec.gds_datatype: int = 0#

GDS datatype number (default 0).

GDSLayerSpec.name: str | None = None#

Optional name for the resulting object. Auto-generates "gds_{layer}_{datatype}" if None.

GDSLayerSpec.reference_plane: Literal['bottom', 'middle', 'top'] = 'bottom'#

Which face keeps the nominal polygon footprint when sidewall_angle != 90. "bottom" (default) keeps the base footprint and tapers the top inward for an angle < 90; "top" keeps the top footprint; "middle" keeps the mid-height footprint and splits the taper symmetrically. Mirrors PolySlab.reference_plane.

GDSLayerSpec.sidewall_angle: float = 90.0#

Sidewall angle in degrees, measured between the sidewall and the substrate plane, the way foundry PDKs specify it. 90.0 (default) is a perfectly vertical wall. An angle < 90 tilts the wall so the cross-section shrinks toward the top (regular trapezoid / positive-resist etch, e.g. 89 deg); an angle > 90 makes it grow toward the top (re-entrant / undercut profile). Must satisfy 0 < sidewall_angle < 180. (Relation to the Tidy3D PolySlab convention: polyslab_angle_rad = deg2rad(90 - sidewall_angle).)

Note

For sidewall_angle != 90 the binary voxelization (GDSLayerObject.get_voxel_mask_for_shape()) staircases the trapezoidal profile on the z-grid: each z-slice is eroded/dilated to a whole number of cells, so the wall is approximated by discrete steps rather than a continuous slope. Enabling subpixel_smoothing removes this staircasing: the fill fraction is then computed per z-slice on the laterally offset footprint, giving a sub-cell-accurate slanted face whose interface normal tilts with the wall (issue #373).

GDSLayerSpec.subpixel_full_tensor: bool = False#

Keep the full 9-component smoothing tensor (accurate for tilted sidewalls, ~3x heavier) instead of the default cheap 3-component diagonal. See subpixel_full_tensor.

GDSLayerSpec.subpixel_smoothing: bool = False#

Enable sub-pixel dielectric smoothing for this layer (see subpixel_smoothing). When True the layer is voxelised with an analytic fill fraction (supersampled footprint x fractional z-coverage of the top/bottom faces) and the assembler builds a 2nd-order-accurate anisotropic effective permittivity at the interface cells. Removes the staircasing of both the in-plane polygon edges and the horizontal layer faces on the Yee grid. Defaults to a cheap 3-component diagonal tensor (exact for axis-aligned interfaces); set subpixel_full_tensor for the full 9-component tensor.

GDSLayerSpec.z_base: float = 0.0#

Distance from the simulation volume bottom face to the base of this layer, in metres.

GDSLayerSpec.gds_layer: int#

GDS layer number.

GDSLayerSpec.material_name: str#

Key into the materials dictionary to use for this layer.

GDSLayerSpec.thickness: float#

Layer thickness in metres.

Methods#

If you find any errors in the documentation, please report them in the Github Issues!