text
stringlengths
10
968k
id
stringlengths
14
122
metadata
dict
__index_level_0__
int64
0
242
is_3d: false fiber_angle_deg: 31 fiber_xoffset: 29 layer_stack: strip: layer: - 1 - 0 thickness: 0.22 zmin: 0.0 material: si sidewall_angle: 0 strip2: layer: - 31 - 0 thickness: 0.22 zmin: 0.0 material: si sidewall_angle: 0 material_name_to_tidy3d: si: 3.47 ...
ubc/sparameters/rotate_f258530e_f918bc72.yml/0
{ "file_path": "ubc/sparameters/rotate_f258530e_f918bc72.yml", "repo_id": "ubc", "token_count": 223 }
183
function: bend_euler_sc 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_sc_devrec route_info_weight: 16.637 route_info_xs_sc_devrec_length: 16.637 width: 0.5 module: ubcpdk.components name: bend_euler_sc settings: {...
ubc/tests/test_components/test_pdk_settings_bend_.yml/0
{ "file_path": "ubc/tests/test_components/test_pdk_settings_bend_.yml", "repo_id": "ubc", "token_count": 147 }
184
name: ebeam_bdc_tm1550 settings: {} version: 0.0.1
ubc/tests/test_components/test_pdk_settings_dc_broadband_tm_.yml/0
{ "file_path": "ubc/tests/test_components/test_pdk_settings_dc_broadband_tm_.yml", "repo_id": "ubc", "token_count": 24 }
185
name: ebeam_gc_tm1550 settings: changed: {} child: null default: {} full: {} function_name: ebeam_gc_tm1550 info: library: Design kits/ebeam model: ebeam_gc_tm1550 polarization: tm wavelength: 1.55 info_version: 2 module: ubcpdk.components name: ebeam_gc_tm1550
ubc/tests/test_components/test_pdk_settings_ebeam_gc_tm1550_.yml/0
{ "file_path": "ubc/tests/test_components/test_pdk_settings_ebeam_gc_tm1550_.yml", "repo_id": "ubc", "token_count": 123 }
186
function: gc_te1550_90nmSlab info: library: Design kits/ebeam model: ebeam_gc_te1550_90nmSlab polarization: te wavelength: 1.55 module: ubcpdk.components name: gc_te1550_90nmSlab settings: {}
ubc/tests/test_components/test_pdk_settings_gc_te1550_90nmSlab_.yml/0
{ "file_path": "ubc/tests/test_components/test_pdk_settings_gc_te1550_90nmSlab_.yml", "repo_id": "ubc", "token_count": 82 }
187
function: ring_single_dut info: {} module: gdsfactory.components.ring_single_dut name: ring_single_dut_26538df6 settings: bend: function: bend_euler_sc component: function: ebeam_crossing4_2ports coupler: function: coupler_ring cross_section: xs_sc gap: 0.2 length_x: 4 length_y: 0 port_name:...
ubc/tests/test_components/test_pdk_settings_ring_with_crossing_.yml/0
{ "file_path": "ubc/tests/test_components/test_pdk_settings_ring_with_crossing_.yml", "repo_id": "ubc", "token_count": 161 }
188
connections: {} instances: add_fiber_array_1: component: add_fiber_array info: length: 1.0 route_info_length: 1.0 route_info_type: xs_sc route_info_weight: 1.0 route_info_xs_sc_length: 1.0 width: 0.5 settings: bend: function: bend_euler_sc component:...
ubc/tests/test_netlists/test_netlists_add_fiber_array_.yml/0
{ "file_path": "ubc/tests/test_netlists/test_netlists_add_fiber_array_.yml", "repo_id": "ubc", "token_count": 642 }
189
connections: {} instances: {} name: ebeam_bdc_tm1550 placements: {} ports: {}
ubc/tests/test_netlists/test_netlists_ebeam_bdc_tm1550_.yml/0
{ "file_path": "ubc/tests/test_netlists/test_netlists_ebeam_bdc_tm1550_.yml", "repo_id": "ubc", "token_count": 31 }
190
connections: {} instances: mirror_1: component: mirror info: library: Design kits/ebeam model: ebeam_gc_te1310 settings: component: function: import_gds module: ubcpdk.import_gds settings: gdspath: ebeam_gc_te1310.gds p1: - 0 - 1 ...
ubc/tests/test_netlists/test_netlists_gc_te1310_.yml/0
{ "file_path": "ubc/tests/test_netlists/test_netlists_gc_te1310_.yml", "repo_id": "ubc", "token_count": 254 }
191
connections: bend_euler_sc_1,o1: straight_3,o2 bend_euler_sc_1,o2: straight_1,o2 bend_euler_sc_2,o1: straight_2,o1 bend_euler_sc_2,o2: straight_3,o1 coupler_ring_1,o2: straight_1,o1 coupler_ring_1,o3: straight_2,o2 instances: bend_euler_sc_1: component: bend_euler_sc info: dy: 10.0 len...
ubc/tests/test_netlists/test_netlists_ring_single_.yml/0
{ "file_path": "ubc/tests/test_netlists/test_netlists_ring_single_.yml", "repo_id": "ubc", "token_count": 2491 }
192
"""Cells imported from the PDK.""" from functools import partial import gdsfactory as gf from gdsfactory import Component from gdsfactory.typings import ( Callable, ComponentReference, ComponentSpec, CrossSectionSpec, Label, LayerSpec, List, Optional, Port, Tuple, ) from ubcpdk...
ubc/ubcpdk/components.py/0
{ "file_path": "ubc/ubcpdk/components.py", "repo_id": "ubc", "token_count": 10227 }
193
from functools import partial import gdsfactory as gf from gdsfactory.component import Component from gdsfactory.typings import LayerSpec from numpy import arctan2, degrees, isclose, ndarray from ubcpdk.config import PATH from ubcpdk.tech import LAYER layer = LAYER.WG port_width = 0.5 def guess_port_orientaton(pos...
ubc/ubcpdk/import_gds.py/0
{ "file_path": "ubc/ubcpdk/import_gds.py", "repo_id": "ubc", "token_count": 2710 }
194
from ubcpdk.simulation.circuits.mzi_spectrum import ( mzi_spectrum, ) from ubcpdk.simulation.circuits.waveguide import ( beta, neff, ) __all__ = [ "beta", "mzi_spectrum", "neff", "waveguide", ]
ubc/ubcpdk/simulation/circuits/__init__.py/0
{ "file_path": "ubc/ubcpdk/simulation/circuits/__init__.py", "repo_id": "ubc", "token_count": 105 }
195
install: pre-commit install update-pre: pre-commit autoupdate --bleeding-edge
vscode-gdsfactory/Makefile/0
{ "file_path": "vscode-gdsfactory/Makefile", "repo_id": "vscode-gdsfactory", "token_count": 29 }
196
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> <path fill-rule="evenodd" clip-rule="evenodd" d="M14.4315 3.3232L5.96151 13.3232L5.1708 13.2874L1.8208 8.5174L2.63915 7.94268L5.61697 12.1827L13.6684 2.67688L14.4315 3.3232Z" fill="#C5C5C5"/> </svg>
vscode-gdsfactory/resources/dark/check.svg/0
{ "file_path": "vscode-gdsfactory/resources/dark/check.svg", "repo_id": "vscode-gdsfactory", "token_count": 149 }
197
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> <path fill-rule="evenodd" clip-rule="evenodd" d="M13.086 7L10.6953 4.60156L11.3984 3.89844L15 7.5L11.3984 11.1016L10.6953 10.3984L13.0781 8.01562L13.0785 8H3V7H13.086ZM1 4H2V11H1V4Z" fill="#C5C5C5"/> </svg>
vscode-gdsfactory/resources/dark/export.svg/0
{ "file_path": "vscode-gdsfactory/resources/dark/export.svg", "repo_id": "vscode-gdsfactory", "token_count": 159 }
198
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> <path fill-rule="evenodd" clip-rule="evenodd" d="M15 2V3.66963L10 8.42874V14H6V8.42874L1 3.66963V2H15ZM7 8V13H9V8L14 3.24089V3H2V3.24089L7 8Z" fill="#C5C5C5"/> </svg>
vscode-gdsfactory/resources/dark/filter.svg/0
{ "file_path": "vscode-gdsfactory/resources/dark/filter.svg", "repo_id": "vscode-gdsfactory", "token_count": 139 }
199
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M2 10V9H14V10H2ZM2 6H14V7H2V6ZM14 3V4H2V3H14Z" fill="#C5C5C5"/> <path d="M2 12V13H14V12H2Z" fill="#C5C5C5"/> </svg>
vscode-gdsfactory/resources/dark/list-flat.svg/0
{ "file_path": "vscode-gdsfactory/resources/dark/list-flat.svg", "repo_id": "vscode-gdsfactory", "token_count": 124 }
200
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path fill-rule="evenodd" clip-rule="evenodd" d="M19.5 0V1.5L21 3V22.5L19.5 24H4.5L3 22.5V3L4.5 1.5V0H6V1.5H9V0H10.5V1.5H13.5V0H15V1.5H18V0H19.5ZM4.5 22.5H19.5V3H4.5V22.5ZM7.5 6H16.5V7.5H7.5V6ZM16.5 12H7.5V13.5H16.5V12ZM7.5 ...
vscode-gdsfactory/resources/dark/output.svg/0
{ "file_path": "vscode-gdsfactory/resources/dark/output.svg", "repo_id": "vscode-gdsfactory", "token_count": 237 }
201
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M12 12.23V3.77L13.13 3H14V2H13L12.69 2.09L11.5 2.9L10.28 2.08L10 2H9V3H9.85L11 3.77V12.23L9.87 13H9V14H10L10.31 13.91L11.5 13.1L12.72 13.92L13 14H14V13H13.15L12 12.23Z" fill="#C5C5C5"/> <path d="M1 10.5V5.5L1.5 5H10...
vscode-gdsfactory/resources/dark/rename.svg/0
{ "file_path": "vscode-gdsfactory/resources/dark/rename.svg", "repo_id": "vscode-gdsfactory", "token_count": 328 }
202
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> <path fill-rule="evenodd" clip-rule="evenodd" d="M1 7.19L7.64 13.83H8.36L15 7.19V6.47L11.68 3.15L11.32 3H4.68L4.32 3.15L1 6.47V7.19ZM8 12.75L2.08 6.83L4.89 4H11.11L13.92 6.83L8 12.75ZM8 5.02002H10.69L12.5 6.83002L8 11.23V5.0...
vscode-gdsfactory/resources/dark/ruby.svg/0
{ "file_path": "vscode-gdsfactory/resources/dark/ruby.svg", "repo_id": "vscode-gdsfactory", "token_count": 196 }
203
<?xml version="1.0" encoding="utf-8"?> <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"> <rect x="3" y="3" width="10" height="10" style="fill: #c04040;"/> </svg>
vscode-gdsfactory/resources/dark/stop.svg/0
{ "file_path": "vscode-gdsfactory/resources/dark/stop.svg", "repo_id": "vscode-gdsfactory", "token_count": 88 }
204
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> <path fill-rule="evenodd" clip-rule="evenodd" d="M13.8538 6.99999L8.85384 2H8.14673L3.14673 6.99999L3.85384 7.7071L8.00027 3.56066V14H9.00027V3.56066L13.1467 7.7071L13.8538 6.99999Z" fill="#424242"/> </svg>
vscode-gdsfactory/resources/light/arrow-up.svg/0
{ "file_path": "vscode-gdsfactory/resources/light/arrow-up.svg", "repo_id": "vscode-gdsfactory", "token_count": 149 }
205
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M10.0002 12.6L10.7002 13.3L12.3002 11.7L13.9002 13.3L14.7002 12.6L13.0002 11L14.7002 9.40005L13.9002 8.60005L12.3002 10.3L10.7002 8.60005L10.0002 9.40005L11.6002 11L10.0002 12.6Z" fill="#424242"/> <path d="M1.00024 ...
vscode-gdsfactory/resources/light/clear-all.svg/0
{ "file_path": "vscode-gdsfactory/resources/light/clear-all.svg", "repo_id": "vscode-gdsfactory", "token_count": 340 }
206
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M11.8002 9L10.0002 3H9.00024L7.15825 9.64L5.99024 4.69H5.02024L3.85024 9H1.00024V9.99H4.23024L4.72024 9.62L5.46024 6.92L6.59024 12H7.62024L9.49024 4.96L10.9502 9.64L11.4302 10H15.0002V9H11.8002Z" fill="#424242"/> </...
vscode-gdsfactory/resources/light/pulse.svg/0
{ "file_path": "vscode-gdsfactory/resources/light/pulse.svg", "repo_id": "vscode-gdsfactory", "token_count": 175 }
207
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M15.0002 8H1.00024V7H15.0002V8Z" fill="#424242"/> </svg>
vscode-gdsfactory/resources/light/remove.svg/0
{ "file_path": "vscode-gdsfactory/resources/light/remove.svg", "repo_id": "vscode-gdsfactory", "token_count": 76 }
208
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M14.5002 2H1.50024L1.00024 2.5V13.5L1.50024 14H14.5002L15.0002 13.5V2.5L14.5002 2ZM14.0002 13H2.00024V6H14.0002V13ZM14.0002 5H2.00024V3H14.0002V5Z" fill="#424242"/> </svg>
vscode-gdsfactory/resources/light/window.svg/0
{ "file_path": "vscode-gdsfactory/resources/light/window.svg", "repo_id": "vscode-gdsfactory", "token_count": 147 }
209
from __future__ import annotations import gdsfactory as gf import numpy as np from gdsfactory.add_padding import get_padding_points from gdsfactory.component import Component from gdsfactory.components.wire import wire_corner from gdsfactory.path import euler from gdsfactory.typings import CrossSectionSpec, Optional ...
vtt/gvtt/components/bend_euler.py/0
{ "file_path": "vtt/gvtt/components/bend_euler.py", "repo_id": "vtt", "token_count": 1564 }
210
name: edge_coupler_rib ports: o1: center: - 25.0 - 0.0 layer: - 89 - 0 name: o1 orientation: 0.0 port_type: optical shear_angle: null width: 3.0 settings: changed: {} child: null default: edge_coupling_width: 3.0 polishing_length: 25.0 side: W xpos: 0....
vtt/tests/test_components/test_pdk_settings_edge_coupler_rib_.yml/0
{ "file_path": "vtt/tests/test_components/test_pdk_settings_edge_coupler_rib_.yml", "repo_id": "vtt", "token_count": 286 }
211
import logging import types from pathlib import Path from autosweep.data_types import filereader from autosweep.utils import generics, io, typing_ext class StationConfig(filereader.FileWRer): """ Contains the details of the station configuration, including where to save data and which instruments are present...
autosweep/autosweep/data_types/station_config.py/0
{ "file_path": "autosweep/autosweep/data_types/station_config.py", "repo_id": "autosweep", "token_count": 596 }
0
from autosweep.sweep import io, sweep_parser, vis_utils from autosweep.sweep.io import ( read_json, to_json, ) from autosweep.sweep.sweep_parser import ( Sweep, ) from autosweep.sweep.vis_utils import ( FigHandler, ) __all__ = [ "FigHandler", "Sweep", "io", "read_json", "sweep_parse...
autosweep/autosweep/sweep/__init__.py/0
{ "file_path": "autosweep/autosweep/sweep/__init__.py", "repo_id": "autosweep", "token_count": 163 }
1
from pathlib import Path import numpy as np PathLike = Path | str ListLike = list | tuple | np.ndarray
autosweep/autosweep/utils/typing_ext.py/0
{ "file_path": "autosweep/autosweep/utils/typing_ext.py", "repo_id": "autosweep", "token_count": 33 }
2
<jupyter_start><jupyter_text>Layout tutorial (short)A `Component` is like an empty canvas, where you can add polygons, references to other Components and ports (to connect to other components)In gdsfactory **all dimensions** are in **microns**<jupyter_code>try: import google.colab is_running_on_colab = True !pip ...
gdsfactory-photonics-training/notebooks/10_layout.ipynb/0
{ "file_path": "gdsfactory-photonics-training/notebooks/10_layout.ipynb", "repo_id": "gdsfactory-photonics-training", "token_count": 4301 }
3
["E0",""] ["E1",""] ["W0",""] ["W1",""] ("W0","mode 1",1,"W0",1,"transmission") (500, 3) 1.4989622900000000e+14 3.5163305329390139e-02 -3.1127372926418091e+00 1.5019662224448897e+14 3.4734801032191474e-02 -3.0781814296693408e+00 1.5049701548897797e+14 3.3854340416471965e-02 -3.0445887135749157e+00 1.5079740873346694e+1...
gdsfactory-test-data/sp/coupler/coupler_G224n_L40_S220.dat/0
{ "file_path": "gdsfactory-test-data/sp/coupler/coupler_G224n_L40_S220.dat", "repo_id": "gdsfactory-test-data", "token_count": 296288 }
4
compute_time_seconds: 49.94426488876343 compute_time_minutes: 0.8324044148127238
gdsfactory-test-data/sp/mmi2x2_with_sbend_with__524a2842_c3ff7345.yml/0
{ "file_path": "gdsfactory-test-data/sp/mmi2x2_with_sbend_with__524a2842_c3ff7345.yml", "repo_id": "gdsfactory-test-data", "token_count": 34 }
5
resolution: 30 is_3d: false compute_time_seconds: 3.112635612487793 compute_time_minutes: 0.05187726020812988
gdsfactory-test-data/sp/straight_fba69bc3_8e84f678.yml/0
{ "file_path": "gdsfactory-test-data/sp/straight_fba69bc3_8e84f678.yml", "repo_id": "gdsfactory-test-data", "token_count": 46 }
6
compute_time_seconds: 48.37579584121704 compute_time_minutes: 0.806263264020284
gdsfactory-test-data/sp/straight_length2_c3ff7345.yml/0
{ "file_path": "gdsfactory-test-data/sp/straight_length2_c3ff7345.yml", "repo_id": "gdsfactory-test-data", "token_count": 33 }
7
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/taper_c3e965c2_6f87a42c.yml/0
{ "file_path": "gdsfactory-test-data/sp/taper_c3e965c2_6f87a42c.yml", "repo_id": "gdsfactory-test-data", "token_count": 1095 }
8
wavelength: 1.55 temperature: 25.0 num_modes: 4 cell_length: 0.5 spacing_x: 2.0 center_x: 0 resolution_x: 100 spacing_y: 2.0 center_y: 0 resolution_y: 100 layer_stack: slab90: layer: - 3 - 0 thickness: 0.09 thickness_tolerance: null zmin: 0.0 material: si sidewall_angle: 0.0 width_...
gdsfactory-test-data/sp/taper_cross_section_npoints101_17063247.yml/0
{ "file_path": "gdsfactory-test-data/sp/taper_cross_section_npoints101_17063247.yml", "repo_id": "gdsfactory-test-data", "token_count": 1615 }
9
# String that LibCST should look for in code which indicates that the # module is generated code. generated_code_marker: '@generated' # Command line and arguments for invoking a code formatter. Anything # specified here must be capable of taking code via stdin and returning # formatted code via stdout. formatter: ['bla...
gdsfactory/.libcst.codemod.yaml/0
{ "file_path": "gdsfactory/.libcst.codemod.yaml", "repo_id": "gdsfactory", "token_count": 200 }
10
# Installation We support Python 3.10 or 3.11, and recommend [VSCode](https://code.visualstudio.com/) IDE. If you do not have Python installed, you can [download Anaconda](https://www.anaconda.com/download/). Upon Python installation, open Anaconda Prompt as Administrator and install the latest gdsfactory ![anaconda...
gdsfactory/docs/developer.md/0
{ "file_path": "gdsfactory/docs/developer.md", "repo_id": "gdsfactory", "token_count": 2504 }
11
"""Add ports from pin markers or labels.""" from __future__ import annotations from functools import partial import numpy as np from numpy import arctan2, degrees, isclose from gdsfactory.component import Component from gdsfactory.port import Port, read_port_markers, sort_ports_clockwise from gdsfactory.snap import...
gdsfactory/gdsfactory/add_ports.py/0
{ "file_path": "gdsfactory/gdsfactory/add_ports.py", "repo_id": "gdsfactory", "token_count": 6972 }
12
from __future__ import annotations from functools import partial import gdsfactory as gf from gdsfactory.components.bbox import bbox from gdsfactory.components.bend_euler import bend_euler from gdsfactory.components.coupler import coupler from gdsfactory.typings import ComponentSpec, CrossSectionSpec, LayerSpec @gf...
gdsfactory/gdsfactory/components/add_trenches.py/0
{ "file_path": "gdsfactory/gdsfactory/components/add_trenches.py", "repo_id": "gdsfactory", "token_count": 726 }
13
"""CD SEM structures.""" from __future__ import annotations from functools import partial import numpy as np import gdsfactory as gf from gdsfactory.cell import cell from gdsfactory.component import Component from gdsfactory.components.coupler_straight import coupler_straight from gdsfactory.components.text_rectang...
gdsfactory/gdsfactory/components/cdsem_coupler.py/0
{ "file_path": "gdsfactory/gdsfactory/components/cdsem_coupler.py", "repo_id": "gdsfactory", "token_count": 743 }
14
from __future__ import annotations import gdsfactory as gf from gdsfactory.component import Component from gdsfactory.components.bezier import bezier from gdsfactory.typings import CrossSectionSpec @gf.cell def coupler_adiabatic( length1: float = 20.0, length2: float = 50.0, length3: float = 30.0, wg...
gdsfactory/gdsfactory/components/coupler_adiabatic.py/0
{ "file_path": "gdsfactory/gdsfactory/components/coupler_adiabatic.py", "repo_id": "gdsfactory", "token_count": 2047 }
15
"""based on phidl.geometry.""" from __future__ import annotations from functools import partial import numpy as np import gdsfactory as gf from gdsfactory.components.rectangle import rectangle from gdsfactory.components.text import text from gdsfactory.typings import Anchor, ComponentSpec, LayerSpec big_square = p...
gdsfactory/gdsfactory/components/die_bbox.py/0
{ "file_path": "gdsfactory/gdsfactory/components/die_bbox.py", "repo_id": "gdsfactory", "token_count": 1427 }
16
from __future__ import annotations from typing import Any from gdsfactory.cell import cell from gdsfactory.component import Component from gdsfactory.components.grating_coupler_elliptical_arbitrary import ( grating_coupler_elliptical_arbitrary, ) from gdsfactory.config import PATH from gdsfactory.typings import F...
gdsfactory/gdsfactory/components/grating_coupler_elliptical_lumerical.py/0
{ "file_path": "gdsfactory/gdsfactory/components/grating_coupler_elliptical_lumerical.py", "repo_id": "gdsfactory", "token_count": 2235 }
17
from __future__ import annotations import gdsfactory as gf from gdsfactory.cell import cell from gdsfactory.component import Component from gdsfactory.typings import LayerSpec @cell def logo(text: str = "GDSFACTORY", layer: LayerSpec | None = None) -> Component: """Returns GDSfactory logo. Args: tex...
gdsfactory/gdsfactory/components/logo.py/0
{ "file_path": "gdsfactory/gdsfactory/components/logo.py", "repo_id": "gdsfactory", "token_count": 344 }
18
from __future__ import annotations from functools import partial import gdsfactory as gf from gdsfactory.cell import cell from gdsfactory.component import Component from gdsfactory.components.bend_euler import bend_euler from gdsfactory.components.coupler import coupler from gdsfactory.components.mmi1x2 import mmi1x2...
gdsfactory/gdsfactory/components/mzm.py/0
{ "file_path": "gdsfactory/gdsfactory/components/mzm.py", "repo_id": "gdsfactory", "token_count": 3000 }
19
from __future__ import annotations from functools import partial from gdsfactory.cell import cell from gdsfactory.component import Component from gdsfactory.components.compass import compass from gdsfactory.components.via_stack import via_stack_slab_npp_m3 from gdsfactory.typings import ComponentSpec, Floats, LayerSp...
gdsfactory/gdsfactory/components/resistance_sheet.py/0
{ "file_path": "gdsfactory/gdsfactory/components/resistance_sheet.py", "repo_id": "gdsfactory", "token_count": 1129 }
20
from __future__ import annotations import numpy as np from gdsfactory.cell import cell from gdsfactory.component import Component from gdsfactory.components.compass import compass from gdsfactory.components.optimal_hairpin import optimal_hairpin from gdsfactory.typings import Float2, LayerSpec @cell def snspd( ...
gdsfactory/gdsfactory/components/snspd.py/0
{ "file_path": "gdsfactory/gdsfactory/components/snspd.py", "repo_id": "gdsfactory", "token_count": 1652 }
21
"""Returns a switch_tree. __ _| |_ __ | | |_ _ | |__| |__| | _| |__ |dy |__| | __ | |_| |_ | | |_ - |__| |<-dx->| """ from __future__ import annotations from functools import partial from gdsfactory.components.mmi2x2 import mmi2x2 f...
gdsfactory/gdsfactory/components/switch_tree.py/0
{ "file_path": "gdsfactory/gdsfactory/components/switch_tree.py", "repo_id": "gdsfactory", "token_count": 396 }
22
from __future__ import annotations from numpy import floor import gdsfactory as gf from gdsfactory.components.compass import compass from gdsfactory.components.via import via1 from gdsfactory.cross_section import metal2, metal3 from gdsfactory.port import select_ports from gdsfactory.typings import ComponentSpec, Mul...
gdsfactory/gdsfactory/components/via_corner.py/0
{ "file_path": "gdsfactory/gdsfactory/components/via_corner.py", "repo_id": "gdsfactory", "token_count": 1366 }
23
""" Based on Gerber file spec: https://www.ucamco.com/files/downloads/file_en/456/gerber-layer-format-specification-revision-2022-02_en.pdf See Also: - https://github.com/opiopan/pcb-tools-extension - https://github.com/jamesbowman/cuflow/blob/master/gerber.py """ from pathlib import Path from typing import Literal ...
gdsfactory/gdsfactory/export/to_gerber.py/0
{ "file_path": "gdsfactory/gdsfactory/export/to_gerber.py", "repo_id": "gdsfactory", "token_count": 3981 }
24
from gdsfactory.generic_tech.layer_map import LAYER from gdsfactory.technology import LayerLevel, LayerStack from gdsfactory.technology.processes import ( Anneal, Etch, Grow, ImplantPhysical, Planarize, ProcessStep, ) nm = 1e-3 class LayerStackParameters: """values used by get_layer_stack...
gdsfactory/gdsfactory/generic_tech/layer_stack.py/0
{ "file_path": "gdsfactory/gdsfactory/generic_tech/layer_stack.py", "repo_id": "gdsfactory", "token_count": 7338 }
25
from __future__ import annotations import gdsfactory as gf from gdsfactory.component import Component from gdsfactory.components.compass import compass from gdsfactory.geometry.boolean import boolean from gdsfactory.geometry.offset import offset @gf.cell def outline( elements, distance=1, precision: floa...
gdsfactory/gdsfactory/geometry/outline.py/0
{ "file_path": "gdsfactory/gdsfactory/geometry/outline.py", "repo_id": "gdsfactory", "token_count": 1563 }
26
"""Converts CSV of test site labels into a CSV test manifest.""" import json import pathlib import warnings from functools import partial import pandas as pd import gdsfactory as gf marker = partial(gf.components.rectangle, layer="TEXT", centered=True, size=(10, 10)) def write_test_manifest( csvpath: str | pa...
gdsfactory/gdsfactory/labels/write_test_manifest.py/0
{ "file_path": "gdsfactory/gdsfactory/labels/write_test_manifest.py", "repo_id": "gdsfactory", "token_count": 1993 }
27
"""Read uPDK YAML definition and returns a gdsfactory script. https://openepda.org/index.html """ from __future__ import annotations import io import pathlib from typing import IO from omegaconf import OmegaConf from gdsfactory.typings import LayerSpec, PathType def from_updk( filepath: PathType, filepat...
gdsfactory/gdsfactory/read/from_updk.py/0
{ "file_path": "gdsfactory/gdsfactory/read/from_updk.py", "repo_id": "gdsfactory", "token_count": 3559 }
28
from __future__ import annotations from collections.abc import Callable import gdsfactory as gf from gdsfactory.component import Component from gdsfactory.components.bend_s import bend_s from gdsfactory.components.straight import straight from gdsfactory.port import select_ports_optical from gdsfactory.typings import...
gdsfactory/gdsfactory/routing/fanout2x2.py/0
{ "file_path": "gdsfactory/gdsfactory/routing/fanout2x2.py", "repo_id": "gdsfactory", "token_count": 1238 }
29
from __future__ import annotations import numpy as np from numpy import ndarray import gdsfactory as gf from gdsfactory.components.bend_euler import bend_euler from gdsfactory.geometry.functions import path_length from gdsfactory.routing.manhattan import ( _is_horizontal, _is_vertical, remove_flat_angles,...
gdsfactory/gdsfactory/routing/path_length_matching.py/0
{ "file_path": "gdsfactory/gdsfactory/routing/path_length_matching.py", "repo_id": "gdsfactory", "token_count": 4462 }
30
"""You can remap layers.""" from __future__ import annotations from functools import partial import gdsfactory as gf from gdsfactory.component import Component @gf.cell def remap_layers() -> Component: c = gf.Component() straight = partial( gf.components.straight, cladding_layers=None, ...
gdsfactory/gdsfactory/samples/06_remapping_layers.py/0
{ "file_path": "gdsfactory/gdsfactory/samples/06_remapping_layers.py", "repo_id": "gdsfactory", "token_count": 370 }
31
"""Lets pack a doe and export it with metadata.""" from __future__ import annotations import gdsfactory as gf if __name__ == "__main__": doe = gf.components.pack_doe( gf.components.mmi1x2, settings={"length_taper": [10, 15, 20, 30]}, function="add_fiber_array", ) doe.show() do...
gdsfactory/gdsfactory/samples/24_doe.py/0
{ "file_path": "gdsfactory/gdsfactory/samples/24_doe.py", "repo_id": "gdsfactory", "token_count": 174 }
32
instances: wg_c1: component: straight wg_c2: component: straight wg_f1: component: straight wg_f2: component: straight wg_a1: component: straight wg_a2: component: straight placements: wg_c1: port: o2 x: 0 y: -400 wg_c2: port: o1 x: wg_c1,o2 y: wg_c1,o2...
gdsfactory/gdsfactory/samples/all_angle_routing/aar_implicit_final_angle.pic.yml/0
{ "file_path": "gdsfactory/gdsfactory/samples/all_angle_routing/aar_implicit_final_angle.pic.yml", "repo_id": "gdsfactory", "token_count": 726 }
33
settings: changed: cross_section: function: cross_section settings: bbox_layers: - - 36 - 0 bbox_offsets: - 3 layer: - 34 - 0 width: 1 decorator: function: add_pins width: 1 width_mmi: 3 child: null default...
gdsfactory/gdsfactory/samples/pdk/test_fab_c/test_settings_mmi1x2_nitride_c_.yml/0
{ "file_path": "gdsfactory/gdsfactory/samples/pdk/test_fab_c/test_settings_mmi1x2_nitride_c_.yml", "repo_id": "gdsfactory", "token_count": 581 }
34
"""snap issue""" from __future__ import annotations import gdsfactory as gf nm = 1e-3 if __name__ == "__main__": c = gf.Component("demo") s1 = c << gf.c.straight(length=1 + 1.5 * nm) s2 = c << gf.c.straight(length=1) s2.connect("o1", s1.ports["o2"]) c = c.flatten_offgrid_references() c.show()...
gdsfactory/gdsfactory/samples/snap_issue.py/0
{ "file_path": "gdsfactory/gdsfactory/samples/snap_issue.py", "repo_id": "gdsfactory", "token_count": 148 }
35
"""In programming, a factory is a function that returns an object. Functions are easy to understand because they have clear inputs and outputs. Most gdsfactory functions take some inputs and return a Component object. Some of these inputs parameters are also functions. - Component: Object with. - name. - refe...
gdsfactory/gdsfactory/typings.py/0
{ "file_path": "gdsfactory/gdsfactory/typings.py", "repo_id": "gdsfactory", "token_count": 5886 }
36
<jupyter_start><jupyter_text>Non-manhattan routerWarning: For using the non-manhattan router you need to gf.config.enable_offgrid_ports() in your scripts and use Component.flatten_offgrid_references() or write_gds(flatten_offgrid_references=True) to avoid 1nm gaps in your layout due to grid snapping issues.Make sure yo...
gdsfactory/notebooks/04_routing_non_manhattan.ipynb/0
{ "file_path": "gdsfactory/notebooks/04_routing_non_manhattan.ipynb", "repo_id": "gdsfactory", "token_count": 4471 }
37
name: sample_custom_cells instances: mmit: component: mmi2x2 mmib: component: mmi1x2 settings: width_mmi: 4.5 placements: mmit: x: 100 y: 100 routes: route1: links: mmib,o2: mmit,o2 ports: o1: mmib,o1 o2: mmit,o2 o3: mmit,o3 ...
gdsfactory/notebooks/demo_backwards_compatibility.pic.yml/0
{ "file_path": "gdsfactory/notebooks/demo_backwards_compatibility.pic.yml", "repo_id": "gdsfactory", "token_count": 206 }
38
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 obstacle1: component: rectangle settings: layer: M1 size: [30, 30] placement...
gdsfactory/notebooks/yaml_pics/aar_steps01.pic.yml/0
{ "file_path": "gdsfactory/notebooks/yaml_pics/aar_steps01.pic.yml", "repo_id": "gdsfactory", "token_count": 648 }
39
name: routes_mmi instances: mmi_bottom: component: mmi2x2 mmi_top: component: mmi2x2 placements: mmi_top: x: 100 y: 100 routes: optical: links: mmi_bottom,o4: mmi_top,o1 mmi_bottom,o3: mmi_top,o2
gdsfactory/notebooks/yaml_pics/routes_mmi.pic.yml/0
{ "file_path": "gdsfactory/notebooks/yaml_pics/routes_mmi.pic.yml", "repo_id": "gdsfactory", "token_count": 168 }
40
0: 76.637 1: 86.637 2: 96.637 3: 106.637 4: 116.637 5: 126.637 6: 126.637 7: 116.637 8: 106.637 9: 96.637 10: 86.637 11: 76.637 12: 126.637 13: 116.637 14: 106.637 15: 96.637 16: 86.637 17: 76.637 18: 76.637 19: 86.637 20: 96.637 21: 106.637 22: 116.637 23: 126.637
gdsfactory/test-data-regression/test_connect_corner_A_.yml/0
{ "file_path": "gdsfactory/test-data-regression/test_connect_corner_A_.yml", "repo_id": "gdsfactory", "token_count": 168 }
41
0: 420.412 1: 430.412 2: 445.412 3: 445.412 4: 445.412 5: 383.412 6: 383.412 7: 403.412
gdsfactory/test-data-regression/test_get_bundle_u_indirect_0_.yml/0
{ "file_path": "gdsfactory/test-data-regression/test_get_bundle_u_indirect_0_.yml", "repo_id": "gdsfactory", "token_count": 48 }
42
0: 492.274 1: 292.941
gdsfactory/test-data-regression/test_link_optical_ports_no_grouping.yml/0
{ "file_path": "gdsfactory/test-data-regression/test_link_optical_ports_no_grouping.yml", "repo_id": "gdsfactory", "token_count": 14 }
43
function: mzi info: {} module: gdsfactory.components.mzi name: mzi_a42a8e63 settings: add_electrical_ports_bot: true add_optical_ports_arms: false bend: function: bend_euler combiner: null cross_section: function: cross_section cross_section_x_bot: null cross_section_x_top: null delta_length: 10...
gdsfactory/test-data-regression/test_read_gds_with_settings2.yml/0
{ "file_path": "gdsfactory/test-data-regression/test_read_gds_with_settings2.yml", "repo_id": "gdsfactory", "token_count": 435 }
44
function: add_electrical_pads_top info: {} module: gdsfactory.routing.add_electrical_pads_top name: mzi_add_electrical_pads_top_componentmzi_2e88f57c settings: component: function: mzi module: gdsfactory.components.mzi settings: add_electrical_ports_bot: true add_optical_ports_arms: false ...
gdsfactory/test-data-regression/test_settings_add_electrical_pads_top_.yml/0
{ "file_path": "gdsfactory/test-data-regression/test_settings_add_electrical_pads_top_.yml", "repo_id": "gdsfactory", "token_count": 564 }
45
function: align_wafer info: {} module: gdsfactory.components.align name: align_wafer settings: cross_length: 80.0 layer: WG layer_cladding: null layers: null spacing: 10.0 square_corner: bottom_left width: 10.0
gdsfactory/test-data-regression/test_settings_align_wafer_.yml/0
{ "file_path": "gdsfactory/test-data-regression/test_settings_align_wafer_.yml", "repo_id": "gdsfactory", "token_count": 85 }
46
name: straight_heater_metal_undercut_with_undercutFalse_bend_port ports: l_e1: center: - 324.9 - -20.0 layer: - 49 - 0 name: l_e1 orientation: 0.0 port_type: electrical shear_angle: null width: 10.0 l_e2: center: - -10.4 - 5.5 layer: - 49 - 0 n...
gdsfactory/test-data-regression/test_settings_bend_port_.yml/0
{ "file_path": "gdsfactory/test-data-regression/test_settings_bend_port_.yml", "repo_id": "gdsfactory", "token_count": 1344 }
47
function: compass info: {} module: gdsfactory.components.compass name: compass settings: layer: WG port_inclusion: 0.0 port_orientations: - 180 - 90 - 0 - -90 port_type: electrical size: - 4.0 - 2.0
gdsfactory/test-data-regression/test_settings_compass_.yml/0
{ "file_path": "gdsfactory/test-data-regression/test_settings_compass_.yml", "repo_id": "gdsfactory", "token_count": 91 }
48
function: coupler_ring_point info: {} module: gdsfactory.components.coupler_ring name: coupler_ring_point settings: coupler_ring: function: coupler_ring open_layers: null open_sizes: null
gdsfactory/test-data-regression/test_settings_coupler_ring_point_.yml/0
{ "file_path": "gdsfactory/test-data-regression/test_settings_coupler_ring_point_.yml", "repo_id": "gdsfactory", "token_count": 74 }
49
function: cutback_component info: components: 80 module: gdsfactory.components.cutback_component name: cutback_component settings: bend180: function: bend_euler module: gdsfactory.components.bend_euler settings: angle: 180 cols: 4 component: function: taper_from_csv cross_section: xs_sc ...
gdsfactory/test-data-regression/test_settings_cutback_component_.yml/0
{ "file_path": "gdsfactory/test-data-regression/test_settings_cutback_component_.yml", "repo_id": "gdsfactory", "token_count": 180 }
50
function: edge_coupler_array_with_loopback info: {} module: gdsfactory.components.edge_coupler_array name: edge_coupler_array_with_loopback settings: alignment_port: o1 angle: 0 bend: function: bend_euler cross_section: xs_sc edge_coupler: function: taper module: gdsfactory.components.taper se...
gdsfactory/test-data-regression/test_settings_edge_coupler_array_with_loopback_.yml/0
{ "file_path": "gdsfactory/test-data-regression/test_settings_edge_coupler_array_with_loopback_.yml", "repo_id": "gdsfactory", "token_count": 289 }
51
function: grating_coupler_elliptical_trenches info: period: 0.6759999999999999 polarization: te wavelength: 1.53 module: gdsfactory.components.grating_coupler_elliptical_trenches name: grating_coupler_elliptical_trenches settings: cross_section: xs_sc end_straight_length: 0.2 fiber_angle: 15.0 grating_lin...
gdsfactory/test-data-regression/test_settings_grating_coupler_elliptical_trenches_.yml/0
{ "file_path": "gdsfactory/test-data-regression/test_settings_grating_coupler_elliptical_trenches_.yml", "repo_id": "gdsfactory", "token_count": 215 }
52
function: interdigital_capacitor info: {} module: gdsfactory.components.interdigital_capacitor name: interdigital_capacitor settings: finger_gap: 2.0 finger_length: 20.0 fingers: 4 layer: WG thickness: 5.0
gdsfactory/test-data-regression/test_settings_interdigital_capacitor_.yml/0
{ "file_path": "gdsfactory/test-data-regression/test_settings_interdigital_capacitor_.yml", "repo_id": "gdsfactory", "token_count": 78 }
53
function: mmi info: {} module: gdsfactory.components.mmi name: mmi settings: cross_section: xs_sc gap_input_tapers: 0.25 gap_output_tapers: 0.25 input_positions: null inputs: 1 length_mmi: 5.5 length_taper: 10.0 output_positions: null outputs: 4 taper: function: taper width: null width_mmi: ...
gdsfactory/test-data-regression/test_settings_mmi_.yml/0
{ "file_path": "gdsfactory/test-data-regression/test_settings_mmi_.yml", "repo_id": "gdsfactory", "token_count": 146 }
54
function: mzm info: {} module: gdsfactory.components.mzm name: mzm settings: bend: function: bend_euler combiner: mmi1x2 cross_section: xs_sc delta_length: 0.0 length_x: 500 length_y: 2.0 min_length: 0.01 mirror_bot: false nbends: 2 phase_shifter: function: straight_pin port_e0_combiner: o...
gdsfactory/test-data-regression/test_settings_mzm_.yml/0
{ "file_path": "gdsfactory/test-data-regression/test_settings_mzm_.yml", "repo_id": "gdsfactory", "token_count": 208 }
55
function: pixel info: {} module: gdsfactory.components.version_stamp name: pixel settings: layer: WG layers: null size: 1.0
gdsfactory/test-data-regression/test_settings_pixel_.yml/0
{ "file_path": "gdsfactory/test-data-regression/test_settings_pixel_.yml", "repo_id": "gdsfactory", "token_count": 48 }
56
name: ring_double_pn ports: o1: center: - -3.686 - 0.0 layer: - 1 - 0 name: o1 orientation: 180.0 port_type: optical shear_angle: null width: 0.5 o2: center: - 3.686 - 0.0 layer: - 1 - 0 name: o2 orientation: 0.0 port_type: optical ...
gdsfactory/test-data-regression/test_settings_ring_double_pn_.yml/0
{ "file_path": "gdsfactory/test-data-regression/test_settings_ring_double_pn_.yml", "repo_id": "gdsfactory", "token_count": 2795 }
57
function: _from_yaml info: description: just a demo on adding metadata polarization: te wavelength: 1.55 module: gdsfactory.read.from_yaml name: sample_mmis_3a07ee11 settings: conf: info: description: just a demo on adding metadata polarization: te wavelength: 1.55 instances: mmi...
gdsfactory/test-data-regression/test_settings_sample_mmis_.yml/0
{ "file_path": "gdsfactory/test-data-regression/test_settings_sample_mmis_.yml", "repo_id": "gdsfactory", "token_count": 844 }
58
function: splitter_tree info: {} module: gdsfactory.components.splitter_tree name: splitter_tree settings: bend_s: function: bend_s bend_s_xsize: null coupler: function: mmi1x2 cross_section: xs_sc noutputs: 4 spacing: - 90.0 - 50.0
gdsfactory/test-data-regression/test_settings_splitter_tree_.yml/0
{ "file_path": "gdsfactory/test-data-regression/test_settings_splitter_tree_.yml", "repo_id": "gdsfactory", "token_count": 110 }
59
function: straight info: length: 10.0 route_info_length: 10.0 route_info_type: xs_8bf2c479 route_info_weight: 10.0 route_info_xs_8bf2c479_length: 10.0 width: 0.5 module: gdsfactory.components.straight name: straight_7692a032 settings: cross_section: function: cross_section module: gdsfactory.cross...
gdsfactory/test-data-regression/test_settings_straight_rib_.yml/0
{ "file_path": "gdsfactory/test-data-regression/test_settings_straight_rib_.yml", "repo_id": "gdsfactory", "token_count": 351 }
60
name: taper_from_csv_d4e8fdfb ports: o1: center: - 0.0 - 0.0 layer: - 1 - 0 name: o1 orientation: 180 port_type: optical shear_angle: null width: 0.5 o2: center: - 100.0 - 0.0 layer: - 1 - 0 name: o2 orientation: 0 port_type: optical ...
gdsfactory/test-data-regression/test_settings_taper_w10_l100_.yml/0
{ "file_path": "gdsfactory/test-data-regression/test_settings_taper_w10_l100_.yml", "repo_id": "gdsfactory", "token_count": 357 }
61
function: type0 info: length: 10.19 min_bend_radius: 11.744 module: test_add_fiber_array name: type0 settings: {}
gdsfactory/test-data-regression/test_settings_type0_.yml/0
{ "file_path": "gdsfactory/test-data-regression/test_settings_type0_.yml", "repo_id": "gdsfactory", "token_count": 48 }
62
import warnings import pytest import gdsfactory as gf from gdsfactory.routing.manhattan import RouteWarning from gdsfactory.typings import CrossSectionSpec MANHATTAN_ANGLES = [0, 90, 180, 270] @gf.cell def port_bank( count: int = 4, spacing: float = 3.0, cross_section: CrossSectionSpec = "xs_sc" ) -> gf.Compon...
gdsfactory/tests/routing/test_port_ordering.py/0
{ "file_path": "gdsfactory/tests/routing/test_port_ordering.py", "repo_id": "gdsfactory", "token_count": 1641 }
63
from __future__ import annotations from functools import partial from pytest_regressions.data_regression import DataRegressionFixture import gdsfactory as gf from gdsfactory.port import port_array def test_get_bundle_west_to_north( data_regression: DataRegressionFixture, check: bool = True ) -> None: lengt...
gdsfactory/tests/routing/test_routing_get_bundle_west_to_north.py/0
{ "file_path": "gdsfactory/tests/routing/test_routing_get_bundle_west_to_north.py", "repo_id": "gdsfactory", "token_count": 893 }
64
import functools import gdsfactory as gf from gdsfactory import Component, cell def test_cell_decorator(): c1 = gf.c.straight(length=11.123, decorator=gf.routing.add_fiber_array) c2 = gf.c.straight(length=11.123, decorator=gf.routing.add_fiber_array) assert c1 is c2 @cell def wg(length: int = 3, layer:...
gdsfactory/tests/test_cell_decorator.py/0
{ "file_path": "gdsfactory/tests/test_cell_decorator.py", "repo_id": "gdsfactory", "token_count": 904 }
65
from __future__ import annotations import pytest import gdsfactory as gf from gdsfactory.components import cells skip_test = { "component_sequence", "extend_port", "extend_ports_list", "add_grating_couplers", "add_grating_couplers_fiber_array", "add_grating_couplers_with_loopback_fiber_array"...
gdsfactory/tests/test_components_serialize.py/0
{ "file_path": "gdsfactory/tests/test_components_serialize.py", "repo_id": "gdsfactory", "token_count": 572 }
66
from __future__ import annotations import hashlib import gdsfactory as gf def hash_file(filepath) -> str: md5 = hashlib.md5() md5.update(filepath.read_bytes()) return md5.hexdigest() def test_hash_geometry() -> None: """Test geometric hash of the GDS points.""" c1 = gf.components.straight(leng...
gdsfactory/tests/test_hash.py/0
{ "file_path": "gdsfactory/tests/test_hash.py", "repo_id": "gdsfactory", "token_count": 502 }
67
from __future__ import annotations from functools import partial import toolz import gdsfactory as gf def test_metadata_export_partial() -> None: straight_wide = partial(gf.components.straight, width=2) c = straight_wide() d = c.to_dict() assert d["settings"]["width"] == 2 def test_metadata_expor...
gdsfactory/tests/test_metadata_export.py/0
{ "file_path": "gdsfactory/tests/test_metadata_export.py", "repo_id": "gdsfactory", "token_count": 204 }
68
from __future__ import annotations import gdsfactory as gf def test_path_transition_class() -> None: P = gf.path.straight(length=10, npoints=101) s0 = gf.Section(width=1, offset=0, layer=(1, 0), port_names=("o1", "o2")) s1 = gf.Section(width=3, offset=0, layer=(3, 0)) X1 = gf.CrossSection(sections=(...
gdsfactory/tests/test_paths_transition.py/0
{ "file_path": "gdsfactory/tests/test_paths_transition.py", "repo_id": "gdsfactory", "token_count": 357 }
69
from __future__ import annotations import gdstk import gdsfactory as gf from gdsfactory.cross_section import strip from gdsfactory.serialization import clean_value_json @gf.cell def demo_cross_section_setting(cross_section=strip) -> gf.Component: return gf.components.straight(cross_section=cross_section) @gf....
gdsfactory/tests/test_serialize.py/0
{ "file_path": "gdsfactory/tests/test_serialize.py", "repo_id": "gdsfactory", "token_count": 858 }
70