gplugins 1.3.2__tar.gz → 1.3.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {gplugins-1.3.2 → gplugins-1.3.4}/PKG-INFO +9 -10
- {gplugins-1.3.2 → gplugins-1.3.4}/README.md +1 -1
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/__init__.py +1 -1
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/common/base_models/component.py +0 -11
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/common/utils/get_component_with_net_layers.py +6 -8
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/common/utils/get_effective_indices.py +14 -11
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/common/utils/parse_layer_stack.py +7 -6
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/common/utils/plot.py +18 -15
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/gfviz/netlist.py +13 -3
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/gmeep/write_sparameters_meep_mpi.py +1 -1
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/gmsh/define_polysurfaces.py +12 -7
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/gmsh/uz_xsection_mesh.py +7 -7
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/gmsh/xyz_mesh.py +21 -16
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/klayout/get_netlist.py +3 -2
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/klayout/netlist_graph.py +3 -2
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/klayout/netlist_spice_reader.py +5 -3
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/klayout/plot_nets.py +3 -1
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/klayout/tests/test_plot_nets.py +7 -7
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/tidy3d/component.py +37 -44
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/tidy3d/tests/test_plot_simulation_grating_coupler.py +0 -15
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/vlsir/export_netlist.py +16 -10
- {gplugins-1.3.2 → gplugins-1.3.4}/pyproject.toml +10 -16
- gplugins-1.3.2/gplugins/common/utils/get_component_with_local_layers.py +0 -128
- {gplugins-1.3.2 → gplugins-1.3.4}/LICENSE +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/common/__init__.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/common/base_models/__init__.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/common/base_models/simulation.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/common/config.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/common/types.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/common/utils/__init__.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/common/utils/add_simulation_markers.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/common/utils/async_helpers.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/common/utils/cache.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/common/utils/convert_sparameters.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/common/utils/disable_print.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/common/utils/get_capacitance.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/common/utils/get_scattering.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/common/utils/get_sparameters_path.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/common/utils/optical_constants.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/common/utils/plot_csv.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/common/utils/port_symmetries.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/common/utils/tests/test_get_component_with_new_port_layers.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/devsim/__init__.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/devsim/doping.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/devsim/get_simulation.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/devsim/get_simulation_xsection.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/devsim/get_solver.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/devsim/test_devsim.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/elmer/__init__.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/elmer/electrostatic.sif.j2 +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/elmer/get_capacitance.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/elmer/tests/test_elmer.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/fdtdz/__init__.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/fdtdz/get_epsilon_fdtdz.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/fdtdz/get_ports_fdtdz.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/fdtdz/get_sparameters_fdtdz.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/femwell/__init__.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/femwell/mode_solver.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/femwell/solve_thermal.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/femwell/test_mode_solver.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/gfviz/Makefile +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/gfviz/__init__.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/gfviz/b64.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/gfviz/gfviz.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/gfviz/serve.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/gfviz/static/b64.js +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/gfviz/static/schemedit.js +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/gfviz/static/schemedit.wasm +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/gfviz/templates/example.json +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/gfviz/templates/index.html +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/gmeep/__init__.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/gmeep/get_material.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/gmeep/get_meep_geometry.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/gmeep/get_port_eigenmode.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/gmeep/get_simulation.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/gmeep/get_simulation_grating_farfield.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/gmeep/get_simulation_grating_fiber.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/gmeep/meep_adjoint_optimization.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/gmeep/test_eigenmode.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/gmeep/test_materials.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/gmeep/test_sparameterNxN/test_sparameterNxN_crossing.csv +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/gmeep/test_sparameterNxN/test_sparameterNxN_straight.csv +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/gmeep/test_write_sparameters_meep/test_sparameterNxN_crossing.csv +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/gmeep/test_write_sparameters_meep/test_sparameterNxN_straight.csv +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/gmeep/test_write_sparameters_meep/test_sparameterNxN_symmetries_straight.csv +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/gmeep/test_write_sparameters_meep/test_sparameter_straight_mpi.csv +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/gmeep/test_write_sparameters_meep/test_sparameter_straight_mpi_pool.csv +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/gmeep/test_write_sparameters_meep/test_sparameters_crossing_symmetric.csv +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/gmeep/test_write_sparameters_meep/test_sparameters_straight.csv +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/gmeep/test_write_sparameters_meep/test_sparameters_straight_batch.csv +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/gmeep/test_write_sparameters_meep/test_sparameters_straight_mpi.csv +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/gmeep/test_write_sparameters_meep/test_sparameters_straight_mpi_pool.csv +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/gmeep/test_write_sparameters_meep/test_sparameters_straight_symmetric.csv +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/gmeep/test_write_sparameters_meep.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/gmeep/write_sparameters_grating.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/gmeep/write_sparameters_meep.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/gmeep/write_sparameters_meep_batch.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/gmsh/__init__.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/gmsh/get_mesh.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/gmsh/parse_component.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/gmsh/parse_gds.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/gmsh/tests/test_custom_names.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/gmsh/tests/test_meshing_2D.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/gmsh/tests/test_meshing_3D.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/gmsh/xy_xsection_mesh.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/klayout/__init__.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/klayout/dataprep/__init__.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/klayout/dataprep/regions.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/klayout/drc/__init__.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/klayout/drc/check_duplicated_cells.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/klayout/drc/check_exclusion.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/klayout/drc/check_inclusion.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/klayout/drc/check_space.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/klayout/drc/check_width.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/klayout/drc/count_drc.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/klayout/drc/samples/drc_errors.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/klayout/drc/write_drc.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/klayout/get_density.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/klayout/tests/test_dataprep_regions.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/klayout/tests/test_density.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/klayout/tests/test_drc_exclusion.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/klayout/tests/test_drc_inclusion.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/klayout/tests/test_drc_space.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/klayout/tests/test_drc_width.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/klayout/tests/test_global_density.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/klayout/tests/test_netlist_spice_reader.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/lumerical/README.md +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/lumerical/__init__.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/lumerical/interconnect.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/lumerical/mapping_ubcpdk.yml +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/lumerical/read.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/lumerical/settings.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/lumerical/tests/test_lumerical_read_sparameters.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/lumerical/tests/test_netlist.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/lumerical/tests/test_netlist_get_routes.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/lumerical/write_sparameters_lumerical.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/lumerical/write_sparameters_lumerical_components.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/materials/__init__.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/materials/inorganic.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/materials/optical/__init__.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/materials/optical/optical_mat.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/materials/optical/refractive_index_info.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/materials/semiconductor/__init__.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/materials/semiconductor/semiconductor_mat.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/meow/__init__.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/meow/meow_eme.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/meow/test_meow_simulation.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/modes/__init__.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/modes/coupler.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/modes/find_coupling_vs_gap.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/modes/find_mode_dispersion.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/modes/find_modes.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/modes/find_modes_cross_section.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/modes/find_neff_ng_dw_dh.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/modes/find_neff_vs_width.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/modes/get_mode_solver_coupler.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/modes/get_mode_solver_cross_section.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/modes/get_mode_solver_rib.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/modes/modes/neff_vs_width_nitride.csv +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/modes/modes/neff_vs_width_rib.csv +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/modes/modes/neff_vs_width_strip.csv +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/modes/neff_convergence_test.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/modes/neff_vs_width.csv +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/modes/overlap.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/modes/tests/test_dw_dh/test_dw_dh.csv +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/modes/tests/test_dw_dh/test_dw_dh.obtained.csv +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/modes/tests/test_dw_dh/test_dw_dh_dispersion.csv +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/modes/tests/test_dw_dh.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/modes/tests/test_find_modes.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/modes/tests/test_find_modes_dispersion.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/modes/tests/test_neff_vs_width/test_neff_vs_width.csv +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/modes/tests/test_neff_vs_width/test_neff_vs_width.obtained.csv +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/modes/tests/test_neff_vs_width.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/modes/types.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/modes/waveguide.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/palace/__init__.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/palace/driven.json +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/palace/electrostatic.json +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/palace/get_capacitance.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/palace/get_scattering.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/palace/tests/test_palace.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/path_length_analysis/__init__.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/path_length_analysis/path_length_analysis.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/path_length_analysis/path_length_analysis_from_gds.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/path_length_analysis/test_pathlength_extraction.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/photonic_circuit_models/__init__.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/photonic_circuit_models/coupler.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/photonic_circuit_models/fsr.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/photonic_circuit_models/heater.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/photonic_circuit_models/mzi.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/photonic_circuit_models/ring.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/process/__init__.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/process/diffusion.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/process/implant_tables.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/process/pysrim.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/process/silicon.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/process/skew/antimony_si_skew.csv +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/process/skew/arsenic_si_skew.csv +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/process/skew/boron_si_skew.csv +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/process/skew/phosphorus_si_skew.csv +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/sax/__init__.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/sax/build_model.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/sax/integrations/__init__.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/sax/integrations/femwell_waveguide_model.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/sax/integrations/meep_FDTD_model.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/sax/integrations/meow_eme_model.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/sax/interpolators.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/sax/mlp.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/sax/models.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/sax/parameter.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/sax/plot_model.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/sax/read.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/sax/tests/test_mzi.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/sax/tests/test_mzi_lattice/test_mzi_lattice.obtained.yml +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/sax/tests/test_mzi_lattice/test_mzi_lattice.yml +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/sax/tests/test_mzi_lattice.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/sax/tests/test_parameters.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/sentaurus/mask_sde.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/sentaurus/mask_sprocess.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/sentaurus/sde.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/sentaurus/sdevice.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/sentaurus/sprocess.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/sentaurus/svisual.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/spice/__init__.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/spice/spice_to_yaml.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/spice/tests/__init__.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/spice/tests/test_interconnect.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/tidy3d/__init__.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/tidy3d/get_results.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/tidy3d/get_simulation_grating_coupler.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/tidy3d/materials.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/tidy3d/modes.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/tidy3d/tests/test_component_modeler.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/tidy3d/tests/test_materials.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/tidy3d/tests/test_modes/test_sweep_width.csv +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/tidy3d/tests/test_modes/test_sweep_width.obtained.csv +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/tidy3d/tests/test_modes_coupler.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/tidy3d/tests/test_modes_waveguide.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/tidy3d/tests/test_write_sparameters.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/tidy3d/tests/tests_sparameters/sim_ref.yaml +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/tidy3d/tests/tests_sparameters/test_write_sparameters.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/tidy3d/tests/tests_sparameters/test_write_sparameters_grating_coupler.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/tidy3d/types.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/tidy3d/util.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/tidy3d/write_sparameters_grating_coupler.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/typings.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/vlsir/__init__.py +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/vlsir/tests/resources/pads_correct.cir +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/vlsir/tests/resources/pads_correct.scs +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/vlsir/tests/resources/pads_correct.sp +0 -0
- {gplugins-1.3.2 → gplugins-1.3.4}/gplugins/vlsir/tests/test_vlsir.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: gplugins
|
|
3
|
-
Version: 1.3.
|
|
3
|
+
Version: 1.3.4
|
|
4
4
|
Summary: gdsfactory plugins
|
|
5
5
|
Keywords: python
|
|
6
6
|
Author-email: gdsfactory <contact@gdsfactory.com>
|
|
@@ -11,9 +11,8 @@ Classifier: Programming Language :: Python :: 3.11
|
|
|
11
11
|
Classifier: Programming Language :: Python :: 3.12
|
|
12
12
|
Classifier: Operating System :: OS Independent
|
|
13
13
|
License-File: LICENSE
|
|
14
|
-
Requires-Dist: gdsfactory>=9.
|
|
14
|
+
Requires-Dist: gdsfactory>=9.3.5
|
|
15
15
|
Requires-Dist: pint
|
|
16
|
-
Requires-Dist: gdstk
|
|
17
16
|
Requires-Dist: tqdm
|
|
18
17
|
Requires-Dist: numpy
|
|
19
18
|
Requires-Dist: xarray==2025.1.2
|
|
@@ -22,14 +21,14 @@ Requires-Dist: pytest ; extra == "dev"
|
|
|
22
21
|
Requires-Dist: pytest-cov ; extra == "dev"
|
|
23
22
|
Requires-Dist: pytest_regressions ; extra == "dev"
|
|
24
23
|
Requires-Dist: pyswarms ; extra == "dev"
|
|
25
|
-
Requires-Dist: autograd ; extra == "dev"
|
|
26
24
|
Requires-Dist: devsim ; extra == "devsim"
|
|
27
25
|
Requires-Dist: pyvista<=0.43.8 ; extra == "devsim"
|
|
28
|
-
Requires-Dist: tidy3d>=2.
|
|
26
|
+
Requires-Dist: tidy3d>=2.8.2,<2.9 ; extra == "devsim"
|
|
29
27
|
Requires-Dist: jupytext ; extra == "docs"
|
|
30
28
|
Requires-Dist: matplotlib ; extra == "docs"
|
|
31
29
|
Requires-Dist: jupyter-book~=1.0 ; extra == "docs"
|
|
32
30
|
Requires-Dist: pyvista[all]<=0.43.8 ; extra == "docs"
|
|
31
|
+
Requires-Dist: bokeh ; extra == "docs"
|
|
33
32
|
Requires-Dist: femwell~=0.1.11 ; extra == "femwell"
|
|
34
33
|
Requires-Dist: meshwell~=1.0.7 ; extra == "femwell"
|
|
35
34
|
Requires-Dist: jinja2 ; extra == "gfviz"
|
|
@@ -57,9 +56,8 @@ Requires-Dist: towncrier ; extra == "maintainer"
|
|
|
57
56
|
Requires-Dist: jax>=0.4.26 ; extra == "meow"
|
|
58
57
|
Requires-Dist: jaxlib>=0.4.26 ; extra == "meow"
|
|
59
58
|
Requires-Dist: flax>=0.8.2 ; extra == "meow"
|
|
60
|
-
Requires-Dist: meow-sim>=0.
|
|
61
|
-
Requires-Dist: tidy3d>=2.
|
|
62
|
-
Requires-Dist: scipy<=1.14.1 ; extra == "meow"
|
|
59
|
+
Requires-Dist: meow-sim>=0.13,<0.14 ; extra == "meow"
|
|
60
|
+
Requires-Dist: tidy3d>=2.8.2,<2.9 ; extra == "meow"
|
|
63
61
|
Requires-Dist: jax>=0.4.26 ; extra == "sax"
|
|
64
62
|
Requires-Dist: jaxlib>=0.4.26 ; extra == "sax"
|
|
65
63
|
Requires-Dist: flax>=0.8.2 ; extra == "sax"
|
|
@@ -70,10 +68,11 @@ Requires-Dist: ray ; extra == "sax"
|
|
|
70
68
|
Requires-Dist: bokeh ; extra == "schematic"
|
|
71
69
|
Requires-Dist: ipywidgets ; extra == "schematic"
|
|
72
70
|
Requires-Dist: natsort ; extra == "schematic"
|
|
73
|
-
Requires-Dist: tidy3d>=2.
|
|
71
|
+
Requires-Dist: tidy3d>=2.8.2,<2.9 ; extra == "tidy3d"
|
|
74
72
|
Requires-Dist: meshio ; extra == "tidy3d"
|
|
75
73
|
Requires-Dist: numpy ; extra == "tidy3d"
|
|
76
74
|
Requires-Dist: meshwell~=1.0.7 ; extra == "tidy3d"
|
|
75
|
+
Requires-Dist: gdstk ; extra == "tidy3d"
|
|
77
76
|
Requires-Dist: vlsir ; extra == "vlsir"
|
|
78
77
|
Requires-Dist: vlsirtools ; extra == "vlsir"
|
|
79
78
|
Provides-Extra: dev
|
|
@@ -91,7 +90,7 @@ Provides-Extra: schematic
|
|
|
91
90
|
Provides-Extra: tidy3d
|
|
92
91
|
Provides-Extra: vlsir
|
|
93
92
|
|
|
94
|
-
# gplugins 1.3.
|
|
93
|
+
# gplugins 1.3.4
|
|
95
94
|
|
|
96
95
|
[](https://gdsfactory.github.io/gplugins/)
|
|
97
96
|
[](https://pypi.org/project/gplugins/)
|
|
@@ -248,14 +248,3 @@ class LayeredComponentBase(BaseModel):
|
|
|
248
248
|
def get_layer_center(self, layername: str) -> tuple[float, float, float]:
|
|
249
249
|
bbox = self.get_layer_bbox(layername)
|
|
250
250
|
return tuple(np.mean(bbox, axis=0))
|
|
251
|
-
|
|
252
|
-
def get_vertices(self, layer_name: str, buffer: float = 0.0):
|
|
253
|
-
poly = self.polygons[layer_name].buffer(buffer, join_style="mitre")
|
|
254
|
-
match poly:
|
|
255
|
-
case MultiPolygon():
|
|
256
|
-
verts = tuple(tuple(p.exterior.coords) for p in poly.geoms)
|
|
257
|
-
case Polygon():
|
|
258
|
-
verts = (tuple(poly.exterior.coords),)
|
|
259
|
-
case _:
|
|
260
|
-
raise TypeError(f"Invalid polygon type: {type(poly)}")
|
|
261
|
-
return verts
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import copy
|
|
2
2
|
|
|
3
3
|
import gdsfactory as gf
|
|
4
|
+
import klayout.db as kdb
|
|
4
5
|
from gdsfactory import Component
|
|
5
6
|
from gdsfactory.technology import LayerStack, LogicalLayer
|
|
6
7
|
|
|
@@ -35,8 +36,8 @@ def get_component_layer_stack(
|
|
|
35
36
|
|
|
36
37
|
|
|
37
38
|
def get_component_with_net_layers(
|
|
38
|
-
component,
|
|
39
|
-
layer_stack,
|
|
39
|
+
component: Component,
|
|
40
|
+
layer_stack: LayerStack,
|
|
40
41
|
port_names: list[str],
|
|
41
42
|
delimiter: str = "#",
|
|
42
43
|
new_layers_init: tuple[int, int] = (10010, 0),
|
|
@@ -74,7 +75,9 @@ def get_component_with_net_layers(
|
|
|
74
75
|
net_component = net_component.remove_layers(layers=(port.layer,))
|
|
75
76
|
for polygon in polygons:
|
|
76
77
|
# If polygon belongs to port, create a unique new layer, and add the polygon to it
|
|
77
|
-
if polygon.sized(3 * gf.kcl.dbu).inside(
|
|
78
|
+
if polygon.sized(int(3 * gf.kcl.dbu)).inside(
|
|
79
|
+
kdb.Point(*port.to_itype().center)
|
|
80
|
+
):
|
|
78
81
|
# if gdstk.inside(
|
|
79
82
|
# [port.center],
|
|
80
83
|
# gdstk.offset(gdstk.Polygon(polygon), gf.get_active_pdk().grid_size),
|
|
@@ -111,8 +114,3 @@ def get_component_with_net_layers(
|
|
|
111
114
|
|
|
112
115
|
net_component.name = f"{component.name}_net_layers"
|
|
113
116
|
return net_component
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
if __name__ == "__main__":
|
|
117
|
-
c = get_component_with_net_layers()
|
|
118
|
-
c.show()
|
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
from typing import Literal
|
|
5
|
+
from typing import Any, Literal, cast
|
|
6
6
|
|
|
7
7
|
import numpy as np
|
|
8
|
+
import numpy.typing as npt
|
|
8
9
|
from scipy.optimize import fsolve
|
|
9
10
|
|
|
10
11
|
|
|
@@ -19,9 +20,9 @@ def get_effective_indices(
|
|
|
19
20
|
"""Returns the effective refractive indices for a 1D mode.
|
|
20
21
|
|
|
21
22
|
Args:
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
core_material: Refractive index of the core material.
|
|
24
|
+
nsubstrate: Refractive index of the substrate.
|
|
25
|
+
clad_materialding: Refractive index of the cladding.
|
|
25
26
|
thickness: Thickness of the film in um.
|
|
26
27
|
wavelength: Wavelength in um.
|
|
27
28
|
polarization: Either "te" or "tm".
|
|
@@ -66,18 +67,20 @@ def get_effective_indices(
|
|
|
66
67
|
|
|
67
68
|
k_0 = 2 * np.pi / wavelength
|
|
68
69
|
|
|
69
|
-
def k_f(e_eff):
|
|
70
|
+
def k_f(e_eff: npt.NDArray[np.floating[Any]]) -> npt.NDArray[np.floating[Any]]:
|
|
70
71
|
return k_0 * np.sqrt(epsilon_core - e_eff) / (epsilon_core if tm else 1)
|
|
71
72
|
|
|
72
|
-
def k_s(e_eff):
|
|
73
|
+
def k_s(e_eff: npt.NDArray[np.floating[Any]]) -> npt.NDArray[np.floating[Any]]:
|
|
73
74
|
return (
|
|
74
75
|
k_0 * np.sqrt(e_eff - epsilon_substrate) / (epsilon_substrate if tm else 1)
|
|
75
76
|
)
|
|
76
77
|
|
|
77
|
-
def k_c(e_eff):
|
|
78
|
+
def k_c(e_eff: npt.NDArray[np.floating[Any]]) -> npt.NDArray[np.floating[Any]]:
|
|
78
79
|
return k_0 * np.sqrt(e_eff - epsilon_cladding) / (epsilon_cladding if tm else 1)
|
|
79
80
|
|
|
80
|
-
def objective(
|
|
81
|
+
def objective(
|
|
82
|
+
e_eff: npt.NDArray[np.floating[Any]],
|
|
83
|
+
) -> npt.NDArray[np.floating[Any]]:
|
|
81
84
|
return 1 / np.tan(k_f(e_eff) * thickness) - (
|
|
82
85
|
k_f(e_eff) ** 2 - k_s(e_eff) * k_c(e_eff)
|
|
83
86
|
) / (k_f(e_eff) * (k_s(e_eff) + k_c(e_eff)))
|
|
@@ -92,14 +95,14 @@ def get_effective_indices(
|
|
|
92
95
|
return []
|
|
93
96
|
|
|
94
97
|
# and then use fsolve to get exact indices
|
|
95
|
-
indices_temp = fsolve(objective, indices_temp)
|
|
98
|
+
indices_temp = cast(npt.NDArray[np.floating[Any]], fsolve(objective, indices_temp))
|
|
96
99
|
|
|
97
|
-
indices = []
|
|
100
|
+
indices: list[float] = []
|
|
98
101
|
for index in indices_temp:
|
|
99
102
|
if not any(np.isclose(index, i, atol=1e-5) for i in indices):
|
|
100
103
|
indices.append(index)
|
|
101
104
|
|
|
102
|
-
return np.sqrt(indices).tolist()
|
|
105
|
+
return cast(list[float], np.sqrt(indices).tolist())
|
|
103
106
|
|
|
104
107
|
|
|
105
108
|
def test_effective_index() -> None:
|
|
@@ -26,7 +26,7 @@ def list_unique_layer_stack_z(
|
|
|
26
26
|
def map_unique_layer_stack_z(
|
|
27
27
|
layer_stack: LayerStack,
|
|
28
28
|
include_zmax: bool = True,
|
|
29
|
-
):
|
|
29
|
+
) -> dict[str, set[float]]:
|
|
30
30
|
"""Map unique LayerStack z coordinates to various layers.
|
|
31
31
|
|
|
32
32
|
Args:
|
|
@@ -57,7 +57,7 @@ def map_unique_layer_stack_z(
|
|
|
57
57
|
def get_layer_overlaps_z(
|
|
58
58
|
layer_stack: LayerStack,
|
|
59
59
|
include_zmax: bool = True,
|
|
60
|
-
):
|
|
60
|
+
) -> dict[float, set[str]]:
|
|
61
61
|
"""Maps layers to unique LayerStack z coordinates.
|
|
62
62
|
|
|
63
63
|
Args:
|
|
@@ -67,7 +67,7 @@ def get_layer_overlaps_z(
|
|
|
67
67
|
"""
|
|
68
68
|
z_grid = list_unique_layer_stack_z(layer_stack)
|
|
69
69
|
unique_z_dict = map_unique_layer_stack_z(layer_stack, include_zmax)
|
|
70
|
-
intersection_z_dict = {}
|
|
70
|
+
intersection_z_dict: dict[float, set[str]] = {}
|
|
71
71
|
for z in z_grid:
|
|
72
72
|
current_layers = {
|
|
73
73
|
layername for layername, layer_zs in unique_z_dict.items() if z in layer_zs
|
|
@@ -77,11 +77,12 @@ def get_layer_overlaps_z(
|
|
|
77
77
|
return intersection_z_dict
|
|
78
78
|
|
|
79
79
|
|
|
80
|
-
def get_layers_at_z(layer_stack: LayerStack, z: float):
|
|
80
|
+
def get_layers_at_z(layer_stack: LayerStack, z: float) -> list[str]:
|
|
81
81
|
"""Returns layers present at a given z-position.
|
|
82
82
|
|
|
83
83
|
Args:
|
|
84
84
|
layer_stack: LayerStack
|
|
85
|
+
z: float
|
|
85
86
|
Returns:
|
|
86
87
|
List of layers
|
|
87
88
|
"""
|
|
@@ -93,11 +94,11 @@ def get_layers_at_z(layer_stack: LayerStack, z: float):
|
|
|
93
94
|
raise ValueError("Requested z-value is above the minimum layer_stack z")
|
|
94
95
|
for z_unique in intersection_z_dict.keys():
|
|
95
96
|
if z <= z_unique:
|
|
96
|
-
return intersection_z_dict[z_unique]
|
|
97
|
+
return list(intersection_z_dict[z_unique])
|
|
97
98
|
raise AssertionError("Could not find z-value in layer_stack z-range.")
|
|
98
99
|
|
|
99
100
|
|
|
100
|
-
def order_layer_stack(layer_stack: LayerStack):
|
|
101
|
+
def order_layer_stack(layer_stack: LayerStack) -> list[str]:
|
|
101
102
|
"""Orders layer_stack according to mesh_order.
|
|
102
103
|
|
|
103
104
|
Args:
|
|
@@ -4,13 +4,17 @@ import re
|
|
|
4
4
|
from collections.abc import Sequence
|
|
5
5
|
from functools import partial
|
|
6
6
|
from itertools import combinations
|
|
7
|
+
from typing import Any
|
|
7
8
|
|
|
8
|
-
import gdsfactory as gf
|
|
9
9
|
import matplotlib.pyplot as plt
|
|
10
10
|
import numpy as np
|
|
11
|
+
import numpy.typing as npt
|
|
12
|
+
from matplotlib.axes import Axes
|
|
11
13
|
|
|
12
14
|
|
|
13
|
-
def _check_ports(
|
|
15
|
+
def _check_ports(
|
|
16
|
+
sp: dict[str, npt.NDArray[np.floating[Any]]], ports: Sequence[str]
|
|
17
|
+
) -> None:
|
|
14
18
|
"""Ensure ports exist in Sparameters."""
|
|
15
19
|
for port in ports:
|
|
16
20
|
if port not in sp:
|
|
@@ -18,7 +22,7 @@ def _check_ports(sp: dict[str, np.ndarray], ports: Sequence[str]) -> None:
|
|
|
18
22
|
|
|
19
23
|
|
|
20
24
|
def plot_sparameters(
|
|
21
|
-
sp: dict[str, np.
|
|
25
|
+
sp: dict[str, npt.NDArray[np.floating[Any]]],
|
|
22
26
|
logscale: bool = True,
|
|
23
27
|
plot_phase: bool = False,
|
|
24
28
|
keys: tuple[str, ...] | None = None,
|
|
@@ -39,7 +43,7 @@ def plot_sparameters(
|
|
|
39
43
|
|
|
40
44
|
"""
|
|
41
45
|
w = sp["wavelengths"] * units
|
|
42
|
-
keys = keys or
|
|
46
|
+
keys = keys or tuple(key for key in sp if not key.lower().startswith("wav"))
|
|
43
47
|
|
|
44
48
|
for key in keys:
|
|
45
49
|
if with_simpler_input_keys:
|
|
@@ -74,9 +78,12 @@ def plot_sparameters(
|
|
|
74
78
|
|
|
75
79
|
|
|
76
80
|
def plot_imbalance(
|
|
77
|
-
sp: dict[str, np.
|
|
81
|
+
sp: dict[str, npt.NDArray[np.floating[Any]]],
|
|
82
|
+
ports: Sequence[str],
|
|
83
|
+
ax: Axes | None = None,
|
|
78
84
|
) -> None:
|
|
79
85
|
"""Plots imbalance in dB for coupler.
|
|
86
|
+
|
|
80
87
|
The imbalance is always defined between two ports, so this function plots the
|
|
81
88
|
imbalance between all unique port combinations.
|
|
82
89
|
|
|
@@ -107,7 +114,9 @@ def plot_imbalance(
|
|
|
107
114
|
|
|
108
115
|
|
|
109
116
|
def plot_loss(
|
|
110
|
-
sp: dict[str, np.
|
|
117
|
+
sp: dict[str, npt.NDArray[np.floating[Any]]],
|
|
118
|
+
ports: Sequence[str],
|
|
119
|
+
ax: Axes | None = None,
|
|
111
120
|
) -> None:
|
|
112
121
|
"""Plots loss dB for coupler.
|
|
113
122
|
|
|
@@ -137,7 +146,9 @@ def plot_loss(
|
|
|
137
146
|
|
|
138
147
|
|
|
139
148
|
def plot_reflection(
|
|
140
|
-
sp: dict[str, np.
|
|
149
|
+
sp: dict[str, npt.NDArray[np.floating[Any]]],
|
|
150
|
+
ports: Sequence[str],
|
|
151
|
+
ax: Axes | None = None,
|
|
141
152
|
) -> None:
|
|
142
153
|
"""Plots reflection in dB for coupler.
|
|
143
154
|
|
|
@@ -172,11 +183,3 @@ plot_imbalance1x2 = partial(plot_imbalance, ports=["o1@0,o2@0", "o1@0,o3@0"])
|
|
|
172
183
|
plot_imbalance2x2 = partial(plot_imbalance, ports=["o1@0,o3@0", "o1@0,o4@0"])
|
|
173
184
|
plot_reflection1x2 = partial(plot_reflection, ports=["o1@0,o1@0"])
|
|
174
185
|
plot_reflection2x2 = partial(plot_reflection, ports=["o1@0,o1@0", "o2@0,o1@0"])
|
|
175
|
-
|
|
176
|
-
if __name__ == "__main__":
|
|
177
|
-
import gplugins as sim
|
|
178
|
-
|
|
179
|
-
sp = sim.get_sparameters_data_tidy3d(component=gf.components.mmi1x2)
|
|
180
|
-
# plot_sparameters(sp, logscale=False, keys=["o1@0,o2@0"])
|
|
181
|
-
# plot_sparameters(sp, logscale=False, keys=["S21"])
|
|
182
|
-
# plt.show()
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
from functools import lru_cache
|
|
2
2
|
|
|
3
3
|
import gdsfactory as gf
|
|
4
|
-
import gdstk
|
|
5
4
|
import numpy as np
|
|
6
5
|
import shapely.geometry as sg
|
|
6
|
+
import shapely.ops as so
|
|
7
7
|
from natsort import natsorted
|
|
8
8
|
|
|
9
9
|
|
|
@@ -225,10 +225,12 @@ def get_icon_poly(name):
|
|
|
225
225
|
polys = min(polys_priority.items(), key=lambda x: x[0])[1]
|
|
226
226
|
if not polys:
|
|
227
227
|
return default
|
|
228
|
-
polys =
|
|
228
|
+
polys = [sg.Polygon(p) for p in polys]
|
|
229
|
+
polys = so.unary_union(polys)
|
|
230
|
+
polys = _extract_vertices(polys)
|
|
229
231
|
if not polys:
|
|
230
232
|
return default
|
|
231
|
-
poly = rdp(polys[0]
|
|
233
|
+
poly = rdp(polys[0])
|
|
232
234
|
if (poly.shape[0] < 3) or (poly.shape[0] > 100):
|
|
233
235
|
return default
|
|
234
236
|
poly = (poly - c.bbox_np()[0:1]) / (c.bbox_np()[1:2] - c.bbox_np()[0:1])
|
|
@@ -242,6 +244,14 @@ def get_icon_poly(name):
|
|
|
242
244
|
return poly
|
|
243
245
|
|
|
244
246
|
|
|
247
|
+
def _extract_vertices(geometry):
|
|
248
|
+
if geometry.geom_type == 'Polygon':
|
|
249
|
+
return [list(geometry.exterior.coords)]
|
|
250
|
+
elif geometry.geom_type == 'MultiPolygon':
|
|
251
|
+
return [list(p.exterior.coords) for p in geometry.geoms]
|
|
252
|
+
else:
|
|
253
|
+
raise TypeError(f"Unhandled geometry type: {geometry.geom_type}")
|
|
254
|
+
|
|
245
255
|
def rdp(poly, eps=0.1):
|
|
246
256
|
poly = np.asarray(poly)
|
|
247
257
|
if not poly.shape:
|
|
@@ -164,7 +164,7 @@ def write_sparameters_meep_mpi(
|
|
|
164
164
|
with open(parameters_file, "wb") as outp:
|
|
165
165
|
pickle.dump(settings, outp, pickle.HIGHEST_PROTOCOL)
|
|
166
166
|
|
|
167
|
-
# Save component to disk through gds
|
|
167
|
+
# Save component to disk through gds
|
|
168
168
|
component_file = tempfile.with_suffix(".gds")
|
|
169
169
|
component.write_gds(component_file, with_metadata=True)
|
|
170
170
|
|
|
@@ -6,16 +6,16 @@ from shapely.affinity import scale
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
def define_polysurfaces(
|
|
9
|
-
polygons_dict: dict,
|
|
9
|
+
polygons_dict: dict[str, Any],
|
|
10
10
|
layer_stack: LayerStack,
|
|
11
|
-
layer_physical_map: dict,
|
|
12
|
-
layer_meshbool_map: dict,
|
|
11
|
+
layer_physical_map: dict[str, Any],
|
|
12
|
+
layer_meshbool_map: dict[str, Any],
|
|
13
13
|
model: Any,
|
|
14
|
-
resolutions: dict,
|
|
14
|
+
resolutions: dict[str, Any] | None = None,
|
|
15
15
|
scale_factor: float = 1,
|
|
16
|
-
):
|
|
16
|
+
) -> list[PolySurface]:
|
|
17
17
|
"""Define meshwell polysurfaces dimtags from gdsfactory information."""
|
|
18
|
-
polysurfaces_list = []
|
|
18
|
+
polysurfaces_list: list[PolySurface] = []
|
|
19
19
|
|
|
20
20
|
if resolutions is None:
|
|
21
21
|
resolutions = {}
|
|
@@ -24,6 +24,11 @@ def define_polysurfaces(
|
|
|
24
24
|
if polygons_dict[layername].is_empty:
|
|
25
25
|
continue
|
|
26
26
|
|
|
27
|
+
layer_stack_ = layer_stack.layers.get(layername)
|
|
28
|
+
|
|
29
|
+
if layer_stack_ is None:
|
|
30
|
+
continue
|
|
31
|
+
|
|
27
32
|
polysurfaces_list.append(
|
|
28
33
|
PolySurface(
|
|
29
34
|
polygons=scale(
|
|
@@ -33,7 +38,7 @@ def define_polysurfaces(
|
|
|
33
38
|
),
|
|
34
39
|
model=model,
|
|
35
40
|
resolution=resolutions.get(layername, None),
|
|
36
|
-
mesh_order=
|
|
41
|
+
mesh_order=layer_stack_.mesh_order,
|
|
37
42
|
physical_name=layer_physical_map[layername]
|
|
38
43
|
if layername in layer_physical_map
|
|
39
44
|
else layername,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
# type: ignore
|
|
2
1
|
from __future__ import annotations
|
|
3
2
|
|
|
4
3
|
from collections.abc import Sequence
|
|
4
|
+
from typing import Any
|
|
5
5
|
|
|
6
6
|
import gdsfactory as gf
|
|
7
7
|
import numpy as np
|
|
@@ -206,12 +206,12 @@ def uz_xsection_mesh(
|
|
|
206
206
|
component: ComponentOrReference,
|
|
207
207
|
xsection_bounds: tuple[tuple[float, float], tuple[float, float]],
|
|
208
208
|
layer_stack: LayerStack,
|
|
209
|
-
layer_physical_map: dict,
|
|
210
|
-
layer_meshbool_map: dict,
|
|
211
|
-
resolutions: dict | None = None,
|
|
209
|
+
layer_physical_map: dict[str, Any],
|
|
210
|
+
layer_meshbool_map: dict[str, Any],
|
|
211
|
+
resolutions: dict[str, Any] | None = None,
|
|
212
212
|
default_characteristic_length: float = 0.5,
|
|
213
213
|
background_tag: str | None = None,
|
|
214
|
-
background_padding: Sequence[float
|
|
214
|
+
background_padding: Sequence[float] = (2.0,) * 6,
|
|
215
215
|
background_mesh_order: int | float = 2**63 - 1,
|
|
216
216
|
global_scaling: float = 1,
|
|
217
217
|
global_scaling_premesh: float = 1,
|
|
@@ -225,9 +225,9 @@ def uz_xsection_mesh(
|
|
|
225
225
|
n_threads: int = get_number_of_cores(),
|
|
226
226
|
gmsh_version: float | None = None,
|
|
227
227
|
interface_delimiter: str = "___",
|
|
228
|
-
background_remeshing_file=None,
|
|
228
|
+
background_remeshing_file: str | None = None,
|
|
229
229
|
optimization_flags: tuple[tuple[str, int]] | None = None,
|
|
230
|
-
**kwargs,
|
|
230
|
+
**kwargs: Any,
|
|
231
231
|
):
|
|
232
232
|
"""Mesh uz cross-section of component along line u = [[x1,y1] , [x2,y2]].
|
|
233
233
|
|
|
@@ -26,10 +26,10 @@ from gplugins.gmsh.parse_gds import cleanup_component
|
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
def define_edgeport(
|
|
29
|
-
port,
|
|
30
|
-
port_dict,
|
|
31
|
-
model,
|
|
32
|
-
layerlevel,
|
|
29
|
+
port: gf.Port,
|
|
30
|
+
port_dict: dict[str, Any],
|
|
31
|
+
model: Model,
|
|
32
|
+
layerlevel: LayerLevel,
|
|
33
33
|
):
|
|
34
34
|
"""Creates an unmeshed box at the port location to tag the edge port surfaces in the final mesh."""
|
|
35
35
|
zmin = port_dict.get("zmin") or layerlevel.zmin
|
|
@@ -73,12 +73,12 @@ def define_edgeport(
|
|
|
73
73
|
|
|
74
74
|
|
|
75
75
|
def define_prisms(
|
|
76
|
-
layer_polygons_dict: dict,
|
|
76
|
+
layer_polygons_dict: dict[str, Any],
|
|
77
77
|
layer_stack: LayerStack,
|
|
78
|
-
layer_physical_map: dict,
|
|
79
|
-
layer_meshbool_map: dict,
|
|
78
|
+
layer_physical_map: dict[str, Any],
|
|
79
|
+
layer_meshbool_map: dict[str, Any],
|
|
80
80
|
model: Any,
|
|
81
|
-
resolutions: dict,
|
|
81
|
+
resolutions: dict[str, Any] | None = None,
|
|
82
82
|
scale_factor: float = 1,
|
|
83
83
|
):
|
|
84
84
|
"""Define meshwell prism dimtags from gdsfactory information.
|
|
@@ -92,7 +92,7 @@ def define_prisms(
|
|
|
92
92
|
resolutions: Pairs {"layername": {"resolution": float, "distance": "float}} to roughly control mesh refinement..
|
|
93
93
|
scale_factor: scaling factor to apply to the polygons (default: 1).
|
|
94
94
|
"""
|
|
95
|
-
prisms_list = []
|
|
95
|
+
prisms_list: list[Prism] = []
|
|
96
96
|
buffered_layer_stack = bufferize(layer_stack)
|
|
97
97
|
|
|
98
98
|
if resolutions is None:
|
|
@@ -102,14 +102,19 @@ def define_prisms(
|
|
|
102
102
|
if layer_polygons_dict[layername].is_empty:
|
|
103
103
|
continue
|
|
104
104
|
|
|
105
|
-
|
|
105
|
+
layer_ = buffered_layer_stack.layers[layername]
|
|
106
|
+
|
|
107
|
+
z_to_bias = layer_.z_to_bias
|
|
108
|
+
|
|
109
|
+
if z_to_bias is None:
|
|
110
|
+
continue
|
|
111
|
+
|
|
112
|
+
coords = np.array(z_to_bias[0])
|
|
106
113
|
zs = (
|
|
107
114
|
coords * buffered_layer_stack.layers[layername].thickness * scale_factor
|
|
108
115
|
+ buffered_layer_stack.layers[layername].zmin * scale_factor
|
|
109
116
|
)
|
|
110
|
-
buffers = (
|
|
111
|
-
np.array(buffered_layer_stack.layers[layername].z_to_bias[1]) * scale_factor
|
|
112
|
-
)
|
|
117
|
+
buffers = np.array(z_to_bias[1]) * scale_factor
|
|
113
118
|
|
|
114
119
|
buffer_dict = dict(zip(zs, buffers))
|
|
115
120
|
|
|
@@ -137,9 +142,9 @@ def define_prisms(
|
|
|
137
142
|
def xyz_mesh(
|
|
138
143
|
component: ComponentOrReference,
|
|
139
144
|
layer_stack: LayerStack,
|
|
140
|
-
layer_physical_map: dict,
|
|
141
|
-
layer_meshbool_map: dict,
|
|
142
|
-
resolutions: dict | None = None,
|
|
145
|
+
layer_physical_map: dict[str, Any],
|
|
146
|
+
layer_meshbool_map: dict[str, Any],
|
|
147
|
+
resolutions: dict[str, Any] | None = None,
|
|
143
148
|
default_characteristic_length: float = 0.5,
|
|
144
149
|
background_tag: str | None = None,
|
|
145
150
|
background_padding: tuple[float, float, float, float, float, float] = (2.0,) * 6,
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
# type: ignore
|
|
2
1
|
from typing import Any
|
|
3
2
|
|
|
4
3
|
import gdsfactory as gf
|
|
@@ -35,7 +34,8 @@ def get_l2n(
|
|
|
35
34
|
klayout_tech_path = tech_dir / "tech.lyt"
|
|
36
35
|
|
|
37
36
|
# klayout tech path is now assumed to contain a `tech.lyt`` file to use
|
|
38
|
-
|
|
37
|
+
Tech.load(str(klayout_tech_path))
|
|
38
|
+
technology = Tech
|
|
39
39
|
|
|
40
40
|
lib.read(filename=str(gdspath))
|
|
41
41
|
c = lib.top_kcell()
|
|
@@ -45,6 +45,7 @@ def get_l2n(
|
|
|
45
45
|
|
|
46
46
|
reversed_layer_map = {}
|
|
47
47
|
layers = gf.get_active_pdk().layers
|
|
48
|
+
assert layers is not None
|
|
48
49
|
|
|
49
50
|
# Reversed layer map with names as sets in order to support layer aliases
|
|
50
51
|
for k, v in {layer.name: (layer.layer, layer.datatype) for layer in layers}.items():
|
|
@@ -8,6 +8,7 @@ import klayout.db as kdb
|
|
|
8
8
|
import networkx as nx
|
|
9
9
|
from gdsfactory import logger
|
|
10
10
|
from gdsfactory.typings import PathType
|
|
11
|
+
from klayout.db import NetlistSpiceReaderDelegate
|
|
11
12
|
|
|
12
13
|
import gplugins.vlsir
|
|
13
14
|
from gplugins.klayout.netlist_spice_reader import (
|
|
@@ -109,8 +110,8 @@ def networkx_from_spice(
|
|
|
109
110
|
filepath: PathType,
|
|
110
111
|
include_labels: bool = True,
|
|
111
112
|
top_cell: str | None = None,
|
|
112
|
-
spice_reader: type[
|
|
113
|
-
|
|
|
113
|
+
spice_reader: type[NetlistSpiceReaderDelegate]
|
|
114
|
+
| NetlistSpiceReaderDelegate = GdsfactorySpiceReader,
|
|
114
115
|
**kwargs: Any,
|
|
115
116
|
) -> nx.Graph:
|
|
116
117
|
"""Returns a networkx Graph from a SPICE netlist file or KLayout LayoutToNetlist.
|
|
@@ -59,7 +59,7 @@ class CalibreSpiceReader(NetlistSpiceReaderDelegateWithStrings):
|
|
|
59
59
|
self._integer_to_string_map = value
|
|
60
60
|
|
|
61
61
|
@override
|
|
62
|
-
def wants_subcircuit(self, name: str):
|
|
62
|
+
def wants_subcircuit(self, name: str) -> bool:
|
|
63
63
|
"""Model all SPICE models that start with `WG` as devices in order to support parameters."""
|
|
64
64
|
return "WG" in name or super().wants_subcircuit(name)
|
|
65
65
|
|
|
@@ -105,7 +105,7 @@ class CalibreSpiceReader(NetlistSpiceReaderDelegateWithStrings):
|
|
|
105
105
|
value: Any,
|
|
106
106
|
nets: Sequence[kdb.Net],
|
|
107
107
|
parameters: dict[str, int | float | str],
|
|
108
|
-
):
|
|
108
|
+
) -> bool:
|
|
109
109
|
# Handle non-'X' elements with standard KLayout processing
|
|
110
110
|
if element != "X":
|
|
111
111
|
# Other devices with standard KLayout
|
|
@@ -145,6 +145,8 @@ class CalibreSpiceReader(NetlistSpiceReaderDelegateWithStrings):
|
|
|
145
145
|
),
|
|
146
146
|
)
|
|
147
147
|
|
|
148
|
+
return True
|
|
149
|
+
|
|
148
150
|
|
|
149
151
|
class GdsfactorySpiceReader(CalibreSpiceReader):
|
|
150
152
|
"""KLayout Spice reader for Gdsfactory-extracted KLayout LayoutToNetlist.
|
|
@@ -175,7 +177,7 @@ class GdsfactorySpiceReader(CalibreSpiceReader):
|
|
|
175
177
|
]
|
|
176
178
|
|
|
177
179
|
@override
|
|
178
|
-
def wants_subcircuit(self, name: str):
|
|
180
|
+
def wants_subcircuit(self, name: str) -> bool:
|
|
179
181
|
"""Model all basic gdsfactory components as devices in order to support parameters."""
|
|
180
182
|
return all(
|
|
181
183
|
cell not in name.casefold() for cell in self.components_as_subcircuits
|
|
@@ -5,6 +5,7 @@ import matplotlib.pyplot as plt
|
|
|
5
5
|
import networkx as nx
|
|
6
6
|
from gdsfactory.typings import PathType
|
|
7
7
|
from klayout.db import NetlistSpiceReaderDelegate
|
|
8
|
+
from matplotlib.figure import Figure
|
|
8
9
|
|
|
9
10
|
from gplugins.klayout.netlist_graph import networkx_from_spice
|
|
10
11
|
from gplugins.klayout.netlist_spice_reader import (
|
|
@@ -19,7 +20,7 @@ def plot_nets(
|
|
|
19
20
|
top_cell: str | None = None,
|
|
20
21
|
nodes_to_reduce: Collection[str] | None = None,
|
|
21
22
|
spice_reader: type[NetlistSpiceReaderDelegate] = GdsfactorySpiceReader,
|
|
22
|
-
) -> None |
|
|
23
|
+
) -> None | Figure:
|
|
23
24
|
"""Plots the connectivity between the components in the KLayout LayoutToNetlist file from :func:`~get_l2n`.
|
|
24
25
|
|
|
25
26
|
Args:
|
|
@@ -91,6 +92,7 @@ def plot_nets(
|
|
|
91
92
|
font_size=12,
|
|
92
93
|
)
|
|
93
94
|
return fig
|
|
95
|
+
return
|
|
94
96
|
|
|
95
97
|
|
|
96
98
|
if __name__ == "__main__":
|