gplugins 1.3.7__tar.gz → 1.4.0__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.7 → gplugins-1.4.0}/PKG-INFO +14 -10
- {gplugins-1.3.7 → gplugins-1.4.0}/README.md +2 -2
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/__init__.py +1 -1
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/common/config.py +2 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/common/utils/get_sparameters_path.py +6 -4
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/gmeep/get_meep_geometry.py +4 -1
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/klayout/dataprep/regions.py +13 -9
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/klayout/drc/count_drc.py +9 -6
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/lumerical/write_sparameters_lumerical.py +97 -39
- gplugins-1.4.0/gplugins/palace/get_capacitance.py +639 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/palace/get_scattering.py +6 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/path_length_analysis/path_length_analysis_from_gds.py +149 -25
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/path_length_analysis/test_pathlength_extraction.py +15 -0
- gplugins-1.4.0/gplugins/path_length_analysis/test_pathlength_extraction_from_gds.py +152 -0
- gplugins-1.4.0/gplugins/path_length_analysis/test_pathlength_extraction_utils.py +207 -0
- gplugins-1.4.0/gplugins/path_length_analysis/utils.py +189 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/sax/__init__.py +3 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/sax/interpolators.py +13 -5
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/sax/mlp.py +30 -9
- gplugins-1.4.0/gplugins/sax/models.py +57 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/sax/plot_model.py +0 -0
- gplugins-1.4.0/gplugins/sax/strategy.py +3 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/sax/tests/test_mzi.py +5 -5
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/sax/tests/test_mzi_lattice.py +9 -8
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/tidy3d/materials.py +6 -5
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/tidy3d/types.py +2 -2
- {gplugins-1.3.7 → gplugins-1.4.0}/pyproject.toml +20 -17
- gplugins-1.3.7/gplugins/palace/get_capacitance.py +0 -320
- gplugins-1.3.7/gplugins/sax/models.py +0 -535
- {gplugins-1.3.7 → gplugins-1.4.0}/LICENSE +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/common/__init__.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/common/base_models/__init__.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/common/base_models/component.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/common/base_models/simulation.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/common/types.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/common/utils/__init__.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/common/utils/add_simulation_markers.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/common/utils/async_helpers.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/common/utils/cache.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/common/utils/convert_sparameters.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/common/utils/disable_print.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/common/utils/get_capacitance.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/common/utils/get_component_with_net_layers.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/common/utils/get_effective_indices.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/common/utils/get_scattering.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/common/utils/optical_constants.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/common/utils/parse_layer_stack.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/common/utils/plot.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/common/utils/plot_csv.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/common/utils/port_symmetries.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/common/utils/tests/test_get_component_with_new_port_layers.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/devsim/__init__.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/devsim/doping.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/devsim/get_simulation.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/devsim/get_simulation_xsection.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/devsim/get_solver.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/devsim/test_devsim.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/elmer/__init__.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/elmer/electrostatic.sif.j2 +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/elmer/get_capacitance.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/elmer/tests/test_elmer.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/fdtdz/__init__.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/fdtdz/get_epsilon_fdtdz.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/fdtdz/get_ports_fdtdz.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/fdtdz/get_sparameters_fdtdz.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/femwell/__init__.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/femwell/mode_solver.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/femwell/solve_thermal.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/femwell/test_mode_solver.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/gfviz/Makefile +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/gfviz/__init__.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/gfviz/b64.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/gfviz/gfviz.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/gfviz/netlist.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/gfviz/serve.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/gfviz/static/b64.js +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/gfviz/static/schemedit.js +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/gfviz/static/schemedit.wasm +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/gfviz/templates/example.json +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/gfviz/templates/index.html +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/gmeep/__init__.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/gmeep/get_material.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/gmeep/get_port_eigenmode.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/gmeep/get_simulation.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/gmeep/get_simulation_grating_farfield.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/gmeep/get_simulation_grating_fiber.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/gmeep/meep_adjoint_optimization.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/gmeep/test_eigenmode.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/gmeep/test_materials.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/gmeep/test_sparameterNxN/test_sparameterNxN_crossing.csv +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/gmeep/test_sparameterNxN/test_sparameterNxN_straight.csv +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/gmeep/test_write_sparameters_meep/test_sparameterNxN_crossing.csv +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/gmeep/test_write_sparameters_meep/test_sparameterNxN_straight.csv +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/gmeep/test_write_sparameters_meep/test_sparameterNxN_symmetries_straight.csv +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/gmeep/test_write_sparameters_meep/test_sparameter_straight_mpi.csv +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/gmeep/test_write_sparameters_meep/test_sparameter_straight_mpi_pool.csv +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/gmeep/test_write_sparameters_meep/test_sparameters_crossing_symmetric.csv +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/gmeep/test_write_sparameters_meep/test_sparameters_straight.csv +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/gmeep/test_write_sparameters_meep/test_sparameters_straight_batch.csv +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/gmeep/test_write_sparameters_meep/test_sparameters_straight_mpi.csv +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/gmeep/test_write_sparameters_meep/test_sparameters_straight_mpi_pool.csv +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/gmeep/test_write_sparameters_meep/test_sparameters_straight_symmetric.csv +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/gmeep/test_write_sparameters_meep.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/gmeep/write_sparameters_grating.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/gmeep/write_sparameters_meep.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/gmeep/write_sparameters_meep_batch.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/gmeep/write_sparameters_meep_mpi.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/gmsh/__init__.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/gmsh/define_polysurfaces.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/gmsh/get_mesh.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/gmsh/parse_component.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/gmsh/parse_gds.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/gmsh/tests/test_custom_names.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/gmsh/tests/test_meshing_2D.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/gmsh/tests/test_meshing_3D.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/gmsh/uz_xsection_mesh.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/gmsh/xy_xsection_mesh.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/gmsh/xyz_mesh.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/klayout/__init__.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/klayout/dataprep/__init__.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/klayout/drc/__init__.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/klayout/drc/check_duplicated_cells.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/klayout/drc/check_exclusion.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/klayout/drc/check_inclusion.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/klayout/drc/check_space.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/klayout/drc/check_width.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/klayout/drc/samples/drc_errors.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/klayout/drc/write_drc.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/klayout/get_density.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/klayout/get_netlist.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/klayout/netlist_graph.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/klayout/netlist_spice_reader.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/klayout/plot_nets.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/klayout/tests/test_dataprep_regions.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/klayout/tests/test_density.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/klayout/tests/test_drc_exclusion.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/klayout/tests/test_drc_inclusion.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/klayout/tests/test_drc_space.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/klayout/tests/test_drc_width.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/klayout/tests/test_global_density.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/klayout/tests/test_netlist_spice_reader.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/klayout/tests/test_plot_nets.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/lumerical/README.md +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/lumerical/__init__.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/lumerical/interconnect.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/lumerical/mapping_ubcpdk.yml +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/lumerical/read.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/lumerical/settings.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/lumerical/tests/test_lumerical_read_sparameters.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/lumerical/tests/test_netlist.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/lumerical/tests/test_netlist_get_routes.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/lumerical/write_sparameters_lumerical_components.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/materials/__init__.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/materials/inorganic.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/materials/optical/__init__.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/materials/optical/optical_mat.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/materials/optical/refractive_index_info.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/materials/semiconductor/__init__.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/materials/semiconductor/semiconductor_mat.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/meow/__init__.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/meow/meow_eme.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/meow/test_meow_simulation.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/modes/__init__.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/modes/coupler.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/modes/find_coupling_vs_gap.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/modes/find_mode_dispersion.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/modes/find_modes.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/modes/find_modes_cross_section.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/modes/find_neff_ng_dw_dh.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/modes/find_neff_vs_width.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/modes/get_mode_solver_coupler.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/modes/get_mode_solver_cross_section.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/modes/get_mode_solver_rib.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/modes/modes/neff_vs_width_nitride.csv +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/modes/modes/neff_vs_width_rib.csv +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/modes/modes/neff_vs_width_strip.csv +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/modes/neff_convergence_test.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/modes/neff_vs_width.csv +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/modes/overlap.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/modes/tests/test_dw_dh/test_dw_dh.csv +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/modes/tests/test_dw_dh/test_dw_dh.obtained.csv +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/modes/tests/test_dw_dh/test_dw_dh_dispersion.csv +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/modes/tests/test_dw_dh.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/modes/tests/test_find_modes.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/modes/tests/test_find_modes_dispersion.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/modes/tests/test_neff_vs_width/test_neff_vs_width.csv +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/modes/tests/test_neff_vs_width/test_neff_vs_width.obtained.csv +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/modes/tests/test_neff_vs_width.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/modes/types.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/modes/waveguide.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/palace/__init__.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/palace/driven.json +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/palace/electrostatic.json +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/palace/tests/test_palace.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/path_length_analysis/__init__.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/path_length_analysis/path_length_analysis.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/photonic_circuit_models/__init__.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/photonic_circuit_models/coupler.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/photonic_circuit_models/fsr.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/photonic_circuit_models/heater.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/photonic_circuit_models/mzi.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/photonic_circuit_models/ring.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/process/__init__.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/process/diffusion.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/process/implant_tables.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/process/pysrim.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/process/silicon.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/process/skew/antimony_si_skew.csv +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/process/skew/arsenic_si_skew.csv +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/process/skew/boron_si_skew.csv +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/process/skew/phosphorus_si_skew.csv +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/sax/parameter.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/sax/read.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/sax/tests/test_mzi_lattice/test_mzi_lattice.obtained.yml +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/sax/tests/test_mzi_lattice/test_mzi_lattice.yml +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/sax/tests/test_parameters.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/sentaurus/mask_sde.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/sentaurus/mask_sprocess.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/sentaurus/sde.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/sentaurus/sdevice.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/sentaurus/sprocess.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/sentaurus/svisual.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/spice/__init__.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/spice/spice_to_yaml.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/spice/tests/__init__.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/spice/tests/test_interconnect.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/tidy3d/__init__.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/tidy3d/component.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/tidy3d/get_results.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/tidy3d/get_simulation_grating_coupler.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/tidy3d/modes.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/tidy3d/tests/test_component_modeler.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/tidy3d/tests/test_materials.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/tidy3d/tests/test_modes/test_sweep_width.csv +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/tidy3d/tests/test_modes/test_sweep_width.obtained.csv +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/tidy3d/tests/test_modes_coupler.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/tidy3d/tests/test_modes_waveguide.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/tidy3d/tests/test_plot_simulation_grating_coupler.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/tidy3d/tests/test_write_sparameters.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/tidy3d/tests/tests_sparameters/sim_ref.yaml +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/tidy3d/tests/tests_sparameters/test_write_sparameters.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/tidy3d/tests/tests_sparameters/test_write_sparameters_grating_coupler.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/tidy3d/util.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/tidy3d/write_sparameters_grating_coupler.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/typings.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/vlsir/__init__.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/vlsir/export_netlist.py +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/vlsir/tests/resources/pads_correct.cir +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/vlsir/tests/resources/pads_correct.scs +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/gplugins/vlsir/tests/resources/pads_correct.sp +0 -0
- {gplugins-1.3.7 → gplugins-1.4.0}/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
|
+
Version: 1.4.0
|
|
4
4
|
Summary: gdsfactory plugins
|
|
5
5
|
Keywords: python
|
|
6
6
|
Author-email: gdsfactory <contact@gdsfactory.com>
|
|
@@ -14,13 +14,15 @@ License-File: LICENSE
|
|
|
14
14
|
Requires-Dist: gdsfactory>=9.3.5
|
|
15
15
|
Requires-Dist: pint
|
|
16
16
|
Requires-Dist: tqdm
|
|
17
|
-
Requires-Dist: numpy
|
|
17
|
+
Requires-Dist: numpy==2.2
|
|
18
18
|
Requires-Dist: xarray==2025.1.2
|
|
19
|
+
Requires-Dist: hypothesis ; extra == "dev"
|
|
20
|
+
Requires-Dist: numba ; extra == "dev"
|
|
19
21
|
Requires-Dist: pre-commit ; extra == "dev"
|
|
22
|
+
Requires-Dist: pyswarms ; extra == "dev"
|
|
20
23
|
Requires-Dist: pytest ; extra == "dev"
|
|
21
24
|
Requires-Dist: pytest-cov ; extra == "dev"
|
|
22
25
|
Requires-Dist: pytest_regressions ; extra == "dev"
|
|
23
|
-
Requires-Dist: pyswarms ; extra == "dev"
|
|
24
26
|
Requires-Dist: devsim ; extra == "devsim"
|
|
25
27
|
Requires-Dist: pyvista<=0.43.8 ; extra == "devsim"
|
|
26
28
|
Requires-Dist: tidy3d>=2.8.2,<2.9 ; extra == "devsim"
|
|
@@ -54,12 +56,13 @@ Requires-Dist: sortedcontainers ; extra == "luminescent"
|
|
|
54
56
|
Requires-Dist: mypy ; extra == "maintainer"
|
|
55
57
|
Requires-Dist: tbump ; extra == "maintainer"
|
|
56
58
|
Requires-Dist: towncrier ; extra == "maintainer"
|
|
57
|
-
Requires-Dist:
|
|
58
|
-
Requires-Dist:
|
|
59
|
-
Requires-Dist: flax>=0.8.2 ; extra == "meow"
|
|
60
|
-
Requires-Dist: meow-sim>=0.13,<0.14 ; extra == "meow"
|
|
59
|
+
Requires-Dist: meow-sim>=0.14.1,<0.15 ; extra == "meow"
|
|
60
|
+
Requires-Dist: sax>=0.15.6,<0.16.0 ; extra == "meow"
|
|
61
61
|
Requires-Dist: tidy3d>=2.8.2,<2.9 ; extra == "meow"
|
|
62
|
-
Requires-Dist:
|
|
62
|
+
Requires-Dist: bokeh ; extra == "path-length-analysis"
|
|
63
|
+
Requires-Dist: numba ; extra == "path-length-analysis"
|
|
64
|
+
Requires-Dist: shapely ; extra == "path-length-analysis"
|
|
65
|
+
Requires-Dist: sax>=0.15.6,<0.16.0 ; extra == "sax"
|
|
63
66
|
Requires-Dist: bokeh ; extra == "schematic"
|
|
64
67
|
Requires-Dist: ipywidgets ; extra == "schematic"
|
|
65
68
|
Requires-Dist: natsort ; extra == "schematic"
|
|
@@ -77,12 +80,13 @@ Provides-Extra: klayout
|
|
|
77
80
|
Provides-Extra: luminescent
|
|
78
81
|
Provides-Extra: maintainer
|
|
79
82
|
Provides-Extra: meow
|
|
83
|
+
Provides-Extra: path-length-analysis
|
|
80
84
|
Provides-Extra: sax
|
|
81
85
|
Provides-Extra: schematic
|
|
82
86
|
Provides-Extra: tidy3d
|
|
83
87
|
Provides-Extra: vlsir
|
|
84
88
|
|
|
85
|
-
# gplugins 1.
|
|
89
|
+
# gplugins 1.4.0
|
|
86
90
|
|
|
87
91
|
[](https://gdsfactory.github.io/gplugins/)
|
|
88
92
|
[](https://pypi.org/project/gplugins/)
|
|
@@ -128,7 +132,7 @@ pip install "gdsfactory[full]" --upgrade
|
|
|
128
132
|
or
|
|
129
133
|
|
|
130
134
|
```bash
|
|
131
|
-
pip install "gplugins[devsim,femwell,gmsh,schematic,meow,meshwell,
|
|
135
|
+
pip install "gplugins[devsim,femwell,gmsh,schematic,meow,meshwell,sax,tidy3d]" --upgrade
|
|
132
136
|
```
|
|
133
137
|
|
|
134
138
|
Or install only the plugins you need. For example:
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# gplugins 1.
|
|
1
|
+
# gplugins 1.4.0
|
|
2
2
|
|
|
3
3
|
[](https://gdsfactory.github.io/gplugins/)
|
|
4
4
|
[](https://pypi.org/project/gplugins/)
|
|
@@ -44,7 +44,7 @@ pip install "gdsfactory[full]" --upgrade
|
|
|
44
44
|
or
|
|
45
45
|
|
|
46
46
|
```bash
|
|
47
|
-
pip install "gplugins[devsim,femwell,gmsh,schematic,meow,meshwell,
|
|
47
|
+
pip install "gplugins[devsim,femwell,gmsh,schematic,meow,meshwell,sax,tidy3d]" --upgrade
|
|
48
48
|
```
|
|
49
49
|
|
|
50
50
|
Or install only the plugins you need. For example:
|
|
@@ -4,6 +4,7 @@ import hashlib
|
|
|
4
4
|
import pathlib
|
|
5
5
|
from functools import partial
|
|
6
6
|
from pathlib import Path
|
|
7
|
+
from typing import Any
|
|
7
8
|
|
|
8
9
|
import gdsfactory as gf
|
|
9
10
|
import numpy as np
|
|
@@ -12,7 +13,7 @@ from gdsfactory.name import clean_value
|
|
|
12
13
|
from gdsfactory.typings import ComponentSpec, PathType
|
|
13
14
|
|
|
14
15
|
|
|
15
|
-
def get_kwargs_hash(**kwargs) -> str:
|
|
16
|
+
def get_kwargs_hash(**kwargs: Any) -> str:
|
|
16
17
|
"""Returns kwargs parameters hash."""
|
|
17
18
|
kwargs_list = [f"{key}={clean_value(kwargs[key])}" for key in sorted(kwargs.keys())]
|
|
18
19
|
kwargs_string = "_".join(kwargs_list)
|
|
@@ -29,7 +30,7 @@ def get_component_hash(component: gf.Component) -> str:
|
|
|
29
30
|
def _get_sparameters_path(
|
|
30
31
|
component: ComponentSpec,
|
|
31
32
|
dirpath: PathType | None = PATH.sparameters,
|
|
32
|
-
**kwargs,
|
|
33
|
+
**kwargs: Any,
|
|
33
34
|
) -> Path:
|
|
34
35
|
"""Return Sparameters npz filepath hashing simulation settings for a consistent unique name.
|
|
35
36
|
|
|
@@ -59,7 +60,7 @@ def _get_sparameters_path(
|
|
|
59
60
|
return dirpath / f"{component.name}_{simulation_hash}.npz"
|
|
60
61
|
|
|
61
62
|
|
|
62
|
-
def _get_sparameters_data(**kwargs) -> np.ndarray:
|
|
63
|
+
def _get_sparameters_data(**kwargs: Any) -> np.ndarray[Any, Any]:
|
|
63
64
|
"""Returns Sparameters data in a pandas DataFrame.
|
|
64
65
|
|
|
65
66
|
Keyword Args:
|
|
@@ -69,7 +70,8 @@ def _get_sparameters_data(**kwargs) -> np.ndarray:
|
|
|
69
70
|
|
|
70
71
|
"""
|
|
71
72
|
filepath = _get_sparameters_path(**kwargs)
|
|
72
|
-
|
|
73
|
+
data = np.load(filepath)
|
|
74
|
+
return np.array(data)
|
|
73
75
|
|
|
74
76
|
|
|
75
77
|
get_sparameters_path_meow = partial(_get_sparameters_path, tool="meow")
|
|
@@ -61,8 +61,11 @@ def get_meep_geometry_from_component(
|
|
|
61
61
|
layer_tuple = gf.get_layer_tuple(layer.layer)
|
|
62
62
|
elif isinstance(layer, DerivedLayer):
|
|
63
63
|
layer_tuple = gf.get_layer_tuple(level.derived_layer.layer)
|
|
64
|
+
elif isinstance(layer, tuple):
|
|
65
|
+
# Handle plain tuple layers directly
|
|
66
|
+
layer_tuple = layer
|
|
64
67
|
else:
|
|
65
|
-
raise ValueError(f"Layer {layer!r} is not a DerivedLayer or
|
|
68
|
+
raise ValueError(f"Layer {layer!r} is not a DerivedLayer, LogicalLayer, or tuple")
|
|
66
69
|
|
|
67
70
|
layer_index = int(get_layer(layer_tuple))
|
|
68
71
|
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
1
3
|
import uuid
|
|
2
4
|
from typing import Any
|
|
3
5
|
|
|
4
6
|
import gdsfactory as gf
|
|
5
7
|
import kfactory as kf
|
|
8
|
+
import klayout.db as kdb
|
|
6
9
|
from gdsfactory.component import GDSDIR_TEMP
|
|
7
10
|
from gdsfactory.typings import PathType
|
|
8
|
-
from kfactory import kdb
|
|
9
11
|
|
|
10
12
|
|
|
11
|
-
def size(region: kdb.Region, offset: float, dbu=1e3) -> kdb.Region:
|
|
13
|
+
def size(region: kdb.Region, offset: float, dbu: float = 1e3) -> kdb.Region:
|
|
12
14
|
return region.dup().size(int(offset * dbu))
|
|
13
15
|
|
|
14
16
|
|
|
@@ -24,7 +26,7 @@ def copy(region: kdb.Region) -> kdb.Region:
|
|
|
24
26
|
return region.dup()
|
|
25
27
|
|
|
26
28
|
|
|
27
|
-
def _is_layer(value:
|
|
29
|
+
def _is_layer(value: Any) -> bool:
|
|
28
30
|
try:
|
|
29
31
|
layer, datatype = value
|
|
30
32
|
except Exception:
|
|
@@ -32,21 +34,21 @@ def _is_layer(value: any) -> bool:
|
|
|
32
34
|
return isinstance(layer, int) and isinstance(datatype, int)
|
|
33
35
|
|
|
34
36
|
|
|
35
|
-
def _assert_is_layer(value:
|
|
37
|
+
def _assert_is_layer(value: Any) -> None:
|
|
36
38
|
if not _is_layer(value):
|
|
37
39
|
raise ValueError(f"Layer must be a tuple of two integers. Got {value!r}")
|
|
38
40
|
|
|
39
41
|
|
|
40
42
|
class Region(kdb.Region):
|
|
41
|
-
def __iadd__(self, offset) ->
|
|
43
|
+
def __iadd__(self, offset: float | int) -> Region:
|
|
42
44
|
"""Adds an offset to the layer."""
|
|
43
45
|
return size(self, offset)
|
|
44
46
|
|
|
45
|
-
def __isub__(self, offset) ->
|
|
47
|
+
def __isub__(self, offset: float | int) -> Region:
|
|
46
48
|
"""Adds an offset to the layer."""
|
|
47
49
|
return size(self, -offset)
|
|
48
50
|
|
|
49
|
-
def __add__(self, element
|
|
51
|
+
def __add__(self, element: float | int | kdb.Region) -> Region:
|
|
50
52
|
"""Adds an element to the region."""
|
|
51
53
|
if isinstance(element, float | int):
|
|
52
54
|
return size(self, element)
|
|
@@ -56,15 +58,17 @@ class Region(kdb.Region):
|
|
|
56
58
|
else:
|
|
57
59
|
raise ValueError(f"Cannot add type {type(element)} to region")
|
|
58
60
|
|
|
59
|
-
def __sub__(self, element: float | int | kdb.Region) ->
|
|
61
|
+
def __sub__(self, element: float | int | kdb.Region) -> Region:
|
|
60
62
|
"""Subtracts an element from the region."""
|
|
61
63
|
if isinstance(element, float | int):
|
|
62
64
|
return size(self, -element)
|
|
63
65
|
|
|
64
66
|
elif isinstance(element, kdb.Region):
|
|
65
67
|
return boolean_not(self, element)
|
|
68
|
+
else:
|
|
69
|
+
raise ValueError(f"Cannot subtract type {type(element)} from region")
|
|
66
70
|
|
|
67
|
-
def copy(self) ->
|
|
71
|
+
def copy(self) -> Region:
|
|
68
72
|
return self.dup()
|
|
69
73
|
|
|
70
74
|
|
|
@@ -19,7 +19,7 @@ def count_drc(rdb_path: PathType, threshold: int = 0) -> dict[str, int]:
|
|
|
19
19
|
threshold: Minimum number of errors to be included in the output.
|
|
20
20
|
"""
|
|
21
21
|
rdb_path = pathlib.Path(rdb_path)
|
|
22
|
-
errors_dict = {}
|
|
22
|
+
errors_dict: dict[str, int] = {}
|
|
23
23
|
|
|
24
24
|
if not rdb_path.exists():
|
|
25
25
|
raise FileNotFoundError(f"Cannot find {rdb_path}")
|
|
@@ -27,14 +27,17 @@ def count_drc(rdb_path: PathType, threshold: int = 0) -> dict[str, int]:
|
|
|
27
27
|
if not rdb_path.is_dir():
|
|
28
28
|
return _get_errors(rdb_path, threshold, errors_dict)
|
|
29
29
|
for rdb_file in rdb_path.glob("*.rdb"):
|
|
30
|
-
|
|
30
|
+
sub_result = count_drc(rdb_file, threshold)
|
|
31
|
+
errors_dict.update(sub_result)
|
|
31
32
|
|
|
32
33
|
return errors_dict
|
|
33
34
|
|
|
34
35
|
|
|
35
|
-
def _get_errors(
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
def _get_errors(
|
|
37
|
+
rdb_path: PathType, threshold: int, errors_dict: dict[str, int]
|
|
38
|
+
) -> dict[str, int]:
|
|
39
|
+
r = rdb.ReportDatabase("name")
|
|
40
|
+
r.load(str(rdb_path))
|
|
38
41
|
|
|
39
42
|
categories = {cat.rdb_id(): cat for cat in r.each_category()}
|
|
40
43
|
|
|
@@ -72,7 +75,7 @@ def plot_drc(errors: dict[str, int]) -> None:
|
|
|
72
75
|
Args:
|
|
73
76
|
errors: Dict of error names to number of errors.
|
|
74
77
|
"""
|
|
75
|
-
plt.bar(errors.keys(), errors.values())
|
|
78
|
+
plt.bar(list(errors.keys()), list(errors.values()))
|
|
76
79
|
plt.title("DRC Errors")
|
|
77
80
|
plt.xlabel("Categories")
|
|
78
81
|
plt.ylabel("Error count")
|
|
@@ -4,7 +4,7 @@ from __future__ import annotations
|
|
|
4
4
|
|
|
5
5
|
import shutil
|
|
6
6
|
import time
|
|
7
|
-
from typing import TYPE_CHECKING
|
|
7
|
+
from typing import TYPE_CHECKING, cast
|
|
8
8
|
|
|
9
9
|
import gdsfactory as gf
|
|
10
10
|
import numpy as np
|
|
@@ -17,6 +17,8 @@ from gdsfactory.generic_tech.simulation_settings import (
|
|
|
17
17
|
)
|
|
18
18
|
from gdsfactory.pdk import get_layer_stack
|
|
19
19
|
from gdsfactory.technology import LayerStack
|
|
20
|
+
from gdsfactory.technology.layer_stack import DerivedLayer, LogicalLayer
|
|
21
|
+
from gdsfactory.typings import LayerEnum
|
|
20
22
|
|
|
21
23
|
from gplugins.common.utils.get_sparameters_path import (
|
|
22
24
|
get_sparameters_path_lumerical as get_sparameters_path,
|
|
@@ -84,12 +86,13 @@ def write_sparameters_lumerical(
|
|
|
84
86
|
material_name_to_lumerical: dict[str, MaterialSpec] | None = None,
|
|
85
87
|
delete_fsp_files: bool = True,
|
|
86
88
|
xmargin: float = 0,
|
|
87
|
-
ymargin: float =
|
|
88
|
-
xmargin_left: float =
|
|
89
|
-
xmargin_right: float =
|
|
90
|
-
ymargin_top: float =
|
|
91
|
-
ymargin_bot: float =
|
|
89
|
+
ymargin: float = 3,
|
|
90
|
+
xmargin_left: float | None = None,
|
|
91
|
+
xmargin_right: float | None = None,
|
|
92
|
+
ymargin_top: float | None = None,
|
|
93
|
+
ymargin_bot: float | None = None,
|
|
92
94
|
zmargin: float = 1.0,
|
|
95
|
+
exclude_layers: list[int] | None = None,
|
|
93
96
|
**settings,
|
|
94
97
|
) -> np.ndarray:
|
|
95
98
|
r"""Returns and writes component Sparameters using Lumerical FDTD.
|
|
@@ -140,6 +143,8 @@ def write_sparameters_lumerical(
|
|
|
140
143
|
ymargin_top: top distance from component to PML.
|
|
141
144
|
ymargin_bot: bottom distance from component to PML.
|
|
142
145
|
zmargin: thickness for cladding above and below core.
|
|
146
|
+
exclude_layers: list of layer indices to exclude from simulation.
|
|
147
|
+
settings: additional simulation settings to overwrite
|
|
143
148
|
|
|
144
149
|
Keyword Args:
|
|
145
150
|
background_material: for the background.
|
|
@@ -201,6 +206,12 @@ def write_sparameters_lumerical(
|
|
|
201
206
|
component = component
|
|
202
207
|
sim_settings = dict(simulation_settings)
|
|
203
208
|
|
|
209
|
+
|
|
210
|
+
xmargin_left = xmargin_left or xmargin
|
|
211
|
+
xmargin_right = xmargin_right or xmargin
|
|
212
|
+
ymargin_top = ymargin_top or ymargin
|
|
213
|
+
ymargin_bot = ymargin_bot or ymargin
|
|
214
|
+
|
|
204
215
|
layer_to_thickness = layer_stack.get_layer_to_thickness()
|
|
205
216
|
layer_to_zmin = layer_stack.get_layer_to_zmin()
|
|
206
217
|
layer_to_material = layer_stack.get_layer_to_material()
|
|
@@ -223,10 +234,10 @@ def write_sparameters_lumerical(
|
|
|
223
234
|
component_with_padding = gf.add_padding_container(
|
|
224
235
|
component_with_booleans,
|
|
225
236
|
default=0,
|
|
226
|
-
top=
|
|
227
|
-
bottom=
|
|
228
|
-
left=
|
|
229
|
-
right=
|
|
237
|
+
top=ymargin_top,
|
|
238
|
+
bottom=ymargin_bot,
|
|
239
|
+
left=xmargin_left,
|
|
240
|
+
right=xmargin_right,
|
|
230
241
|
)
|
|
231
242
|
|
|
232
243
|
component_extended = gf.components.extend_ports(
|
|
@@ -240,6 +251,10 @@ def write_sparameters_lumerical(
|
|
|
240
251
|
component_extended_beyond_pml = gf.components.extension.extend_ports(
|
|
241
252
|
component=component_extended, length=ss.port_extension
|
|
242
253
|
)
|
|
254
|
+
component_extended_beyond_pml = component_extended_beyond_pml.copy()
|
|
255
|
+
component_extended_beyond_pml.flatten()
|
|
256
|
+
component_extended_beyond_pml.name = "top"
|
|
257
|
+
|
|
243
258
|
gdspath = component_extended_beyond_pml.write_gds()
|
|
244
259
|
|
|
245
260
|
filepath_npz = get_sparameters_path(
|
|
@@ -269,12 +284,27 @@ def write_sparameters_lumerical(
|
|
|
269
284
|
index_to_thickness = {}
|
|
270
285
|
index_to_zmin = {}
|
|
271
286
|
for level in layer_stack.layers.values():
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
287
|
+
layer = level.layer
|
|
288
|
+
|
|
289
|
+
if isinstance(layer, LogicalLayer):
|
|
290
|
+
assert isinstance(layer.layer, tuple | LayerEnum)
|
|
291
|
+
layer_tuple = cast(tuple[int, int], tuple(layer.layer))
|
|
292
|
+
elif isinstance(layer, DerivedLayer):
|
|
293
|
+
assert level.derived_layer is not None
|
|
294
|
+
assert isinstance(level.derived_layer.layer, tuple | LayerEnum)
|
|
295
|
+
layer_tuple = cast(tuple[int, int], tuple(level.derived_layer.layer))
|
|
296
|
+
elif isinstance(layer, tuple):
|
|
297
|
+
# Handle plain tuple layers directly
|
|
298
|
+
layer_tuple = cast(tuple[int, int], layer)
|
|
275
299
|
else:
|
|
276
|
-
|
|
277
|
-
|
|
300
|
+
raise ValueError(
|
|
301
|
+
f"Layer {layer!r} is not a DerivedLayer, LogicalLayer, or tuple"
|
|
302
|
+
)
|
|
303
|
+
|
|
304
|
+
layer_index = int(gf.get_layer(layer_tuple))
|
|
305
|
+
|
|
306
|
+
index_to_thickness[layer_index] = level.thickness
|
|
307
|
+
index_to_zmin[layer_index] = level.zmin
|
|
278
308
|
|
|
279
309
|
layers_thickness = [
|
|
280
310
|
index_to_thickness[gf.get_layer(layer)]
|
|
@@ -344,6 +374,9 @@ def write_sparameters_lumerical(
|
|
|
344
374
|
name="clad",
|
|
345
375
|
)
|
|
346
376
|
|
|
377
|
+
# Set cladding opacity
|
|
378
|
+
s.setnamed("clad", "alpha", 0.1)
|
|
379
|
+
|
|
347
380
|
material_name_to_lumerical_new = material_name_to_lumerical or {}
|
|
348
381
|
material_name_to_lumerical = ss.material_name_to_lumerical.copy()
|
|
349
382
|
material_name_to_lumerical.update(**material_name_to_lumerical_new)
|
|
@@ -364,39 +397,64 @@ def write_sparameters_lumerical(
|
|
|
364
397
|
simulation_time=ss.simulation_time,
|
|
365
398
|
simulation_temperature=ss.simulation_temperature,
|
|
366
399
|
)
|
|
367
|
-
component_layers = component_with_booleans.layers
|
|
368
400
|
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
continue
|
|
401
|
+
exclude_layers = exclude_layers or []
|
|
402
|
+
polygons_per_layer = component_extended_beyond_pml.get_polygons_points(merge=True)
|
|
372
403
|
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
404
|
+
for level in layer_stack.layers.values():
|
|
405
|
+
layer = level.layer
|
|
406
|
+
|
|
407
|
+
if isinstance(layer, LogicalLayer):
|
|
408
|
+
layer_tuple = gf.get_layer_tuple(layer.layer)
|
|
409
|
+
elif isinstance(layer, DerivedLayer):
|
|
410
|
+
layer_tuple = gf.get_layer_tuple(level.derived_layer.layer)
|
|
411
|
+
elif isinstance(layer, tuple):
|
|
412
|
+
# Handle plain tuple layers directly
|
|
413
|
+
layer_tuple = layer
|
|
414
|
+
else:
|
|
378
415
|
raise ValueError(
|
|
379
|
-
f"{
|
|
416
|
+
f"Layer {layer!r} is not a DerivedLayer, LogicalLayer, or tuple"
|
|
380
417
|
)
|
|
381
|
-
material = material_name_to_lumerical[material_name]
|
|
382
418
|
|
|
383
|
-
|
|
384
|
-
|
|
419
|
+
layer_index = int(gf.get_layer(layer_tuple))
|
|
420
|
+
|
|
421
|
+
if layer_index in exclude_layers:
|
|
422
|
+
continue
|
|
385
423
|
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
z = (zmax + zmin) / 2
|
|
424
|
+
if layer_index not in polygons_per_layer:
|
|
425
|
+
continue
|
|
389
426
|
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
427
|
+
zmin = level.zmin
|
|
428
|
+
|
|
429
|
+
if zmin is not None:
|
|
430
|
+
thickness = level.thickness
|
|
431
|
+
material_name = layer_to_material[layer]
|
|
432
|
+
if material_name not in material_name_to_lumerical:
|
|
433
|
+
raise ValueError(
|
|
434
|
+
f"{material_name!r} not in {list(material_name_to_lumerical.keys())}"
|
|
435
|
+
)
|
|
436
|
+
material = material_name_to_lumerical[material_name]
|
|
437
|
+
|
|
438
|
+
if layer not in layer_to_zmin:
|
|
439
|
+
raise ValueError(f"{layer} not in {list(layer_to_zmin.keys())}")
|
|
440
|
+
|
|
441
|
+
zmin = layer_to_zmin[layer]
|
|
442
|
+
zmax = zmin + thickness
|
|
443
|
+
z = (zmax + zmin) / 2
|
|
444
|
+
|
|
445
|
+
s.gdsimport(str(gdspath), "top", f"{layer_tuple[0]}:{layer_tuple[1]}")
|
|
446
|
+
layername = f"GDS_LAYER_{layer_tuple[0]}:{layer_tuple[1]}"
|
|
447
|
+
s.setnamed(layername, "z", z * 1e-6)
|
|
448
|
+
s.setnamed(layername, "z span", thickness * 1e-6)
|
|
449
|
+
set_material(session=s, structure=layername, material=material)
|
|
450
|
+
logger.info(
|
|
451
|
+
f"adding {layer_tuple}, thickness = {thickness} um, zmin = {zmin} um "
|
|
452
|
+
)
|
|
396
453
|
|
|
397
454
|
for i, port in enumerate(ports):
|
|
398
|
-
|
|
399
|
-
|
|
455
|
+
port_layer_index = gf.get_layer(port.layer)
|
|
456
|
+
zmin = index_to_zmin[port_layer_index]
|
|
457
|
+
thickness = index_to_thickness[port_layer_index]
|
|
400
458
|
z = (zmin + thickness) / 2
|
|
401
459
|
zspan = 2 * ss.port_margin + thickness
|
|
402
460
|
|