reformat arg lists

nolock
jan 2 years ago
parent 9b3b30b141
commit 40c81f53ed

@ -12,7 +12,8 @@ import masque.file.gdsii
import pcgen import pcgen
def hole(radius: float, def hole(
radius: float,
layer: layer_t = (1, 0), layer: layer_t = (1, 0),
) -> Pattern: ) -> Pattern:
""" """
@ -31,7 +32,8 @@ def hole(radius: float,
return pat return pat
def smile(radius: float, def smile(
radius: float,
layer: layer_t = (1, 0), layer: layer_t = (1, 0),
secondary_layer: layer_t = (1, 2) secondary_layer: layer_t = (1, 2)
) -> Pattern: ) -> Pattern:

@ -7,7 +7,8 @@ from typing import Sequence, Tuple
import numpy # type: ignore import numpy # type: ignore
def triangular_lattice(dims: Tuple[int, int], def triangular_lattice(
dims: Tuple[int, int],
asymmetric: bool = False, asymmetric: bool = False,
origin: str = 'center', origin: str = 'center',
) -> numpy.ndarray: ) -> numpy.ndarray:
@ -71,7 +72,8 @@ def square_lattice(dims: Tuple[int, int]) -> numpy.ndarray:
# ### Photonic crystal functions ### # ### Photonic crystal functions ###
def nanobeam_holes(a_defect: float, def nanobeam_holes(
a_defect: float,
num_defect_holes: int, num_defect_holes: int,
num_mirror_holes: int num_mirror_holes: int
) -> numpy.ndarray: ) -> numpy.ndarray:
@ -175,7 +177,8 @@ def y_splitter(num_mirror: int) -> numpy.ndarray:
return p return p
def ln_defect(mirror_dims: Tuple[int, int], def ln_defect(
mirror_dims: Tuple[int, int],
defect_length: int, defect_length: int,
) -> numpy.ndarray: ) -> numpy.ndarray:
""" """
@ -198,7 +201,8 @@ def ln_defect(mirror_dims: Tuple[int, int],
return p[numpy.logical_or(holes_to_keep, p[:, 1] != 0), ] return p[numpy.logical_or(holes_to_keep, p[:, 1] != 0), ]
def ln_shift_defect(mirror_dims: Tuple[int, int], def ln_shift_defect(
mirror_dims: Tuple[int, int],
defect_length: int, defect_length: int,
shifts_a: Sequence[float] = (0.15, 0, 0.075), shifts_a: Sequence[float] = (0.15, 0, 0.075),
shifts_r: Sequence[float] = (1, 1, 1) shifts_r: Sequence[float] = (1, 1, 1)

@ -13,7 +13,8 @@ import pcgen
import basic import basic
def perturbed_l3(lattice_constant: float, def perturbed_l3(
lattice_constant: float,
hole: Pattern, hole: Pattern,
trench_dose: float = 1.0, trench_dose: float = 1.0,
trench_layer: layer_t = (1, 0), trench_layer: layer_t = (1, 0),
@ -78,7 +79,8 @@ def perturbed_l3(lattice_constant: float,
return Device(pat, ports) return Device(pat, ports)
def waveguide(lattice_constant: float, def waveguide(
lattice_constant: float,
hole: Pattern, hole: Pattern,
length: int, length: int,
mirror_periods: int, mirror_periods: int,
@ -111,7 +113,8 @@ def waveguide(lattice_constant: float,
return Device(pat, ports) return Device(pat, ports)
def bend(lattice_constant: float, def bend(
lattice_constant: float,
hole: Pattern, hole: Pattern,
mirror_periods: int, mirror_periods: int,
) -> Device: ) -> Device:
@ -144,7 +147,8 @@ def bend(lattice_constant: float,
return Device(pat, ports) return Device(pat, ports)
def y_splitter(lattice_constant: float, def y_splitter(
lattice_constant: float,
hole: Pattern, hole: Pattern,
mirror_periods: int, mirror_periods: int,
) -> Device: ) -> Device:

Loading…
Cancel
Save