reformat arg lists

This commit is contained in:
jan 2022-02-23 11:00:40 -08:00
parent 9b3b30b141
commit 40c81f53ed
3 changed files with 61 additions and 51 deletions

View File

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

View File

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

View File

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