Skip to content

Commit

Permalink
Merge pull request #501 from gdsfactory/update_tidy3d
Browse files Browse the repository at this point in the history
update tidy3d and unpin numpy
  • Loading branch information
joamatab authored Nov 27, 2024
2 parents 1413b97 + 59cae60 commit 3c48a46
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
9 changes: 4 additions & 5 deletions gplugins/tidy3d/component.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""This module contains the Tidy3DComponent class which is used to model 3D components in the Tidy3D simulation environment.
It extends the LayeredComponentBase class and adds additional properties and methods specific to the Tidy3D environment.
Classes:
Expand Down Expand Up @@ -207,7 +208,7 @@ def get_simulation(
"""
sim_center = (*self.center[:2], center_z)
sim_size = (*self.size[:2], sim_size_z)
sim = td.Simulation(
return td.Simulation(
size=sim_size,
center=sim_center,
structures=self.structures,
Expand All @@ -219,7 +220,6 @@ def get_simulation(
symmetry=symmetry,
**kwargs,
)
return sim

def get_component_modeler(
self,
Expand Down Expand Up @@ -308,7 +308,7 @@ def get_component_modeler(

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

modeler = ComponentModeler(
return ComponentModeler(
simulation=sim,
ports=ports,
freqs=tuple(freqs),
Expand All @@ -319,8 +319,6 @@ def get_component_modeler(
verbose=verbose,
)

return modeler

@td.components.viz.add_ax_if_none
def plot_slice(
self,
Expand Down Expand Up @@ -495,6 +493,7 @@ def write_sparameters(
plot_simulation_x: which x coordinate to plot. Defaults to None.
plot_mode_index: which mode index to plot. Defaults to 0.
plot_mode_port_name: which port name to plot. Defaults to None.
plot_epsilon: whether to plot epsilon. Defaults to False.
filepath: Optional file path for the S-parameters. If None, uses hash of simulation.
overwrite: Whether to overwrite existing S-parameters. Defaults to False.
kwargs: Additional keyword arguments for the tidy3d Simulation constructor.
Expand Down
10 changes: 5 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ dependencies = [
"pint",
"gdstk",
"tqdm",
"numpy<2"
"numpy"
]
description = "gdsfactory plugins"
keywords = ["python"]
Expand Down Expand Up @@ -53,7 +53,7 @@ dev = [
devsim = [
"devsim",
"pyvista<=0.43.8",
"tidy3d>=2.5.2,<2.8"
"tidy3d>=2.7.8,<2.8"
]
docs = [
"jupytext",
Expand Down Expand Up @@ -93,7 +93,7 @@ meow = [
"jaxlib>=0.4.26",
"flax>=0.8.2",
"meow-sim~=0.11.0",
"tidy3d>=2.5.2,<2.8"
"tidy3d>=2.7.8,<2.8"
]
sax = [
"jax>=0.4.26",
Expand All @@ -109,9 +109,9 @@ schematic = [
"natsort"
]
tidy3d = [
"tidy3d>=2.5.2,<2.8",
"tidy3d>=2.7.8,<2.8",
"meshio",
"numpy<2",
"numpy",
"meshwell~=1.0.7"
]
vlsir = [
Expand Down

0 comments on commit 3c48a46

Please sign in to comment.