text
stringlengths
10
968k
id
stringlengths
14
122
metadata
dict
__index_level_0__
int64
0
242
from autosweep.instruments import abs_instr from autosweep.instruments.coms import visa_coms class DiConGP600X1(abs_instr.AbsInstrument): """ Driver written by John McMaster This is a very versatile instrument However, limit to scope assuming we are in an "X1" configuration Most commands are from ...
autosweep/autosweep/instruments/optical/DiConGP600.py/0
{ "file_path": "autosweep/autosweep/instruments/optical/DiConGP600.py", "repo_id": "autosweep", "token_count": 3166 }
1
import csv import typing import zipfile import orjson from autosweep.utils import typing_ext def json_serializer(obj: typing.Any) -> str | dict: """ A serializer to use with orjson for specific package types. :param obj: The instance to serialize :type obj: typing.Any :return: The serialized ve...
autosweep/autosweep/utils/io.py/0
{ "file_path": "autosweep/autosweep/utils/io.py", "repo_id": "autosweep", "token_count": 1058 }
2
["o1","LEFT"] ["o2","LEFT"] ["o3","LEFT"] ["o4","RIGHT"] ("o1","mode 1",1,"o1",1,"transmission") (500, 3) 1.8737028625000000e+14 1.2614023556242892e-04 3.1170206635171840e+00 1.8749545010187041e+14 1.1763432354236221e-04 3.5338841757522452e+00 1.8762061395374081e+14 1.1860798199248208e-04 3.9717813198159631e+00 1.87745...
gdsfactory-test-data/sp/coupler_ring_6637a3d3.dat/0
{ "file_path": "gdsfactory-test-data/sp/coupler_ring_6637a3d3.dat", "repo_id": "gdsfactory-test-data", "token_count": 295557 }
3
settings: {} compute_time_seconds: 607.3835384845734
gdsfactory-test-data/sp/fiber_99914b93.yml/0
{ "file_path": "gdsfactory-test-data/sp/fiber_99914b93.yml", "repo_id": "gdsfactory-test-data", "token_count": 21 }
4
is_3d: false fiber_angle_deg: 7 compute_time_seconds: 113.31639671325684 compute_time_minutes: 1.888606611887614
gdsfactory-test-data/sp/grating_coupler_ellipti_3efea4b2_32f0fbcb.yml/0
{ "file_path": "gdsfactory-test-data/sp/grating_coupler_ellipti_3efea4b2_32f0fbcb.yml", "repo_id": "gdsfactory-test-data", "token_count": 50 }
5
is_3d: false fiber_angle_deg: 20 fiber_xoffset: -5 compute_time_seconds: 167.7715072631836 compute_time_minutes: 2.7961917877197267
gdsfactory-test-data/sp/grating_coupler_ellipti_3efea4b2_788cfce3.yml/0
{ "file_path": "gdsfactory-test-data/sp/grating_coupler_ellipti_3efea4b2_788cfce3.yml", "repo_id": "gdsfactory-test-data", "token_count": 58 }
6
is_3d: false fiber_angle_deg: 5 compute_time_seconds: 42.86380743980408 compute_time_minutes: 0.7143967906634013
gdsfactory-test-data/sp/grating_coupler_ellipti_3efea4b2_cbcef604.yml/0
{ "file_path": "gdsfactory-test-data/sp/grating_coupler_ellipti_3efea4b2_cbcef604.yml", "repo_id": "gdsfactory-test-data", "token_count": 50 }
7
is_3d: false fiber_angle_deg: 5 fiber_xoffset: 0 compute_time_seconds: 123.70191931724548 compute_time_minutes: 2.0616986552874246
gdsfactory-test-data/sp/grating_coupler_ellipti_9d85a0c6_0f18714c.yml/0
{ "file_path": "gdsfactory-test-data/sp/grating_coupler_ellipti_9d85a0c6_0f18714c.yml", "repo_id": "gdsfactory-test-data", "token_count": 58 }
8
is_3d: false fiber_angle_deg: 7 compute_time_seconds: 80.622878074646 compute_time_minutes: 1.3437146345774333
gdsfactory-test-data/sp/grating_coupler_ellipti_9d85a0c6_32f0fbcb.yml/0
{ "file_path": "gdsfactory-test-data/sp/grating_coupler_ellipti_9d85a0c6_32f0fbcb.yml", "repo_id": "gdsfactory-test-data", "token_count": 50 }
9
is_3d: false fiber_angle_deg: -5 fiber_xoffset: 2 compute_time_seconds: 60.57618832588196 compute_time_minutes: 1.0096031387646993
gdsfactory-test-data/sp/grating_coupler_ellipti_9d85a0c6_4a573e0f.yml/0
{ "file_path": "gdsfactory-test-data/sp/grating_coupler_ellipti_9d85a0c6_4a573e0f.yml", "repo_id": "gdsfactory-test-data", "token_count": 58 }
10
is_3d: false fiber_angle_deg: 8 fiber_xoffset: 5 compute_time_seconds: 48.19657254219055 compute_time_minutes: 0.8032762090365092
gdsfactory-test-data/sp/grating_coupler_ellipti_9d85a0c6_98c0c783.yml/0
{ "file_path": "gdsfactory-test-data/sp/grating_coupler_ellipti_9d85a0c6_98c0c783.yml", "repo_id": "gdsfactory-test-data", "token_count": 58 }
11
is_3d: false fiber_angle_deg: -20 fiber_xoffset: -5 compute_time_seconds: 72.88541293144226 compute_time_minutes: 1.2147568821907044
gdsfactory-test-data/sp/grating_coupler_ellipti_9d85a0c6_b734eda2.yml/0
{ "file_path": "gdsfactory-test-data/sp/grating_coupler_ellipti_9d85a0c6_b734eda2.yml", "repo_id": "gdsfactory-test-data", "token_count": 60 }
12
is_3d: false fiber_angle_deg: 5 compute_time_seconds: 42.50316381454468 compute_time_minutes: 0.7083860635757446
gdsfactory-test-data/sp/grating_coupler_ellipti_9d85a0c6_cbcef604.yml/0
{ "file_path": "gdsfactory-test-data/sp/grating_coupler_ellipti_9d85a0c6_cbcef604.yml", "repo_id": "gdsfactory-test-data", "token_count": 49 }
13
is_3d: false fiber_angle_deg: 6 fiber_xoffset: -5 compute_time_seconds: 94.66612124443054 compute_time_minutes: 1.5777686874071757
gdsfactory-test-data/sp/grating_coupler_ellipti_9d85a0c6_e56dc97c.yml/0
{ "file_path": "gdsfactory-test-data/sp/grating_coupler_ellipti_9d85a0c6_e56dc97c.yml", "repo_id": "gdsfactory-test-data", "token_count": 59 }
14
is_3d: false fiber_angle_deg: 20 fiber_xoffset: 5 compute_time_seconds: 96.15773224830627 compute_time_minutes: 1.6026288708051046
gdsfactory-test-data/sp/grating_coupler_ellipti_da2e2127_1107a179.yml/0
{ "file_path": "gdsfactory-test-data/sp/grating_coupler_ellipti_da2e2127_1107a179.yml", "repo_id": "gdsfactory-test-data", "token_count": 58 }
15
is_3d: false fiber_angle_deg: -15 fiber_xoffset: 0 compute_time_seconds: 73.09218430519104 compute_time_minutes: 1.218203071753184
gdsfactory-test-data/sp/grating_coupler_ellipti_da2e2127_404e6a5b.yml/0
{ "file_path": "gdsfactory-test-data/sp/grating_coupler_ellipti_da2e2127_404e6a5b.yml", "repo_id": "gdsfactory-test-data", "token_count": 58 }
16
is_3d: false fiber_angle_deg: -5 fiber_xoffset: -2 compute_time_seconds: 73.99770331382751 compute_time_minutes: 1.2332950552304587
gdsfactory-test-data/sp/grating_coupler_ellipti_da2e2127_7a4591bc.yml/0
{ "file_path": "gdsfactory-test-data/sp/grating_coupler_ellipti_da2e2127_7a4591bc.yml", "repo_id": "gdsfactory-test-data", "token_count": 60 }
17
is_3d: false fiber_angle_deg: 15 fiber_xoffset: 0 compute_time_seconds: 86.29018688201904 compute_time_minutes: 1.438169781366984
gdsfactory-test-data/sp/grating_coupler_ellipti_da2e2127_b120d291.yml/0
{ "file_path": "gdsfactory-test-data/sp/grating_coupler_ellipti_da2e2127_b120d291.yml", "repo_id": "gdsfactory-test-data", "token_count": 57 }
18
is_3d: false fiber_angle_deg: 20 fiber_xoffset: 10 compute_time_seconds: 99.02565741539001 compute_time_minutes: 1.6504276235898336
gdsfactory-test-data/sp/grating_coupler_ellipti_da2e2127_c8d7ebdd.yml/0
{ "file_path": "gdsfactory-test-data/sp/grating_coupler_ellipti_da2e2127_c8d7ebdd.yml", "repo_id": "gdsfactory-test-data", "token_count": 58 }
19
import json import pathlib import yaml if __name__ == "__main__": cwd = pathlib.Path(__file__).parent.absolute() # print(list(cwd.glob('*/*.dat'))) # print(list(cwd.glob('*/*.json'))) # for p in cwd.glob("*/*.json"): # p.rename(p.parent / (p.stem + "_220.json")) # for p in cwd.glob("*/*...
gdsfactory-test-data/sp/json_to_yaml.py/0
{ "file_path": "gdsfactory-test-data/sp/json_to_yaml.py", "repo_id": "gdsfactory-test-data", "token_count": 370 }
20
compute_time_seconds: 73.16070818901062 compute_time_minutes: 1.2193451364835104
gdsfactory-test-data/sp/mmi1x2_4785e9c9229033a9d6baf845d3090893.yml/0
{ "file_path": "gdsfactory-test-data/sp/mmi1x2_4785e9c9229033a9d6baf845d3090893.yml", "repo_id": "gdsfactory-test-data", "token_count": 34 }
21
wavelength_start: 1.4 wavelength_stop: 1.7 compute_time_seconds: 7.674464464187622 compute_time_minutes: 0.1279077410697937
gdsfactory-test-data/sp/mmi1x2_71153a6a.yml/0
{ "file_path": "gdsfactory-test-data/sp/mmi1x2_71153a6a.yml", "repo_id": "gdsfactory-test-data", "token_count": 54 }
22
compute_time_seconds: 126.27846097946167 compute_time_minutes: 2.104641016324361
gdsfactory-test-data/sp/mmi1x2_c3ff7345.yml/0
{ "file_path": "gdsfactory-test-data/sp/mmi1x2_c3ff7345.yml", "repo_id": "gdsfactory-test-data", "token_count": 33 }
23
["E0",""] ["E1",""] ["W0",""] ["W1",""] ("E0","mode 1",1,"E0",1,"transmission") (500, 3) 1.4989622900000000e+14 5.9840276059119339e-02 2.7004213310661993e+00 1.5019662224448897e+14 7.0189865003591881e-02 3.1584735344073249e+00 1.5049701548897797e+14 5.6680896589938239e-02 3.6549600589684652e+00 1.5079740873346694e+14 2...
gdsfactory-test-data/sp/mmi2x2_d41d8cd9_si220n.dat/0
{ "file_path": "gdsfactory-test-data/sp/mmi2x2_d41d8cd9_si220n.dat", "repo_id": "gdsfactory-test-data", "token_count": 295829 }
24
compute_time_seconds: 84.84299373626709 compute_time_minutes: 1.4140498956044516
gdsfactory-test-data/sp/straight_0437acf8_44de1dda.yml/0
{ "file_path": "gdsfactory-test-data/sp/straight_0437acf8_44de1dda.yml", "repo_id": "gdsfactory-test-data", "token_count": 34 }
25
compute_time_seconds: 37.599217653274536 compute_time_minutes: 0.6266536275545757
gdsfactory-test-data/sp/straight_length2p110000_b5b2ce7b_c3ff7345.yml/0
{ "file_path": "gdsfactory-test-data/sp/straight_length2p110000_b5b2ce7b_c3ff7345.yml", "repo_id": "gdsfactory-test-data", "token_count": 34 }
26
resolution: 30 port_symmetries: {} wavelength_start: 1.5 wavelength_stop: 1.6 wavelength_points: 50 port_margin: 2 port_monitor_offset: -0.1 port_source_offset: -0.1 dispersive: false ymargin_top: 3.0 ymargin_bot: 3.0 xmargin_left: 0 xmargin_right: 0 layer_stack: core: layer: - 1 - 0 thickness: 0.22 ...
gdsfactory-test-data/sp/straight_length3p1_b2b0cf23.yml/0
{ "file_path": "gdsfactory-test-data/sp/straight_length3p1_b2b0cf23.yml", "repo_id": "gdsfactory-test-data", "token_count": 1145 }
27
Routing API =================================================================================================== .. currentmodule:: gdsfactory.routing single route ----------------- .. autosummary:: :toctree: _autosummary/ get_route get_route_from_steps route_quad route_sharp bundle route ----------...
gdsfactory/docs/api_routing.rst/0
{ "file_path": "gdsfactory/docs/api_routing.rst", "repo_id": "gdsfactory", "token_count": 813 }
28
from __future__ import annotations from gdsfactory.cell import cell from gdsfactory.component import Component from gdsfactory.component_layout import _parse_layer from gdsfactory.generic_tech import LAYER from gdsfactory.geometry.functions import polygon_grow from gdsfactory.typings import Layers @cell def add_keep...
gdsfactory/gdsfactory/add_keepout.py/0
{ "file_path": "gdsfactory/gdsfactory/add_keepout.py", "repo_id": "gdsfactory", "token_count": 758 }
29
from __future__ import annotations import gdsfactory as gf from gdsfactory.component import Component from gdsfactory.typings import LayerSpec @gf.cell def L( width: int | float = 1, size: tuple[int, int] = (10, 20), layer: LayerSpec = "MTOP", port_type: str = "electrical", ) -> Component: """Gen...
gdsfactory/gdsfactory/components/L.py/0
{ "file_path": "gdsfactory/gdsfactory/components/L.py", "repo_id": "gdsfactory", "token_count": 534 }
30
from __future__ import annotations import numpy as np from numpy import ndarray import gdsfactory as gf from gdsfactory.component import Component from gdsfactory.config import ErrorType from gdsfactory.geometry.functions import angles_deg, curvature, path_length, snap_angle from gdsfactory.typings import ( Coord...
gdsfactory/gdsfactory/components/bezier.py/0
{ "file_path": "gdsfactory/gdsfactory/components/bezier.py", "repo_id": "gdsfactory", "token_count": 2012 }
31
from __future__ import annotations from collections import Counter import gdsfactory as gf from gdsfactory.component import Component from gdsfactory.typings import ComponentSpec class SequenceGenerator: def __init__( self, start_sequence: str = "IL", repeated_sequence: str = "ASASBSBS",...
gdsfactory/gdsfactory/components/component_sequence.py/0
{ "file_path": "gdsfactory/gdsfactory/components/component_sequence.py", "repo_id": "gdsfactory", "token_count": 3025 }
32
from __future__ import annotations import warnings import numpy as np import gdsfactory as gf from gdsfactory.component import Component from gdsfactory.typings import ComponentSpec, CrossSectionSpec diagram = """ | length0 | length1 | >---------| | bend180.length...
gdsfactory/gdsfactory/components/delay_snake2.py/0
{ "file_path": "gdsfactory/gdsfactory/components/delay_snake2.py", "repo_id": "gdsfactory", "token_count": 1522 }
33
"""Straight Ge photodetector.""" from __future__ import annotations from functools import partial import gdsfactory as gf from gdsfactory.component import Component from gdsfactory.components.taper import taper as taper_func from gdsfactory.components.via_stack import via_stack_slab_m2, via_stack_slab_m3 from gdsfac...
gdsfactory/gdsfactory/components/ge_detector_straight_si_contacts.py/0
{ "file_path": "gdsfactory/gdsfactory/components/ge_detector_straight_si_contacts.py", "repo_id": "gdsfactory", "token_count": 1279 }
34
from __future__ import annotations from itertools import chain from math import ceil, floor import gdsfactory as gf from gdsfactory.component import Component from gdsfactory.typings import LayerSpec @gf.cell def interdigital_capacitor( fingers: int = 4, finger_length: float | int = 20.0, finger_gap: fl...
gdsfactory/gdsfactory/components/interdigital_capacitor.py/0
{ "file_path": "gdsfactory/gdsfactory/components/interdigital_capacitor.py", "repo_id": "gdsfactory", "token_count": 1723 }
35
from __future__ import annotations from functools import partial from gdsfactory.cell import cell from gdsfactory.component import Component from gdsfactory.components.bend_euler import bend_euler from gdsfactory.components.mmi1x2 import mmi1x2 from gdsfactory.components.mzi_arm import mzi_arm from gdsfactory.compone...
gdsfactory/gdsfactory/components/mzi_arms.py/0
{ "file_path": "gdsfactory/gdsfactory/components/mzi_arms.py", "repo_id": "gdsfactory", "token_count": 2852 }
36
from __future__ import annotations from functools import partial import numpy as np from gdsfactory.cell import cell from gdsfactory.component import Component from gdsfactory.components.circle import circle from gdsfactory.components.compass import compass from gdsfactory.typings import Ints, LayerSpec @cell def ...
gdsfactory/gdsfactory/components/rectangle.py/0
{ "file_path": "gdsfactory/gdsfactory/components/rectangle.py", "repo_id": "gdsfactory", "token_count": 1778 }
37
from __future__ import annotations import gdsfactory as gf from gdsfactory.component import Component from gdsfactory.components.bend_circular import bend_circular from gdsfactory.components.bend_euler import bend_euler from gdsfactory.components.straight import straight from gdsfactory.typings import ComponentSpec, C...
gdsfactory/gdsfactory/components/ring_single_bend_coupler.py/0
{ "file_path": "gdsfactory/gdsfactory/components/ring_single_bend_coupler.py", "repo_id": "gdsfactory", "token_count": 2917 }
38
from __future__ import annotations from functools import partial import gdsfactory as gf from gdsfactory.component import Component from gdsfactory.components.via import via from gdsfactory.components.via_stack import via_stack from gdsfactory.cross_section import Section from gdsfactory.typings import ComponentSpec,...
gdsfactory/gdsfactory/components/straight_heater_meander_doped.py/0
{ "file_path": "gdsfactory/gdsfactory/components/straight_heater_meander_doped.py", "repo_id": "gdsfactory", "token_count": 4038 }
39
from __future__ import annotations from functools import partial from gdsfactory.cell import cell from gdsfactory.component import Component from gdsfactory.typings import LayerSpec, LayerSpecs @cell def triangle( x: float = 10, xtop: float = 0, y: float = 20, ybot: float = 0, layer: LayerSpec =...
gdsfactory/gdsfactory/components/triangles.py/0
{ "file_path": "gdsfactory/gdsfactory/components/triangles.py", "repo_id": "gdsfactory", "token_count": 1652 }
40
"""GDS regression test. Inspired by lytest.""" import filecmp import pathlib import shutil import gdsfactory as gf from gdsfactory.config import CONF, PATH, logger from gdsfactory.name import clean_name class GeometryDifference(Exception): pass PathType = pathlib.Path | str def diff( ref_file: PathType,...
gdsfactory/gdsfactory/difftest.py/0
{ "file_path": "gdsfactory/gdsfactory/difftest.py", "repo_id": "gdsfactory", "token_count": 5612 }
41
"""write xsection script for KLayout plugin. https://gdsfactory.github.io/klayout_pyxs/DocGrow.html """ from __future__ import annotations import pathlib from gdsfactory.generic_tech import LAYER nm = 1e-3 def layer_to_string(layer: tuple[int, int]) -> str: return f"{layer[0]}/{layer[1]}" def get_klayout_...
gdsfactory/gdsfactory/generic_tech/get_klayout_pyxs.py/0
{ "file_path": "gdsfactory/gdsfactory/generic_tech/get_klayout_pyxs.py", "repo_id": "gdsfactory", "token_count": 4254 }
42
#================================ # ----- GENERAL CONNECTIONS ----- #================================ logger.info('Starting GENERIC TECH LVS connectivity setup (Inter-layer)') # Inter-layer connect(np, viac) connect(pp, viac) connect(viac, m1) connect(m1, via1) connect(via1, m2) connect(m2, via2) connect(via2, m3) #...
gdsfactory/gdsfactory/generic_tech/klayout/lvs/rule_decks/general_connections.lvs/0
{ "file_path": "gdsfactory/gdsfactory/generic_tech/klayout/lvs/rule_decks/general_connections.lvs", "repo_id": "gdsfactory", "token_count": 182 }
43
####################### # cross-section settings script for Klayout using generic layer map # https://sourceforge.net/p/xsectionklayout/wiki/MainPage/ # Download the ruby module here: http://sourceforge.net/p/xsectionklayout/code/HEAD/tree/trunk/src/xsection.rbm?format=raw # Copy xsection.lym to the installation path o...
gdsfactory/gdsfactory/generic_tech/klayout/xsection/xsection_generic.pyxs/0
{ "file_path": "gdsfactory/gdsfactory/generic_tech/klayout/xsection/xsection_generic.pyxs", "repo_id": "gdsfactory", "token_count": 1841 }
44
import numpy as np import gdsfactory as gf from gdsfactory.typings import ComponentSpec, LayerSpec @gf.cell def layer_priority( component: ComponentSpec, layer_high_order: LayerSpec, layer_low_order: LayerSpec, remove_high_order: bool = False, **kwargs, ) -> gf.Component: """Returns new compo...
gdsfactory/gdsfactory/geometry/layer_priority.py/0
{ "file_path": "gdsfactory/gdsfactory/geometry/layer_priority.py", "repo_id": "gdsfactory", "token_count": 1667 }
45
"""Add label YAML.""" from __future__ import annotations import json from functools import partial from typing import Any from omegaconf import OmegaConf import gdsfactory as gf from gdsfactory.serialization import clean_dict from gdsfactory.typings import LayerSpec @gf.cell_with_child def add_label_yaml( com...
gdsfactory/gdsfactory/labels/add_label_yaml.py/0
{ "file_path": "gdsfactory/gdsfactory/labels/add_label_yaml.py", "repo_id": "gdsfactory", "token_count": 2172 }
46
from __future__ import annotations from gdsfactory.read.from_dphox import from_dphox from gdsfactory.read.from_gdspaths import from_gdsdir, from_gdspaths from gdsfactory.read.from_np import from_image, from_np from gdsfactory.read.from_phidl import from_gdstk, from_phidl from gdsfactory.read.from_updk import from_updk...
gdsfactory/gdsfactory/read/__init__.py/0
{ "file_path": "gdsfactory/gdsfactory/read/__init__.py", "repo_id": "gdsfactory", "token_count": 342 }
47
from __future__ import annotations from collections.abc import Callable import gdsfactory as gf from gdsfactory.component import Component from gdsfactory.components.pad import pad_rectangular from gdsfactory.components.straight_heater_metal import straight_heater_metal from gdsfactory.port import select_ports_electr...
gdsfactory/gdsfactory/routing/add_pads.py/0
{ "file_path": "gdsfactory/gdsfactory/routing/add_pads.py", "repo_id": "gdsfactory", "token_count": 4025 }
48
from __future__ import annotations from collections.abc import Iterable from functools import partial import numpy as np import gdsfactory as gf from gdsfactory.components.bend_euler import bend_euler from gdsfactory.components.straight import straight from gdsfactory.components.taper import taper from gdsfactory.co...
gdsfactory/gdsfactory/routing/get_route_from_steps.py/0
{ "file_path": "gdsfactory/gdsfactory/routing/get_route_from_steps.py", "repo_id": "gdsfactory", "token_count": 3602 }
49
"""You can add pins in a pin layer to clearly see the component ports.""" from __future__ import annotations import gdsfactory as gf from gdsfactory.typings import LayerSpec @gf.cell(post_process=(gf.add_pins.add_pins,)) def straight_narrow( length: float = 5.0, width: float = 0.3, layer: LayerSpec = (2, 0) ) -...
gdsfactory/gdsfactory/samples/01_component_pcell_with_pins.py/0
{ "file_path": "gdsfactory/gdsfactory/samples/01_component_pcell_with_pins.py", "repo_id": "gdsfactory", "token_count": 370 }
50
from __future__ import annotations import gdsfactory as gf yaml = """ name: mmis instances: mmi1: component: mmi1x2 mmi2: component: mmi1x2 placements: mmi2: port: o2 x: mmi1,o2 dy: -0.625 mirror: True """ if __name__ == "__main__": c = gf.read.fro...
gdsfactory/gdsfactory/samples/19_references.py/0
{ "file_path": "gdsfactory/gdsfactory/samples/19_references.py", "repo_id": "gdsfactory", "token_count": 193 }
51
instances: mmi_long: component: mmi1x2 settings: width_mmi: 4.5 length_mmi: 10 mmi_short: component: mmi1x2 settings: width_mmi: 4.5 length_mmi: 5 placements: mmi_long: rotation: 190 x: 100 y: 100 routes: optical: routing_strategy: get_bundle_all_angle ...
gdsfactory/gdsfactory/samples/all_angle_routing/aar_basic_01.pic.yml/0
{ "file_path": "gdsfactory/gdsfactory/samples/all_angle_routing/aar_basic_01.pic.yml", "repo_id": "gdsfactory", "token_count": 300 }
52
pdk: ubcpdk instances: mzi1: component: mzi_ubcpdk settings: dy: -600 mzi2: component: mzi_ubcpdk settings: dy: -500 gc1: component: gc_te1550 gc2: component: gc_te1550 placements: mzi2: ymax: mzi1,north dy: 100 xmin: mzi1,east dx: 50 gc1: xmax: ...
gdsfactory/gdsfactory/samples/demo/circuits/mzi_lattice_filter.pic.yml/0
{ "file_path": "gdsfactory/gdsfactory/samples/demo/circuits/mzi_lattice_filter.pic.yml", "repo_id": "gdsfactory", "token_count": 353 }
53
"""FabC example.""" from __future__ import annotations import sys from functools import partial from pydantic import BaseModel import gdsfactory as gf from gdsfactory.add_pins import add_pins_inside1nm as _add_pins_inside1nm from gdsfactory.cross_section import get_cross_sections, strip from gdsfactory.get_factorie...
gdsfactory/gdsfactory/samples/pdk/fab_c.py/0
{ "file_path": "gdsfactory/gdsfactory/samples/pdk/fab_c.py", "repo_id": "gdsfactory", "token_count": 2246 }
54
function: bend_euler_so info: dy: 10.0 length: 16.637 radius: 10.0 radius_min: 7.061 route_info_length: 16.637 route_info_n_bend_90: 1.0 route_info_type: xs_28722cff route_info_weight: 16.637 route_info_xs_28722cff_length: 16.637 width: 0.4 module: gdsfactory.samples.pdk.fab_c name: bend_euler_so se...
gdsfactory/gdsfactory/samples/pdk/test_fab_c/test_settings_bend_euler_so_.yml/0
{ "file_path": "gdsfactory/gdsfactory/samples/pdk/test_fab_c/test_settings_bend_euler_so_.yml", "repo_id": "gdsfactory", "token_count": 295 }
55
function: straight_no info: length: 10.0 route_info_length: 10.0 route_info_type: xs_dbcb4311 route_info_weight: 10.0 route_info_xs_dbcb4311_length: 10.0 width: 0.9 module: gdsfactory.samples.pdk.fab_c name: straight_no settings: cross_section: function: cross_section module: gdsfactory.cross_sect...
gdsfactory/gdsfactory/samples/pdk/test_fab_c/test_settings_straight_no_.yml/0
{ "file_path": "gdsfactory/gdsfactory/samples/pdk/test_fab_c/test_settings_straight_no_.yml", "repo_id": "gdsfactory", "token_count": 245 }
56
"""A GDS layer is a tuple of two integers. You can maintain LayerViews in YAML (.yaml) or Klayout XML file (.lyp) """ from __future__ import annotations import os import pathlib import re import typing import warnings import xml.etree.ElementTree as ET import numpy as np import yaml from omegaconf import OmegaConf...
gdsfactory/gdsfactory/technology/layer_views.py/0
{ "file_path": "gdsfactory/gdsfactory/technology/layer_views.py", "repo_id": "gdsfactory", "token_count": 20294 }
57
<jupyter_start><jupyter_text>Components with hierarchyYou can define component parametric cells (waveguides, bends, couplers) as functions with basic input parameters (width, length, radius ...) and use them as arguments for composing more complex functions.<jupyter_code>from functools import partial import toolz impo...
gdsfactory/notebooks/04_components_hierarchy.ipynb/0
{ "file_path": "gdsfactory/notebooks/04_components_hierarchy.ipynb", "repo_id": "gdsfactory", "token_count": 2019 }
58
<jupyter_start><jupyter_text>Python introgdsfactory is written in python and requires some basic knowledge of python.If you are new to python you can find many resources online- [books](https://jakevdp.github.io/PythonDataScienceHandbook/index.html)- [youTube videos](https://www.youtube.com/c/anthonywritescode)- [cours...
gdsfactory/notebooks/_0_python.ipynb/0
{ "file_path": "gdsfactory/notebooks/_0_python.ipynb", "repo_id": "gdsfactory", "token_count": 2085 }
59
default_settings: n_bundle: value: 3 description: "The number of routes in the bundle" instances: {% for i in range(n_bundle) %} wg_start_{{ i }}: component: straight wg_end_{{ i }}: component: straight {% endfor %} obstacle1: component: rectangle settings: layer: ...
gdsfactory/notebooks/yaml_pics/aar_bundles01.pic.yml/0
{ "file_path": "gdsfactory/notebooks/yaml_pics/aar_bundles01.pic.yml", "repo_id": "gdsfactory", "token_count": 795 }
60
function: _from_yaml info: {} module: gdsfactory.read.from_yaml name: component_yaml_ports_d68fa3aa settings: conf: instances: mmi_bot: component: compass settings: port_type: None size: - 13.5 - 7 name: component_yaml_ports ports: o1: ...
gdsfactory/test-data-regression/test_component_from_yaml_ports.yml/0
{ "file_path": "gdsfactory/test-data-regression/test_component_from_yaml_ports.yml", "repo_id": "gdsfactory", "token_count": 927 }
61
0: 88.274 1: 93.274
gdsfactory/test-data-regression/test_get_bundle_from_waypoints_staggered.yml/0
{ "file_path": "gdsfactory/test-data-regression/test_get_bundle_from_waypoints_staggered.yml", "repo_id": "gdsfactory", "token_count": 12 }
62
function: '' info: {} module: '' name: straight_container_2d36ef1e settings: {}
gdsfactory/test-data-regression/test_import_ports_center.yml/0
{ "file_path": "gdsfactory/test-data-regression/test_import_ports_center.yml", "repo_id": "gdsfactory", "token_count": 29 }
63
connections: b,o1: s,o2 instances: b: component: bend_circular info: dy: 10.0 length: 15.708 radius: 10.0 route_info_length: 15.708 route_info_n_bend_90: 1.0 route_info_type: xs_sc route_info_weight: 15.708 route_info_xs_sc_length: 15.708 settings: a...
gdsfactory/test-data-regression/test_netlists_sample_mirror_simple_.yml/0
{ "file_path": "gdsfactory/test-data-regression/test_netlists_sample_mirror_simple_.yml", "repo_id": "gdsfactory", "token_count": 562 }
64
function: aar_slalom info: {} module: yaml_jinja name: aar_slalom settings: {}
gdsfactory/test-data-regression/test_settings_aar_slalom_.yml/0
{ "file_path": "gdsfactory/test-data-regression/test_settings_aar_slalom_.yml", "repo_id": "gdsfactory", "token_count": 34 }
65
function: add_pads0 info: resistance: 0 module: test_add_pads name: add_pads0 settings: {}
gdsfactory/test-data-regression/test_settings_add_pads0_.yml/0
{ "file_path": "gdsfactory/test-data-regression/test_settings_add_pads0_.yml", "repo_id": "gdsfactory", "token_count": 37 }
66
function: bend_circular_heater info: dx: 10.0 dy: 10.0 length: 15.708 module: gdsfactory.components.bend_circular_heater name: bend_circular_heater settings: angle: 90 cross_section: xs_sc heater_to_wg_distance: 1.2 heater_width: 0.5 layer_heater: HEATER npoints: null radius: null
gdsfactory/test-data-regression/test_settings_bend_circular_heater_.yml/0
{ "file_path": "gdsfactory/test-data-regression/test_settings_bend_circular_heater_.yml", "repo_id": "gdsfactory", "token_count": 124 }
67
function: circle info: {} module: gdsfactory.components.circle name: circle settings: angle_resolution: 2.5 layer: WG radius: 10.0
gdsfactory/test-data-regression/test_settings_circle_.yml/0
{ "file_path": "gdsfactory/test-data-regression/test_settings_circle_.yml", "repo_id": "gdsfactory", "token_count": 49 }
68
function: coupler_bend info: {} module: gdsfactory.components.ring_single_bend_coupler name: coupler_bend settings: bend: function: bend_circular coupler_gap: 0.2 coupling_angle_coverage: 120.0 cross_section_inner: xs_sc cross_section_outer: xs_sc radius: 10.0
gdsfactory/test-data-regression/test_settings_coupler_bend_.yml/0
{ "file_path": "gdsfactory/test-data-regression/test_settings_coupler_bend_.yml", "repo_id": "gdsfactory", "token_count": 111 }
69
function: cutback_bend180 info: n_bends: 82 module: gdsfactory.components.cutback_bend name: cutback_bend180 settings: cols: 6 component: function: bend_euler module: gdsfactory.components.bend_euler settings: angle: 180 rows: 6 spacing: 3 straight: function: straight straight_length...
gdsfactory/test-data-regression/test_settings_cutback_bend180_.yml/0
{ "file_path": "gdsfactory/test-data-regression/test_settings_cutback_bend180_.yml", "repo_id": "gdsfactory", "token_count": 132 }
70
function: die_bbox info: area: 3380000.0 module: gdsfactory.components.die_bbox name: rectangle_die_bbox settings: component: function: rectangle module: gdsfactory.components.rectangle settings: size: - 1300 - 2600 die_name: null layer: MTOP padding: 10.0 street_length: null ...
gdsfactory/test-data-regression/test_settings_die_bbox_.yml/0
{ "file_path": "gdsfactory/test-data-regression/test_settings_die_bbox_.yml", "repo_id": "gdsfactory", "token_count": 155 }
71
function: grating_coupler_elliptical info: polarization: te wavelength: 1.554 module: gdsfactory.components.grating_coupler_elliptical name: grating_coupler_elliptical settings: big_last_tooth: false cross_section: xs_sc fiber_angle: 15.0 grating_line_width: 0.343 layer_slab: SLAB150 n_periods: 30 ncl...
gdsfactory/test-data-regression/test_settings_grating_coupler_elliptical_.yml/0
{ "file_path": "gdsfactory/test-data-regression/test_settings_grating_coupler_elliptical_.yml", "repo_id": "gdsfactory", "token_count": 198 }
72
function: greek_cross info: {} module: gdsfactory.components.greek_cross name: greek_cross settings: layers: - WG - N length: 30 offsets: null via_stack: function: via_stack module: gdsfactory.components.via_stack settings: layers: - WG - NPP - M1 vias: - null...
gdsfactory/test-data-regression/test_settings_greek_cross_.yml/0
{ "file_path": "gdsfactory/test-data-regression/test_settings_greek_cross_.yml", "repo_id": "gdsfactory", "token_count": 227 }
73
name: rectangle_11b0bf80 ports: e1: center: - -5.2 - 0.0 layer: - 204 - 0 name: e1 orientation: 180.0 port_type: electrical shear_angle: null width: 10.4 e2: center: - 0.0 - 5.2 layer: - 204 - 0 name: e2 orientation: 90.0 port_type: ele...
gdsfactory/test-data-regression/test_settings_marker_tm_.yml/0
{ "file_path": "gdsfactory/test-data-regression/test_settings_marker_tm_.yml", "repo_id": "gdsfactory", "token_count": 690 }
74
function: mzi_pads_center info: {} module: gdsfactory.components.mzi_pads_center name: mzi_pads_center settings: cross_section: xs_sc cross_section_metal: xs_metal_routing delta_length: 40.0 length_x: 500 length_y: 40 min_straight_length: 5.0 mzi: function: mzi mzi_gnd_bot: bot_r_e2 mzi_gnd_top: t...
gdsfactory/test-data-regression/test_settings_mzi_pads_center_.yml/0
{ "file_path": "gdsfactory/test-data-regression/test_settings_mzi_pads_center_.yml", "repo_id": "gdsfactory", "token_count": 426 }
75
function: ring info: {} module: gdsfactory.components.ring name: ring settings: angle: 360 angle_resolution: 2.5 layer: WG radius: 10.0 width: 0.5
gdsfactory/test-data-regression/test_settings_ring_.yml/0
{ "file_path": "gdsfactory/test-data-regression/test_settings_ring_.yml", "repo_id": "gdsfactory", "token_count": 61 }
76
function: straight_heater_meander info: {} module: gdsfactory.components.straight_heater_meander name: straight_heater_meander_f9764d28 settings: bend: function: bend_euler cross_section: function: cross_section module: gdsfactory.cross_section settings: radius: 10 radius_min: 5 extens...
gdsfactory/test-data-regression/test_settings_spiral_meander_.yml/0
{ "file_path": "gdsfactory/test-data-regression/test_settings_spiral_meander_.yml", "repo_id": "gdsfactory", "token_count": 304 }
77
function: taper_from_csv info: {} module: gdsfactory.components.taper_from_csv name: taper_from_csv settings: cross_section: xs_sc filepath: taper_strip_0p5_3_36
gdsfactory/test-data-regression/test_settings_taper_from_csv_.yml/0
{ "file_path": "gdsfactory/test-data-regression/test_settings_taper_from_csv_.yml", "repo_id": "gdsfactory", "token_count": 69 }
78
function: text_rectangular_multi_layer info: {} module: gdsfactory.components.text_rectangular name: text_rectangular_multi_layer settings: layers: - WG - M1 - M2 - MTOP text: abcd text_factory: function: text_rectangular
gdsfactory/test-data-regression/test_settings_text_rectangular_multi_layer_.yml/0
{ "file_path": "gdsfactory/test-data-regression/test_settings_text_rectangular_multi_layer_.yml", "repo_id": "gdsfactory", "token_count": 91 }
79
function: via_stack_corner45 info: layer: MTOP module: gdsfactory.components.via_stack name: via_stack_corner45 settings: correct_size: true layer_offsets: null layer_port: null layers: - M1 - M2 - MTOP vias: - function: via module: gdsfactory.components.via settings: enclosure: 2 ...
gdsfactory/test-data-regression/test_settings_via_stack_corner45_.yml/0
{ "file_path": "gdsfactory/test-data-regression/test_settings_via_stack_corner45_.yml", "repo_id": "gdsfactory", "token_count": 186 }
80
function: _from_yaml info: {} module: gdsfactory.read.from_yaml name: yaml_anchor_8731fb27 settings: conf: instances: mmi_long: component: mmi1x2 settings: length_mmi: 10 width_mmi: 4.5 mmi_short: component: mmi1x2 settings: length_mmi: 5 ...
gdsfactory/test-data-regression/test_settings_yaml_anchor_.yml/0
{ "file_path": "gdsfactory/test-data-regression/test_settings_yaml_anchor_.yml", "repo_id": "gdsfactory", "token_count": 756 }
81
from __future__ import annotations import numpy as np import gdsfactory as gf def test_get_bundle_path_length_matching() -> None: dy = 2000.0 xs1 = [-500, -300, -100, -90, -80, -55, -35, 200, 210, 240, 500, 650] pitch = 100.0 N = len(xs1) xs2 = [-20 + i * pitch for i in range(N)] a1 = 90 ...
gdsfactory/tests/routing/test_routing_get_bundle_path_length_matching.py/0
{ "file_path": "gdsfactory/tests/routing/test_routing_get_bundle_path_length_matching.py", "repo_id": "gdsfactory", "token_count": 1218 }
82
from __future__ import annotations import pytest from pytest_regressions.data_regression import DataRegressionFixture import gdsfactory as gf from gdsfactory.component import Component from gdsfactory.difftest import difftest @gf.cell def add_pads0() -> Component: c = gf.components.straight_heater_metal(length=...
gdsfactory/tests/test_add_pads.py/0
{ "file_path": "gdsfactory/tests/test_add_pads.py", "repo_id": "gdsfactory", "token_count": 381 }
83
from __future__ import annotations import os import pickle import gdsfactory as gf def ports_are_equal(port1, port2) -> bool: return ( port1.x == port2.x and port1.y == port2.y and port1.width == port2.width and port1.orientation == port2.orientation and port1.layer == po...
gdsfactory/tests/test_component_pickle.py/0
{ "file_path": "gdsfactory/tests/test_component_pickle.py", "repo_id": "gdsfactory", "token_count": 720 }
84
from __future__ import annotations import gdsfactory as gf def test_extract() -> None: xs = gf.cross_section.strip( width=0.5, bbox_layers=[(111, 0)], bbox_offsets=[3], ) c = gf.components.straight( length=11.124, cross_section=xs, ) c = gf.add_pins.add_pi...
gdsfactory/tests/test_extract.py/0
{ "file_path": "gdsfactory/tests/test_extract.py", "repo_id": "gdsfactory", "token_count": 461 }
85
from __future__ import annotations import gdsfactory as gf from gdsfactory.component import Component @gf.cell def component_with_label_float() -> Component: c = gf.Component("component_with_label_float") _ = c << gf.components.rectangle() c.add_label(text="demo", position=(0.0, 0.0), layer=(66, 0)) ...
gdsfactory/tests/test_label_in_component_move.py/0
{ "file_path": "gdsfactory/tests/test_label_in_component_move.py", "repo_id": "gdsfactory", "token_count": 411 }
86
from __future__ import annotations from functools import partial import gdsfactory as gf def test_partial_cross_section() -> None: strip200 = partial(gf.cross_section.strip, width=0.2) strip400 = partial(gf.cross_section.strip, width=0.4) c200 = gf.components.straight(cross_section=strip200) c400 = ...
gdsfactory/tests/test_partial_cross_section.py/0
{ "file_path": "gdsfactory/tests/test_partial_cross_section.py", "repo_id": "gdsfactory", "token_count": 208 }
87
from __future__ import annotations import numpy as np import gdsfactory as gf @gf.cell def rectangles3() -> gf.Component: c = gf.Component() c << gf.c.rectangle(size=(4, 4), layer=(1, 0)) c << gf.c.rectangle(size=(4, 4), layer=(2, 0)) c.distribute() return c def test_remove_layers() -> None: ...
gdsfactory/tests/test_remove_layers.py/0
{ "file_path": "gdsfactory/tests/test_remove_layers.py", "repo_id": "gdsfactory", "token_count": 378 }
88
import gdsfactory as gf from gf180.layers import layer from gf180.via_generator import via_generator @gf.cell def cap_mim( mim_option: str = "A", metal_level: str = "M4", lc: float = 2, wc: float = 2, label: bool = False, top_label: str = "", bot_label: str = "", ) -> gf.Component: ""...
gf180/gf180/cap_mim.py/0
{ "file_path": "gf180/gf180/cap_mim.py", "repo_id": "gf180", "token_count": 2092 }
89
# Copyright 2022 GlobalFoundries PDK Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
gf180/gf180/cells/klayout/pymacros/cells/cap_mos.py/0
{ "file_path": "gf180/gf180/cells/klayout/pymacros/cells/cap_mos.py", "repo_id": "gf180", "token_count": 6139 }
90
"""Store configuration.""" __all__ = ["PATH"] import pathlib home = pathlib.Path.home() cwd = pathlib.Path.cwd() cwd_config = cwd / "config.yml" home_config = home / ".config" / "gf180.yml" config_dir = home / ".config" config_dir.mkdir(exist_ok=True) module_path = pathlib.Path(__file__).parent.absolute() repo_path...
gf180/gf180/config.py/0
{ "file_path": "gf180/gf180/config.py", "repo_id": "gf180", "token_count": 231 }
91
function: alter_interdig info: {} module: gf180.fet name: alter_interdig settings: g_label: null label: false nf: 1 nl: 1 pat: '' patt_label: false pc1: function: array module: gdsfactory.components.array_component settings: component: function: rectangle module: gdsfacto...
gf180/tests/test_components/test_pdk_settings_alter_interdig_.yml/0
{ "file_path": "gf180/tests/test_components/test_pdk_settings_alter_interdig_.yml", "repo_id": "gf180", "token_count": 393 }
92
function: pcmpgr_gen info: {} module: gf180.guardring name: pcmpgr_gen settings: dn_rect: function: rectangle module: gdsfactory.components.rectangle settings: layer: - 12 - 0 grw: 0.36
gf180/tests/test_components/test_pdk_settings_pcmpgr_gen_.yml/0
{ "file_path": "gf180/tests/test_components/test_pdk_settings_pcmpgr_gen_.yml", "repo_id": "gf180", "token_count": 100 }
93
# Circuit simulators Frequency circuit simulators solve the Sparameters of a circuit that connects several components, each of which is described by its Sparameters. ![sparameters](https://i.imgur.com/RSOTDIN.png) You can use 3 circuit simulators: 1. SAX (open source). Based on Google's Machine learning library JAX...
gplugins/docs/plugins_circuits.md/0
{ "file_path": "gplugins/docs/plugins_circuits.md", "repo_id": "gplugins", "token_count": 113 }
94
from __future__ import annotations import asyncio import io import sys from collections.abc import Awaitable, Coroutine from contextlib import nullcontext from pathlib import Path from typing import Any, TypeVar T = TypeVar("T") async def handle_return( in_stream: asyncio.streams.StreamReader, out_stream: i...
gplugins/gplugins/common/utils/async_helpers.py/0
{ "file_path": "gplugins/gplugins/common/utils/async_helpers.py", "repo_id": "gplugins", "token_count": 1962 }
95
run: dagit -f workflow.py
gplugins/gplugins/dagster/Makefile/0
{ "file_path": "gplugins/gplugins/dagster/Makefile", "repo_id": "gplugins", "token_count": 12 }
96
from typing import Any import gdsfactory as gf import jax.numpy as jnp from gdsfactory.component import Component from gdsfactory.technology import LayerStack from pjz._field import SimParams, scatter from gplugins.fdtdz.get_epsilon_fdtdz import ( component_to_epsilon_pjz, material_name_to_fdtdz, ) from gplug...
gplugins/gplugins/fdtdz/get_sparameters_fdtdz.py/0
{ "file_path": "gplugins/gplugins/fdtdz/get_sparameters_fdtdz.py", "repo_id": "gplugins", "token_count": 2848 }
97
from __future__ import annotations from pathlib import Path import klayout.db as pya from gdsfactory.component import Component def check_duplicated_cells(gdspath: Path | str): """Reads cell and checks for duplicated cells. klayout will fail to load the layout if it finds any duplicated cells. Args: ...
gplugins/gplugins/klayout/drc/check_duplicated_cells.py/0
{ "file_path": "gplugins/gplugins/klayout/drc/check_duplicated_cells.py", "repo_id": "gplugins", "token_count": 192 }
98
from __future__ import annotations import gdsfactory as gf import numpy as np import pytest from gdsfactory.component import Component from gplugins.klayout.drc.check_exclusion import check_exclusion @gf.cell def exclusion( space: float, width: float = 0.5, layer1: tuple[int, int] = (1, 0), layer2: ...
gplugins/gplugins/klayout/tests/test_drc_exclusion.py/0
{ "file_path": "gplugins/gplugins/klayout/tests/test_drc_exclusion.py", "repo_id": "gplugins", "token_count": 388 }
99
from pint import UnitRegistry from gplugins.materials.optical.optical_mat import OpticalMaterial from gplugins.materials.semiconductor.semiconductor_mat import ( SemiconductorMaterial, ) class Si: def __init__(self, ureg=None) -> None: """Default silicon parameters.""" # Instantiate (default)...
gplugins/gplugins/materials/inorganic.py/0
{ "file_path": "gplugins/gplugins/materials/inorganic.py", "repo_id": "gplugins", "token_count": 716 }
100