Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove dagster plugin #550

Merged
merged 1 commit into from
Feb 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions gplugins/dagster/Makefile

This file was deleted.

Empty file removed gplugins/dagster/__init__.py
Empty file.
56 changes: 0 additions & 56 deletions gplugins/dagster/workflow.py

This file was deleted.

2 changes: 0 additions & 2 deletions gplugins/lumerical/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from __future__ import annotations

from gplugins.lumerical.interconnect import run_wavelength_sweep
from gplugins.lumerical.read import read_sparameters_lumerical
from gplugins.lumerical.write_sparameters_lumerical import (
write_sparameters_lumerical,
Expand All @@ -11,7 +10,6 @@

__all__ = [
"read_sparameters_lumerical",
"run_wavelength_sweep",
"write_sparameters_lumerical",
"write_sparameters_lumerical_components",
]
54 changes: 35 additions & 19 deletions gplugins/lumerical/interconnect.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
"""This module provides functions for interfacing with Lumerical Interconnect.

The author of this module switched to using SAX so we recommend SAX instead, which is open-source and more flexible.

"""

from __future__ import annotations

import contextlib
Expand Down Expand Up @@ -46,12 +52,12 @@ def add_interconnect_element(
Args:
session: Interconnect session.
label: label for Interconnect component.
model:
loc:
flip_vert:
flip_horiz:
rotation:
extra_props:
model: model name for Interconnect component.
loc: x,y location for Interconnect component.
flip_vert: whether to flip the component vertically.
flip_horiz: whether to flip the component horizontally.
rotation: rotation angle for the component.
simulation_props: properties for the simulation.

"""
props = OrderedDict(
Expand Down Expand Up @@ -107,12 +113,19 @@ def send_to_interconnect(
Args:
component: component from which to extract netlist.
session: Interconnect session.
ports_in: dictionary of input ports for the component.
ports_out: dictionary of output ports for the component.
placements: x,y pairs for where to place the components in the Interconnect GUI.
simulation_settings: global settings for Interconnect simulation.
drop_port_prefix: if components are written with some prefix, drop up to and including
the prefix character. (i.e. "c1_input" -> "input").
component_distance_scaling: scaling factor for component distances when
component_distance_scaling_x: scaling factor for component distances when
laying out Interconnect schematic.
component_distance_scaling_y: scaling factor for component distances when
laying out Interconnect schematic.
setup_mc: whether to set up Monte-Carlo simulation.
exclude_electrical: whether to exclude purely electrical components from the simulation.
settings: additional settings for the simulation.

"""
if not session:
Expand Down Expand Up @@ -346,18 +359,21 @@ def run_wavelength_sweep(
extra_ona_props: dict | None = None,
**kwargs,
) -> dict:
"""Args are the following.

component:
session:
setup_simulation: whether to send the component to interconnect before running the sweep.
ports_in: specify the port in the Interconnect model to attach the ONA output to.
ports_out: specify the ports in the Interconnect models to attach the ONA input to.
wavelength_range:
n_points:
results:
extra_ona_props:
kwargs:
"""Run a wavelength sweep on a component in Interconnect.

Args:
component: component to simulate.
session: Interconnect session.
setup_simulation: whether to send the component to interconnect before running the sweep.
is_top_level: whether the component is a top-level component.
ports_in: specify the port in the Interconnect model to attach the ONA output to.
ports_out: specify the ports in the Interconnect models to attach the ONA input to.
mode: mode to simulate.
wavelength_range: range of wavelengths to sweep over.
n_points: number of points in the sweep.
results: results to return.
extra_ona_props: additional properties for the ONA simulation.
kwargs: additional arguments for the simulation.
"""
if len(ports_in) > 1:
raise ValueError("Only 1 input port is supported at this time")
Expand Down
Loading