gdsfactory.read.import_gds

Contents

gdsfactory.read.import_gds#

gdsfactory.read.import_gds(gdspath: str | Path, cellname: str | None = None, gdsdir: str | Path | None = None, read_metadata: bool = False, read_metadata_json: bool = False, keep_name_short: bool = False, unique_names: bool = False, max_name_length: int = 250, post_process: Callable[[...], None] | None = None, **kwargs) Component[source]#

Returns a Component from a GDS file.

appends $ with a number to the name if the cell name is on CACHE

Parameters:
  • gdspath – path of GDS file.

  • cellname – cell of the name to import. None imports top cell.

  • gdsdir – optional GDS directory.

  • read_metadata – loads metadata (ports, settings) if it exists in YAML format.

  • read_metadata_json – loads metadata (ports, settings) if it exists in JSON format.

  • keep_name_short – appends a hash to a shortened component name.

  • unique_names – appends $ with a number to the name if the cell name is on CACHE. This avoids name collisions when importing multiple times the same cell name.

  • max_name_length – maximum length of the name.

  • post_process – function to post process the component after importing.

  • kwargs – extra to add to component.info (polarization, wavelength …).