Skip to content

Commit

Permalink
Merge pull request #258 from gdsfactory/fix_port_cz
Browse files Browse the repository at this point in the history
Fix port centers in z
  • Loading branch information
joamatab authored Dec 1, 2023
2 parents 20e58ce + fe0fd55 commit 3d2a73e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gplugins/tidy3d/component.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ def get_component_modeler(
case str():
cz = self.get_layer_center(center_z)[2]
case None:
cz = self.center[2]
cz = np.mean(list({c[2] for c in self.port_centers}))
case _:
raise ValueError(f"Invalid center_z: {center_z}")

Expand All @@ -295,7 +295,7 @@ def get_component_modeler(
shutoff=shutoff,
)

ports = self.get_ports(mode_spec, port_size_mult, cz)
ports = self.get_ports(mode_spec, port_size_mult)

modeler = ComponentModeler(
simulation=sim,
Expand Down

0 comments on commit 3d2a73e

Please sign in to comment.