Folder structure simplfied

This commit is contained in:
=
2026-06-06 16:43:26 +08:00
parent 8da92ced57
commit 8a17f1dde0
138 changed files with 10429 additions and 1432 deletions
+183 -1
View File
@@ -3,7 +3,7 @@ from typing import Any, Optional
import nazca as nd
import numpy as np
from ...structures import *
from ...geometry import *
from ....technologies import *
from ...electronics import Vias
from ...electronics import ISL
@@ -17,6 +17,56 @@ from ...routing import Route
class waveguide:
"""
waveguide primitive component.
This component builds the waveguide layout cell.
Parameters
----------
w_heater : float, optional
Width parameter in microns. Default is 2.5.
L_wg : int, optional
Length parameter in microns. Default is 150.
L_heater : int, optional
Length parameter in microns. Default is 150.
w_metal : float, optional
Width parameter in microns. Default is 10.
xs_heater : str, optional
Layer or cross-section name used by the device. Default is 'heater'.
xs_metal : str, optional
Layer or cross-section name used by the device. Default is 'metal'.
xs_wg : str, optional
Layer or cross-section name used by the device. Default is 'strip'.
w_wg : float, optional
Width parameter in microns. Default is 0.45.
w_port : Optional[float], optional
Width parameter in microns. Default is None.
Ltp : Any, optional
Length parameter in microns. Default is None.
via_h2m : Any, optional
Via definition used between heater and metal layers. Default is None.
isl : Any, optional
Isolation-trench definition used by the electrical layout. Default is None.
euler_bend : bool, optional
Value for the euler_bend parameter. Default is False.
Rmin : int, optional
Radius parameter in microns. Default is 5.
thin_attach : bool, optional
Value for the thin_attach parameter. Default is False.
UPPER_ISL : bool, optional
Value for the UPPER_ISL parameter. Default is True.
LOWER_ISL : bool, optional
Length parameter in microns. Default is True.
shape : str, optional
Value for the shape parameter. Default is 'strip'.
R_bend : int, optional
Radius parameter in microns. Default is 10.
ubend_offset : int, optional
Value for the ubend_offset parameter. Default is 20.
show_pins : bool, optional
Whether to draw pin markers in the generated layout. Default is False.
"""
def __init__(self,
w_heater: float=2.5,
L_wg: int=150,
@@ -185,6 +235,54 @@ class waveguide:
""" NEW CLASS:: 2023.03.21, two stage phase shifters, to replace PS_3wg """
class PS_2st:
"""
PS 2st primitive component.
This component builds the PS 2st layout cell.
Parameters
----------
xs_wg : str, optional
Layer or cross-section name used by the device. Default is 'strip'.
w_wg : float, optional
Width parameter in microns. Default is 0.5.
w1 : float, optional
Width parameter in microns. Default is 0.7.
w2 : float, optional
Width parameter in microns. Default is 0.9.
L1 : int, optional
Length parameter in microns. Default is 10.
L2 : int, optional
Length parameter in microns. Default is 55.
L_wg : int, optional
Length parameter in microns. Default is 0.
L_tp : int, optional
Length parameter in microns. Default is 1.
L12 : Any, optional
Length parameter in microns. Default is None.
L_ht : Any, optional
Length parameter in microns. Default is None.
xs_heater : str, optional
Layer or cross-section name used by the device. Default is 'heater'.
xs_metal : str, optional
Layer or cross-section name used by the device. Default is 'metal'.
w_heater : float, optional
Width parameter in microns. Default is 2.5.
w_metal : float, optional
Width parameter in microns. Default is 8.
via_h2m : Any, optional
Via definition used between heater and metal layers. Default is None.
isl : Any, optional
Isolation-trench definition used by the electrical layout. Default is None.
UPPER_ISL : bool, optional
Value for the UPPER_ISL parameter. Default is True.
LOWER_ISL : bool, optional
Length parameter in microns. Default is True.
R_bend : int, optional
Radius parameter in microns. Default is 10.
show_pins : bool, optional
Whether to draw pin markers in the generated layout. Default is False.
"""
def __init__(self,
xs_wg: str = 'strip',
w_wg: float = 0.5,
@@ -320,6 +418,52 @@ class PS_2st:
return C
class PS_2st_Straight:
"""
PS 2st Straight primitive component.
This component builds the PS 2st Straight layout cell.
Parameters
----------
xs_wg : str, optional
Layer or cross-section name used by the device. Default is 'strip'.
w_wg : float, optional
Width parameter in microns. Default is 0.5.
w1 : float, optional
Width parameter in microns. Default is 0.7.
w2 : float, optional
Width parameter in microns. Default is 0.9.
L1 : int, optional
Length parameter in microns. Default is 10.
L2 : int, optional
Length parameter in microns. Default is 55.
L_wg : int, optional
Length parameter in microns. Default is 0.
L_tp : int, optional
Length parameter in microns. Default is 1.
L12 : Any, optional
Length parameter in microns. Default is None.
L_ht : Any, optional
Length parameter in microns. Default is None.
xs_heater : str, optional
Layer or cross-section name used by the device. Default is 'heater'.
xs_metal : str, optional
Layer or cross-section name used by the device. Default is 'metal'.
w_heater : float, optional
Width parameter in microns. Default is 2.5.
w_metal : float, optional
Width parameter in microns. Default is 8.
via_h2m : Any, optional
Via definition used between heater and metal layers. Default is None.
isl : Any, optional
Isolation-trench definition used by the electrical layout. Default is None.
UPPER_ISL : bool, optional
Value for the UPPER_ISL parameter. Default is True.
LOWER_ISL : bool, optional
Length parameter in microns. Default is True.
show_pins : bool, optional
Whether to draw pin markers in the generated layout. Default is False.
"""
def __init__(self,
xs_wg: str = 'strip',
w_wg: float = 0.5,
@@ -427,6 +571,26 @@ class PS_2st_Straight:
return C
class PSR_1x2:
"""
PSR 1x2 primitive component.
This component builds the PSR 1x2 layout cell.
Parameters
----------
PSR : Any
Polarization splitter-rotator cell or component used by this composite.
MDM : Any
Mode multiplexer/demultiplexer cell or component used by this composite.
xs : str, optional
Layer or cross-section name used by the device. Default is 'strip'.
w_wg : float, optional
Width parameter in microns. Default is 0.45.
L_tp : int, optional
Length parameter in microns. Default is 15.
show_pins : bool, optional
Whether to draw pin markers in the generated layout. Default is False.
"""
def __init__(self,PSR: Any,MDM: Any,xs: str='strip',w_wg: float=0.45,L_tp: int=15,show_pins: bool=False) -> None:
self.w_wg = w_wg
@@ -477,6 +641,24 @@ class PSR_1x2:
return C
class Brag_WDM:
"""
Brag WDM primitive component.
This component builds the Brag WDM layout cell.
Parameters
----------
Brag : Any
Bragg grating cell or component used by this composite.
MDM : Any
Mode multiplexer/demultiplexer cell or component used by this composite.
w_wg : float, optional
Width parameter in microns. Default is 0.45.
L_tp : int, optional
Length parameter in microns. Default is 30.
show_pins : bool, optional
Whether to draw pin markers in the generated layout. Default is False.
"""
def __init__(self,Brag: Any,MDM: Any,w_wg: float=0.45,L_tp: int=30,show_pins: bool=False) -> None:
self.w_wg = w_wg