import numpy as np from ..primitives.passive import DC_bend class DC_bend_50_50_Cband(DC_bend): def __init__(self, w_wg: float, show_pins: bool=False) -> None: ''' This is a wideband 50/50 Direction Coupler based on bend directional coupler, from 1500nm to 1600nm. ''' w_in = 0.45 w_out = 0.45 gap = 0.2 r_in = 60 coupling_length = 19.08 theta_arc = coupling_length / (r_in+gap/2+w_in/2) * 180 / np.pi super().__init__(w_in=w_in, w_out=w_out, gap=gap, r_in=r_in, theta_arc=theta_arc, w_wg=w_wg, theta_ext=10, xs_wg="strip", show_pins=show_pins) self.cell = self.generate_gds(cellname="_50_50_Cband") class DC_bend_20_80_Cband(DC_bend): ''' This is a wideband 20/80 Direction Coupler based on bend directional coupler, from 1500nm to 1600nm. Through: 80% Cross: 20% ''' def __init__(self, w_wg: float, show_pins: bool=False) -> None: w_in = 0.45 w_out = 0.45 gap = 0.2 r_in = 41 coupling_length = 19.6 theta_arc = coupling_length / (r_in+gap/2+w_in/2) * 180 / np.pi super().__init__(w_in=w_in, w_out=w_out, gap=gap, r_in=r_in, theta_arc=theta_arc, w_wg=w_wg, theta_ext=10, xs_wg="strip", show_pins=show_pins) self.generate_gds(cellname="_20_80_Cband") class DC_bend_4_96_Cband(DC_bend): ''' This is a wideband 20/80 Direction Coupler based on bend directional coupler, from 1500nm to 1600nm. Through: 96% Cross: 4% ''' def __init__(self, w_wg: float, show_pins: bool=False) -> None: w_in = 0.45 w_out = 0.45 gap = 0.2 r_in = 30 coupling_length = 18.9 theta_arc = coupling_length / (r_in+gap/2+w_in/2) * 180 / np.pi super().__init__(w_in=w_in, w_out=w_out, gap=gap, r_in=r_in, theta_arc=theta_arc, w_wg=w_wg, theta_ext=10, xs_wg="strip", show_pins=show_pins) self.generate_gds(cellname="_4_96_Cband")