gplugins 1.0.2__tar.gz → 1.1.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.
Files changed (261) hide show
  1. {gplugins-1.0.2 → gplugins-1.1.0}/PKG-INFO +7 -7
  2. {gplugins-1.0.2 → gplugins-1.1.0}/README.md +1 -1
  3. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/__init__.py +1 -1
  4. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/common/base_models/component.py +1 -1
  5. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/devsim/get_simulation.py +1 -1
  6. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/devsim/get_solver.py +1 -1
  7. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/fdtdz/get_ports_fdtdz.py +2 -2
  8. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/fdtdz/get_sparameters_fdtdz.py +1 -1
  9. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/gfviz/netlist.py +32 -41
  10. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/gmeep/get_meep_geometry.py +5 -2
  11. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/gmeep/get_simulation.py +10 -11
  12. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/gmeep/get_simulation_grating_fiber.py +6 -6
  13. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/gmeep/meep_adjoint_optimization.py +2 -2
  14. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/gmeep/write_sparameters_meep.py +3 -5
  15. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/gmeep/write_sparameters_meep_batch.py +2 -3
  16. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/gmeep/write_sparameters_meep_mpi.py +0 -2
  17. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/gmsh/get_mesh.py +2 -2
  18. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/gmsh/tests/test_meshing_3D.py +1 -1
  19. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/gmsh/uz_xsection_mesh.py +3 -6
  20. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/gmsh/xy_xsection_mesh.py +2 -2
  21. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/gmsh/xyz_mesh.py +3 -3
  22. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/klayout/drc/samples/drc_errors.py +1 -1
  23. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/klayout/get_density.py +2 -2
  24. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/klayout/get_netlist.py +7 -5
  25. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/klayout/plot_nets.py +1 -0
  26. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/klayout/tests/test_density.py +2 -2
  27. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/lumerical/interconnect.py +5 -11
  28. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/lumerical/write_sparameters_lumerical.py +1 -1
  29. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/meow/meow_eme.py +2 -2
  30. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/path_length_analysis/path_length_analysis.py +53 -4
  31. gplugins-1.1.0/gplugins/path_length_analysis/path_length_analysis_from_gds.py +638 -0
  32. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/path_length_analysis/test_pathlength_extraction.py +1 -1
  33. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/sax/parameter.py +29 -29
  34. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/sax/plot_model.py +2 -2
  35. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/sax/tests/test_parameters.py +4 -0
  36. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/sentaurus/sde.py +4 -4
  37. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/sentaurus/sprocess.py +9 -9
  38. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/spice/tests/test_interconnect.py +5 -5
  39. gplugins-1.1.0/gplugins/vlsir/tests/resources/pads_correct.cir +95 -0
  40. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/vlsir/tests/resources/pads_correct.scs +24 -24
  41. gplugins-1.1.0/gplugins/vlsir/tests/resources/pads_correct.sp +105 -0
  42. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/vlsir/tests/test_vlsir.py +14 -7
  43. {gplugins-1.0.2 → gplugins-1.1.0}/pyproject.toml +7 -7
  44. gplugins-1.0.2/gplugins/path_length_analysis/path_length_analysis_from_gds.py +0 -164
  45. gplugins-1.0.2/gplugins/schematic_editor/__init__.py +0 -3
  46. gplugins-1.0.2/gplugins/schematic_editor/circuitviz.py +0 -528
  47. gplugins-1.0.2/gplugins/schematic_editor/picmodel.py +0 -184
  48. gplugins-1.0.2/gplugins/schematic_editor/schematic_editor.py +0 -466
  49. gplugins-1.0.2/gplugins/tidy3d/tests/tests_sparameters/test_simulation.py +0 -55
  50. gplugins-1.0.2/gplugins/vlsir/tests/resources/pads_correct.cir +0 -95
  51. gplugins-1.0.2/gplugins/vlsir/tests/resources/pads_correct.sp +0 -105
  52. {gplugins-1.0.2 → gplugins-1.1.0}/LICENSE +0 -0
  53. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/common/__init__.py +0 -0
  54. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/common/base_models/__init__.py +0 -0
  55. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/common/base_models/simulation.py +0 -0
  56. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/common/config.py +0 -0
  57. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/common/types.py +0 -0
  58. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/common/utils/__init__.py +0 -0
  59. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/common/utils/add_simulation_markers.py +0 -0
  60. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/common/utils/async_helpers.py +0 -0
  61. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/common/utils/cache.py +0 -0
  62. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/common/utils/convert_sparameters.py +0 -0
  63. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/common/utils/disable_print.py +0 -0
  64. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/common/utils/get_capacitance.py +0 -0
  65. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/common/utils/get_component_with_local_layers.py +0 -0
  66. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/common/utils/get_component_with_net_layers.py +0 -0
  67. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/common/utils/get_effective_indices.py +0 -0
  68. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/common/utils/get_scattering.py +0 -0
  69. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/common/utils/get_sparameters_path.py +0 -0
  70. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/common/utils/optical_constants.py +0 -0
  71. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/common/utils/parse_layer_stack.py +0 -0
  72. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/common/utils/plot.py +0 -0
  73. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/common/utils/plot_csv.py +0 -0
  74. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/common/utils/port_symmetries.py +0 -0
  75. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/common/utils/tests/test_get_component_with_new_port_layers.py +0 -0
  76. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/dagster/Makefile +0 -0
  77. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/dagster/__init__.py +0 -0
  78. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/dagster/workflow.py +0 -0
  79. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/devsim/__init__.py +0 -0
  80. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/devsim/doping.py +0 -0
  81. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/devsim/get_simulation_xsection.py +0 -0
  82. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/devsim/test_devsim.py +0 -0
  83. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/elmer/__init__.py +0 -0
  84. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/elmer/electrostatic.sif.j2 +0 -0
  85. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/elmer/get_capacitance.py +0 -0
  86. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/elmer/tests/test_elmer.py +0 -0
  87. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/fdtdz/__init__.py +0 -0
  88. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/fdtdz/get_epsilon_fdtdz.py +0 -0
  89. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/femwell/__init__.py +0 -0
  90. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/femwell/mode_solver.py +0 -0
  91. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/femwell/solve_thermal.py +0 -0
  92. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/femwell/test_mode_solver.py +0 -0
  93. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/gfviz/Makefile +0 -0
  94. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/gfviz/__init__.py +0 -0
  95. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/gfviz/b64.py +0 -0
  96. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/gfviz/gfviz.py +0 -0
  97. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/gfviz/serve.py +0 -0
  98. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/gfviz/static/b64.js +0 -0
  99. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/gfviz/static/schemedit.js +0 -0
  100. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/gfviz/static/schemedit.wasm +0 -0
  101. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/gfviz/templates/example.json +0 -0
  102. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/gfviz/templates/index.html +0 -0
  103. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/gmeep/__init__.py +0 -0
  104. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/gmeep/get_material.py +0 -0
  105. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/gmeep/get_port_eigenmode.py +0 -0
  106. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/gmeep/get_simulation_grating_farfield.py +0 -0
  107. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/gmeep/test_eigenmode.py +0 -0
  108. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/gmeep/test_materials.py +0 -0
  109. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/gmeep/test_sparameterNxN/test_sparameterNxN_crossing.csv +0 -0
  110. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/gmeep/test_sparameterNxN/test_sparameterNxN_straight.csv +0 -0
  111. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/gmeep/test_write_sparameters_meep/test_sparameterNxN_crossing.csv +0 -0
  112. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/gmeep/test_write_sparameters_meep/test_sparameterNxN_straight.csv +0 -0
  113. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/gmeep/test_write_sparameters_meep/test_sparameterNxN_symmetries_straight.csv +0 -0
  114. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/gmeep/test_write_sparameters_meep/test_sparameter_straight_mpi.csv +0 -0
  115. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/gmeep/test_write_sparameters_meep/test_sparameter_straight_mpi_pool.csv +0 -0
  116. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/gmeep/test_write_sparameters_meep/test_sparameters_crossing_symmetric.csv +0 -0
  117. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/gmeep/test_write_sparameters_meep/test_sparameters_straight.csv +0 -0
  118. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/gmeep/test_write_sparameters_meep/test_sparameters_straight_batch.csv +0 -0
  119. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/gmeep/test_write_sparameters_meep/test_sparameters_straight_mpi.csv +0 -0
  120. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/gmeep/test_write_sparameters_meep/test_sparameters_straight_mpi_pool.csv +0 -0
  121. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/gmeep/test_write_sparameters_meep/test_sparameters_straight_symmetric.csv +0 -0
  122. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/gmeep/test_write_sparameters_meep.py +0 -0
  123. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/gmeep/write_sparameters_grating.py +0 -0
  124. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/gmsh/__init__.py +0 -0
  125. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/gmsh/define_polysurfaces.py +0 -0
  126. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/gmsh/parse_component.py +0 -0
  127. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/gmsh/parse_gds.py +0 -0
  128. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/gmsh/tests/test_custom_names.py +0 -0
  129. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/gmsh/tests/test_meshing_2D.py +0 -0
  130. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/klayout/__init__.py +0 -0
  131. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/klayout/dataprep/__init__.py +0 -0
  132. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/klayout/dataprep/regions.py +0 -0
  133. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/klayout/drc/__init__.py +0 -0
  134. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/klayout/drc/check_duplicated_cells.py +0 -0
  135. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/klayout/drc/check_exclusion.py +0 -0
  136. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/klayout/drc/check_inclusion.py +0 -0
  137. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/klayout/drc/check_space.py +0 -0
  138. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/klayout/drc/check_width.py +0 -0
  139. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/klayout/drc/count_drc.py +0 -0
  140. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/klayout/drc/write_drc.py +0 -0
  141. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/klayout/netlist_graph.py +0 -0
  142. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/klayout/netlist_spice_reader.py +0 -0
  143. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/klayout/tests/test_dataprep_regions.py +0 -0
  144. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/klayout/tests/test_drc_exclusion.py +0 -0
  145. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/klayout/tests/test_drc_inclusion.py +0 -0
  146. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/klayout/tests/test_drc_space.py +0 -0
  147. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/klayout/tests/test_drc_width.py +0 -0
  148. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/klayout/tests/test_global_density.py +0 -0
  149. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/klayout/tests/test_netlist_spice_reader.py +0 -0
  150. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/klayout/tests/test_plot_nets.py +0 -0
  151. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/lumerical/README.md +0 -0
  152. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/lumerical/__init__.py +0 -0
  153. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/lumerical/mapping_ubcpdk.yml +0 -0
  154. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/lumerical/read.py +0 -0
  155. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/lumerical/settings.py +0 -0
  156. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/lumerical/tests/test_lumerical_read_sparameters.py +0 -0
  157. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/lumerical/tests/test_netlist.py +0 -0
  158. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/lumerical/tests/test_netlist_get_routes.py +0 -0
  159. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/lumerical/write_sparameters_lumerical_components.py +0 -0
  160. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/materials/__init__.py +0 -0
  161. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/materials/inorganic.py +0 -0
  162. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/materials/optical/__init__.py +0 -0
  163. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/materials/optical/optical_mat.py +0 -0
  164. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/materials/optical/refractive_index_info.py +0 -0
  165. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/materials/semiconductor/__init__.py +0 -0
  166. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/materials/semiconductor/semiconductor_mat.py +0 -0
  167. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/meow/__init__.py +0 -0
  168. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/meow/test_meow_simulation.py +0 -0
  169. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/modes/__init__.py +0 -0
  170. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/modes/coupler.py +0 -0
  171. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/modes/find_coupling_vs_gap.py +0 -0
  172. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/modes/find_mode_dispersion.py +0 -0
  173. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/modes/find_modes.py +0 -0
  174. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/modes/find_modes_cross_section.py +0 -0
  175. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/modes/find_neff_ng_dw_dh.py +0 -0
  176. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/modes/find_neff_vs_width.py +0 -0
  177. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/modes/get_mode_solver_coupler.py +0 -0
  178. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/modes/get_mode_solver_cross_section.py +0 -0
  179. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/modes/get_mode_solver_rib.py +0 -0
  180. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/modes/modes/neff_vs_width_nitride.csv +0 -0
  181. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/modes/modes/neff_vs_width_rib.csv +0 -0
  182. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/modes/modes/neff_vs_width_strip.csv +0 -0
  183. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/modes/neff_convergence_test.py +0 -0
  184. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/modes/neff_vs_width.csv +0 -0
  185. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/modes/overlap.py +0 -0
  186. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/modes/tests/test_dw_dh/test_dw_dh.csv +0 -0
  187. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/modes/tests/test_dw_dh/test_dw_dh.obtained.csv +0 -0
  188. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/modes/tests/test_dw_dh/test_dw_dh_dispersion.csv +0 -0
  189. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/modes/tests/test_dw_dh.py +0 -0
  190. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/modes/tests/test_find_modes.py +0 -0
  191. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/modes/tests/test_find_modes_dispersion.py +0 -0
  192. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/modes/tests/test_neff_vs_width/test_neff_vs_width.csv +0 -0
  193. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/modes/tests/test_neff_vs_width/test_neff_vs_width.obtained.csv +0 -0
  194. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/modes/tests/test_neff_vs_width.py +0 -0
  195. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/modes/types.py +0 -0
  196. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/modes/waveguide.py +0 -0
  197. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/palace/__init__.py +0 -0
  198. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/palace/driven.json +0 -0
  199. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/palace/electrostatic.json +0 -0
  200. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/palace/get_capacitance.py +0 -0
  201. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/palace/get_scattering.py +0 -0
  202. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/palace/tests/test_palace.py +0 -0
  203. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/path_length_analysis/__init__.py +0 -0
  204. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/photonic_circuit_models/__init__.py +0 -0
  205. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/photonic_circuit_models/coupler.py +0 -0
  206. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/photonic_circuit_models/fsr.py +0 -0
  207. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/photonic_circuit_models/heater.py +0 -0
  208. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/photonic_circuit_models/mzi.py +0 -0
  209. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/photonic_circuit_models/ring.py +0 -0
  210. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/process/__init__.py +0 -0
  211. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/process/diffusion.py +0 -0
  212. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/process/implant_tables.py +0 -0
  213. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/process/pysrim.py +0 -0
  214. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/process/silicon.py +0 -0
  215. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/process/skew/antimony_si_skew.csv +0 -0
  216. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/process/skew/arsenic_si_skew.csv +0 -0
  217. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/process/skew/boron_si_skew.csv +0 -0
  218. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/process/skew/phosphorus_si_skew.csv +0 -0
  219. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/sax/__init__.py +0 -0
  220. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/sax/build_model.py +0 -0
  221. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/sax/integrations/__init__.py +0 -0
  222. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/sax/integrations/femwell_waveguide_model.py +0 -0
  223. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/sax/integrations/meep_FDTD_model.py +0 -0
  224. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/sax/integrations/meow_eme_model.py +0 -0
  225. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/sax/interpolators.py +0 -0
  226. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/sax/mlp.py +0 -0
  227. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/sax/models.py +0 -0
  228. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/sax/read.py +0 -0
  229. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/sax/tests/test_mzi.py +0 -0
  230. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/sax/tests/test_mzi_lattice/test_mzi_lattice.obtained.yml +0 -0
  231. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/sax/tests/test_mzi_lattice/test_mzi_lattice.yml +0 -0
  232. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/sax/tests/test_mzi_lattice.py +0 -0
  233. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/sentaurus/mask_sde.py +0 -0
  234. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/sentaurus/mask_sprocess.py +0 -0
  235. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/sentaurus/sdevice.py +0 -0
  236. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/sentaurus/svisual.py +0 -0
  237. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/spice/__init__.py +0 -0
  238. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/spice/spice_to_yaml.py +0 -0
  239. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/spice/tests/__init__.py +0 -0
  240. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/tidy3d/__init__.py +0 -0
  241. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/tidy3d/component.py +0 -0
  242. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/tidy3d/get_results.py +0 -0
  243. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/tidy3d/get_simulation_grating_coupler.py +0 -0
  244. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/tidy3d/materials.py +0 -0
  245. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/tidy3d/modes.py +0 -0
  246. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/tidy3d/tests/test_component_modeler.py +0 -0
  247. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/tidy3d/tests/test_materials.py +0 -0
  248. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/tidy3d/tests/test_modes/test_sweep_width.csv +0 -0
  249. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/tidy3d/tests/test_modes/test_sweep_width.obtained.csv +0 -0
  250. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/tidy3d/tests/test_modes_coupler.py +0 -0
  251. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/tidy3d/tests/test_modes_waveguide.py +0 -0
  252. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/tidy3d/tests/test_plot_simulation_grating_coupler.py +0 -0
  253. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/tidy3d/tests/test_write_sparameters.py +0 -0
  254. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/tidy3d/tests/tests_sparameters/sim_ref.yaml +0 -0
  255. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/tidy3d/tests/tests_sparameters/test_write_sparameters.py +0 -0
  256. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/tidy3d/tests/tests_sparameters/test_write_sparameters_grating_coupler.py +0 -0
  257. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/tidy3d/types.py +0 -0
  258. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/tidy3d/util.py +0 -0
  259. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/tidy3d/write_sparameters_grating_coupler.py +0 -0
  260. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/vlsir/__init__.py +0 -0
  261. {gplugins-1.0.2 → gplugins-1.1.0}/gplugins/vlsir/export_netlist.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: gplugins
3
- Version: 1.0.2
3
+ Version: 1.1.0
4
4
  Summary: gdsfactory plugins
5
5
  Keywords: python
6
6
  Author-email: gdsfactory <contact@gdsfactory.com>
@@ -10,7 +10,7 @@ Classifier: Programming Language :: Python :: 3.10
10
10
  Classifier: Programming Language :: Python :: 3.11
11
11
  Classifier: Programming Language :: Python :: 3.12
12
12
  Classifier: Operating System :: OS Independent
13
- Requires-Dist: gdsfactory>=8
13
+ Requires-Dist: gdsfactory>=8.5.3
14
14
  Requires-Dist: pint
15
15
  Requires-Dist: gdstk
16
16
  Requires-Dist: tqdm
@@ -33,7 +33,7 @@ Requires-Dist: pyvista<=0.43.8 ; extra == "devsim"
33
33
  Requires-Dist: tidy3d>=2.5.2,<2.8 ; extra == "devsim"
34
34
  Requires-Dist: jupytext ; extra == "docs"
35
35
  Requires-Dist: matplotlib ; extra == "docs"
36
- Requires-Dist: jupyter-book==1.0.2 ; extra == "docs"
36
+ Requires-Dist: jupyter-book==1.1.0 ; extra == "docs"
37
37
  Requires-Dist: pyvista[all,trame]<=0.43.8 ; extra == "docs"
38
38
  Requires-Dist: femwell>=0.1.6,<0.2 ; extra == "femwell"
39
39
  Requires-Dist: meshwell>=1.0.7,<=1.1 ; extra == "femwell"
@@ -55,7 +55,7 @@ Requires-Dist: pyvis<=0.3.1 ; extra == "klayout"
55
55
  Requires-Dist: jax>=0.4.26 ; extra == "meow"
56
56
  Requires-Dist: jaxlib>=0.4.26 ; extra == "meow"
57
57
  Requires-Dist: flax>=0.8.2 ; extra == "meow"
58
- Requires-Dist: meow-sim~=0.9.0 ; extra == "meow"
58
+ Requires-Dist: meow-sim~=0.11.0 ; extra == "meow"
59
59
  Requires-Dist: tidy3d>=2.5.2,<2.8 ; extra == "meow"
60
60
  Requires-Dist: jax>=0.4.26 ; extra == "sax"
61
61
  Requires-Dist: jaxlib>=0.4.26 ; extra == "sax"
@@ -69,8 +69,8 @@ Requires-Dist: natsort ; extra == "schematic"
69
69
  Requires-Dist: tidy3d>=2.5.2,<2.8 ; extra == "tidy3d"
70
70
  Requires-Dist: meshio ; extra == "tidy3d"
71
71
  Requires-Dist: meshwell>=1.0.7,<=1.1 ; extra == "tidy3d"
72
- Requires-Dist: vlsir>=4.0.0,<6.0.0 ; extra == "vlsir"
73
- Requires-Dist: vlsirtools>=4.0.0,<6.0.0 ; extra == "vlsir"
72
+ Requires-Dist: vlsir>=4.0.0,<=6.0.0 ; extra == "vlsir"
73
+ Requires-Dist: vlsirtools>=4.0.0,<=6.0.0 ; extra == "vlsir"
74
74
  Provides-Extra: dagster
75
75
  Provides-Extra: dev
76
76
  Provides-Extra: devsim
@@ -85,7 +85,7 @@ Provides-Extra: schematic
85
85
  Provides-Extra: tidy3d
86
86
  Provides-Extra: vlsir
87
87
 
88
- # gplugins 1.0.2
88
+ # gplugins 1.1.0
89
89
 
90
90
  [![docs](https://github.com/gdsfactory/gplugins/actions/workflows/pages.yml/badge.svg)](https://gdsfactory.github.io/gplugins/)
91
91
  [![PyPI](https://img.shields.io/pypi/v/gplugins)](https://pypi.org/project/gplugins/)
@@ -1,4 +1,4 @@
1
- # gplugins 1.0.2
1
+ # gplugins 1.1.0
2
2
 
3
3
  [![docs](https://github.com/gdsfactory/gplugins/actions/workflows/pages.yml/badge.svg)](https://gdsfactory.github.io/gplugins/)
4
4
  [![PyPI](https://img.shields.io/pypi/v/gplugins)](https://pypi.org/project/gplugins/)
@@ -1,6 +1,6 @@
1
1
  """gplugins - gdsfactory plugins"""
2
2
 
3
- __version__ = "1.0.2"
3
+ __version__ = "1.1.0"
4
4
 
5
5
  import pathlib
6
6
 
@@ -35,7 +35,7 @@ class LayeredComponentBase(BaseModel):
35
35
  pad_xy_outer: NonNegativeFloat = 0.0
36
36
  pad_z_inner: float = 0.0
37
37
  pad_z_outer: NonNegativeFloat = 0.0
38
- wafer_layer: tuple[int, int] = (99999, 0)
38
+ wafer_layer: tuple[int, int] = (999, 0)
39
39
  slice_stack: tuple[int, int | None] = (0, None)
40
40
 
41
41
  def __hash__(self):
@@ -240,7 +240,7 @@ if __name__ == "__main__":
240
240
  # We choose a representative subdomain of the component
241
241
  waveguide = gf.Component()
242
242
  waveguide.add_ref(
243
- gf.geometry.trim(
243
+ gf.functions.trim(
244
244
  component=gf.components.straight_pn(length=10, taper=None),
245
245
  domain=[[3, -4], [3, 4], [5, 4], [5, -4]],
246
246
  )
@@ -415,7 +415,7 @@ if __name__ == "__main__":
415
415
  # We choose a representative subdomain of the component
416
416
  waveguide = gf.Component()
417
417
  waveguide.add_ref(
418
- gf.geometry.trim(
418
+ gf.functions.trim(
419
419
  component=gf.components.straight_pn(length=10, taper=None),
420
420
  domain=[[3, -4], [3, 4], [5, 4], [5, -4]],
421
421
  )
@@ -228,7 +228,7 @@ if __name__ == "__main__":
228
228
  port=c.ports["o1"],
229
229
  epsilon=epsilon,
230
230
  xmin=c.dxmin,
231
- ymin=c.ymin,
231
+ ymin=c.dymin,
232
232
  nm_per_pixel=nm_per_pixel,
233
233
  port_extent_xy=1,
234
234
  )
@@ -238,7 +238,7 @@ if __name__ == "__main__":
238
238
  epsilon_port=epsilon_port,
239
239
  excitation=excitation,
240
240
  xmin=c.dxmin,
241
- ymin=c.ymin,
241
+ ymin=c.dymin,
242
242
  zmin=zmin,
243
243
  nm_per_pixel=1000,
244
244
  figsize=(11, 4),
@@ -131,7 +131,7 @@ def get_sparameters_fdtdz(
131
131
  port=component.ports[portname],
132
132
  epsilon=epsilon,
133
133
  xmin=component_extended.dxmin,
134
- ymin=component_extended.ymin,
134
+ ymin=component_extended.dymin,
135
135
  nm_per_pixel=nm_per_pixel,
136
136
  port_extent_xy=port_margin,
137
137
  )
@@ -8,7 +8,7 @@ from natsort import natsorted
8
8
 
9
9
 
10
10
  def patch_netlist(netlist):
11
- if not netlist["connections"] and not netlist["ports"] and not netlist["instances"]:
11
+ if not netlist.get("nets") and not netlist["ports"] and not netlist["instances"]:
12
12
  netlist = wrap_component_in_netlist(netlist.get("name", ""))
13
13
  netlist = patch_netlist_with_port_info(netlist)
14
14
  netlist = patch_netlist_with_icon_info(netlist)
@@ -51,10 +51,8 @@ def patch_netlist_with_connection_info(netlist):
51
51
  i = netlist["info"] = netlist.get("info", {})
52
52
  s = i["schematic"] = i.get("schematic", {})
53
53
  ic = s["implicit_connections"] = s.get("implicit_connections", {})
54
- for ip1, ip2 in netlist["connections"].items():
55
- if _is_implicit_connection(
56
- ip1, ip2, netlist["instances"], netlist["connections"]
57
- ):
54
+ for ip1, ip2 in netlist["nets"]:
55
+ if _is_implicit_connection(ip1, ip2, netlist["instances"], netlist["nets"]):
58
56
  ic["ip1"] = ip2
59
57
  return netlist
60
58
 
@@ -156,7 +154,7 @@ def get_ports(child, parent=None):
156
154
  p = gf.get_component(parent)
157
155
  c = [r.parent for r in p.references if r.parent.name.startswith(child)][0]
158
156
 
159
- ports1 = natsorted(c.ports)
157
+ ports1 = sort_ports(c.ports)
160
158
 
161
159
  try:
162
160
  netlist = get_netlist(c)
@@ -165,14 +163,14 @@ def get_ports(child, parent=None):
165
163
 
166
164
  if netlist:
167
165
  ports2 = natsorted(netlist["ports"])
168
- if len(ports1) > len(ports2):
169
- ports = ports1
170
- else:
171
- ports = ports2
166
+ ports = ports1 if len(ports1) > len(ports2) else ports2
172
167
  else:
173
168
  ports = ports1
174
169
 
175
- [(x0, y0), (x1, y1)] = c.bbox # type: ignore
170
+ x0 = c.dxmin
171
+ x1 = c.dxmax
172
+ y0 = c.dymin
173
+ y1 = c.dymax
176
174
  x0, x1 = min(x0, x1), max(x0, x1)
177
175
  y0, y1 = min(y0, y1), max(y0, y1)
178
176
 
@@ -190,13 +188,13 @@ def get_ports(child, parent=None):
190
188
  i = np.argmin([dn, de, ds, dw])
191
189
  return ["n", "e", "s", "w"][i]
192
190
 
193
- ports = {name: orientation(*c.ports[name].center) for name in ports}
191
+ ports = {port.name: orientation(*c.ports[port.name].center) for port in ports}
194
192
  return ports
195
193
 
196
194
 
197
195
  def get_netlist(c: gf.Component, with_instance_info=False):
198
196
  try:
199
- netlist = c.get_netlist(merge_info=True)
197
+ netlist = c.get_netlist()
200
198
  except TypeError:
201
199
  netlist = c.get_netlist()
202
200
  netlist = replace_cross_sections_recursive(netlist)
@@ -216,8 +214,7 @@ def get_icon_poly(name):
216
214
  c = gf.get_component(name)
217
215
  layer_priority = {lay: i for i, lay in enumerate(most_common_layers())}
218
216
  polys = {}
219
- for p in c.flatten().polygons:
220
- layer = (p.layer, p.datatype)
217
+ for layer, p in c.get_polygons_points().items():
221
218
  if layer not in polys:
222
219
  polys[layer] = []
223
220
  polys[layer].append(p)
@@ -234,8 +231,8 @@ def get_icon_poly(name):
234
231
  poly = rdp(polys[0].points)
235
232
  if (poly.shape[0] < 3) or (poly.shape[0] > 100):
236
233
  return default
237
- poly = (poly - c.bbox[0:1]) / (c.bbox[1:2] - c.bbox[0:1])
238
- poly = [(x, y) for (x, y) in poly] # noqa: C416
234
+ poly = (poly - c.bbox_np()[0:1]) / (c.bbox_np()[1:2] - c.bbox_np()[0:1])
235
+ poly = list(poly)
239
236
  if "coupler" in name:
240
237
  ymin = min(poly, key=lambda xy: xy[1])[1]
241
238
  poly = [
@@ -257,14 +254,12 @@ def rdp(poly, eps=0.1):
257
254
  index = np.argmax(dists)
258
255
  dmax = dists[index]
259
256
 
260
- if dmax > eps:
261
- result1 = rdp(poly[: index + 1], eps=eps)
262
- result2 = rdp(poly[index:], eps=eps)
263
- result = np.vstack((result1[:-1], result2))
264
- else:
265
- result = np.array([start, end])
257
+ if dmax <= eps:
258
+ return np.array([start, end])
266
259
 
267
- return result
260
+ result1 = rdp(poly[: index + 1], eps=eps)
261
+ result2 = rdp(poly[index:], eps=eps)
262
+ return np.vstack((result1[:-1], result2))
268
263
 
269
264
 
270
265
  def _line_dists(points, start, end):
@@ -275,24 +270,27 @@ def _line_dists(points, start, end):
275
270
  return np.divide(abs(cross), np.linalg.norm(vec))
276
271
 
277
272
 
273
+ def sort_ports(ports) -> list[gf.Port]:
274
+ return natsorted(ports, key=lambda port: port.dx)
275
+
276
+
278
277
  def wrap_component_in_netlist(name):
279
278
  if not name:
280
279
  return {}
281
280
  c = gf.Component()
282
281
  _ = c << gf.get_component(name)
283
282
  c.name = name
284
- ports = {p: f"{name},{p}" for p in c.references[0].ports}
285
- netlist = {
283
+ ports = {p: f"{name},{p}" for p in c.insts[0].ports}
284
+ return {
286
285
  "instances": {
287
286
  f"{name}": {
288
287
  "component": name,
289
288
  "settings": {},
290
289
  },
291
290
  },
292
- "connections": {},
293
- "ports": {p: ports[p] for p in natsorted(ports)},
291
+ "nets": [],
292
+ "ports": {p: ports[p] for p in sort_ports(ports)},
294
293
  }
295
- return netlist
296
294
 
297
295
 
298
296
  def _bad_instance(_):
@@ -316,17 +314,16 @@ def get_component_name(component_dict: dict | str, default="") -> str:
316
314
 
317
315
  def ensure_netlist_order(netlist):
318
316
  netlist = {**netlist}
319
- new_netlist = {
317
+ return {
320
318
  "pdk": netlist.pop("pdk", ""),
321
319
  "instances": netlist.pop("instances", {}),
322
- "connections": netlist.pop("connections", {}),
320
+ "nets": netlist.pop("nets", []),
323
321
  "routes": netlist.pop("routes", {}),
324
322
  "ports": netlist.pop("ports", {}),
325
323
  "placements": netlist.pop("placements", {}),
326
324
  "info": netlist.pop("info", {}),
327
325
  **netlist,
328
326
  }
329
- return new_netlist
330
327
 
331
328
 
332
329
  def replace_cross_sections_recursive(obj):
@@ -336,9 +333,7 @@ def replace_cross_sections_recursive(obj):
336
333
  obj[k] = check_cross_section(obj[k])
337
334
  else:
338
335
  obj[k] = replace_cross_sections_recursive(obj[k])
339
- return obj
340
- else:
341
- return obj
336
+ return obj
342
337
 
343
338
 
344
339
  def remove_instance_info(netlist):
@@ -394,13 +389,9 @@ def _is_implicit_connection(ip1, ip2, instances, connections):
394
389
  return False
395
390
  if i2 not in instances:
396
391
  return False
397
- if (connections[ip1] == ip2) or (connections[ip2] == ip1):
398
- return False
399
- return True
392
+ return connections[ip1] != ip2 and connections[ip2] != ip1
400
393
 
401
394
 
402
395
  def _is_hierarchical_pic(name):
403
396
  c = gf.get_component(name)
404
- if c.references:
405
- return True
406
- return False
397
+ return bool(c.insts)
@@ -41,12 +41,15 @@ def get_meep_geometry_from_component(
41
41
  component_with_booleans = layer_stack.get_component_with_derived_layers(component)
42
42
 
43
43
  geometry = []
44
- layer_to_polygons = component_with_booleans.get_polygons(by_spec=True)
44
+ layer_to_polygons = component_with_booleans.get_polygons_points()
45
45
 
46
46
  ordered_layer_stack_keys = order_layer_stack(layer_stack)[::-1]
47
47
  for layername in ordered_layer_stack_keys:
48
48
  layer = layer_stack.layers[layername].layer
49
- polygons = layer_to_polygons[layer_stack.layers[layername].layer]
49
+
50
+ if layer not in layer_to_polygons:
51
+ continue
52
+ polygons = layer_to_polygons[layer]
50
53
  if layer in layer_to_thickness and layer in layer_to_material:
51
54
  height = layer_to_thickness[layer] if is_3d else mp.inf
52
55
  zmin_um = layer_to_zmin[layer] if is_3d else 0
@@ -10,7 +10,7 @@ import gdsfactory as gf
10
10
  import meep as mp
11
11
  import numpy as np
12
12
  from gdsfactory.component import Component
13
- from gdsfactory.components.extension import move_polar_rad_copy
13
+ from gdsfactory.components.extension import extend_ports, move_polar_rad_copy
14
14
  from gdsfactory.pdk import get_layer_stack
15
15
  from gdsfactory.technology import LayerStack
16
16
 
@@ -141,7 +141,8 @@ def get_simulation(
141
141
  layer_stack = layer_stack or get_layer_stack()
142
142
  layer_to_thickness = layer_stack.get_layer_to_thickness()
143
143
 
144
- component_ref = component.ref()
144
+ dummy_component = gf.Component()
145
+ component_ref = dummy_component << component
145
146
  component_ref.dx = 0
146
147
  component_ref.dy = 0
147
148
 
@@ -161,15 +162,13 @@ def get_simulation(
161
162
  ), f"component needs to be a gf.Component, got Type {type(component)}"
162
163
 
163
164
  component_extended = (
164
- gf.components.extension.extend_ports(
165
- component=component, length=extend_ports_length, centered=True
166
- )
165
+ extend_ports(component=component, length=extend_ports_length, centered=True)
167
166
  if extend_ports_length
168
167
  else component
169
168
  )
170
169
 
171
170
  component_extended.show()
172
- component_extended = component_extended.flatten()
171
+ # component_extended.flatten()
173
172
 
174
173
  # geometry_center = [component_extended.x, component_extended.y]
175
174
  # geometry_center = [0, 0]
@@ -193,8 +192,8 @@ def get_simulation(
193
192
  cell_thickness = tpml + zmargin_bot + t_core + zmargin_top + tpml if is_3d else 0
194
193
 
195
194
  cell_size = mp.Vector3(
196
- component.xsize + 2 * tpml,
197
- component.ysize + 2 * tpml,
195
+ component.dxsize + 2 * tpml,
196
+ component.dysize + 2 * tpml,
198
197
  cell_thickness,
199
198
  )
200
199
 
@@ -250,7 +249,7 @@ def get_simulation(
250
249
  eig_band=port_source_mode + 1,
251
250
  eig_parity=mp.NO_PARITY if is_3d else mp.EVEN_Y + mp.ODD_Z,
252
251
  eig_match_freq=True,
253
- eig_kpoint=-1 * mp.Vector3(x=1).drotate(mp.Vector3(z=1), angle_rad),
252
+ eig_kpoint=-1 * mp.Vector3(x=1).rotate(mp.Vector3(z=1), angle_rad),
254
253
  direction=direction,
255
254
  )
256
255
  ]
@@ -271,8 +270,8 @@ def get_simulation(
271
270
 
272
271
  # Add port monitors dict
273
272
  monitors = {}
274
- for port_name in component_ref.ports.keys():
275
- port = component_ref.ports[port_name]
273
+ for port in component_ref:
274
+ port_name = port.name
276
275
  angle_rad = np.radians(port.orientation)
277
276
  width = port.width + 2 * port_margin
278
277
  size_x = width * abs(np.sin(angle_rad))
@@ -235,7 +235,7 @@ def get_simulation_grating_fiber(
235
235
  fiber_port_center = mp.Vector3(fiber_port_x_offset_from_angle, fiber_port_y)
236
236
  fiber_port_x_size = fiber_port_x_size or 3.5 * fiber_core_diameter
237
237
  fiber_port_size = mp.Vector3(fiber_port_x_size, 0, 0)
238
- # fiber_port_direction = mp.Vector3(y=-1).drotate(mp.Vector3(z=1), -1 * fiber_angle)
238
+ # fiber_port_direction = mp.Vector3(y=-1).rotate(mp.Vector3(z=1), -1 * fiber_angle)
239
239
 
240
240
  waveguide_port_y = -sz / 2 + (
241
241
  +pml_thickness
@@ -262,8 +262,8 @@ def get_simulation_grating_fiber(
262
262
  material=fiber_clad_material,
263
263
  center=mp.Vector3(0, waveguide_port_y - core_thickness / 2),
264
264
  size=mp.Vector3(fiber_clad, hfiber_geom),
265
- e1=mp.Vector3(x=1).drotate(mp.Vector3(z=1), -1 * fiber_angle),
266
- e2=mp.Vector3(y=1).drotate(mp.Vector3(z=1), -1 * fiber_angle),
265
+ e1=mp.Vector3(x=1).rotate(mp.Vector3(z=1), -1 * fiber_angle),
266
+ e2=mp.Vector3(y=1).rotate(mp.Vector3(z=1), -1 * fiber_angle),
267
267
  )
268
268
  ]
269
269
 
@@ -272,8 +272,8 @@ def get_simulation_grating_fiber(
272
272
  material=fiber_core_material,
273
273
  center=mp.Vector3(x=0),
274
274
  size=mp.Vector3(fiber_core_diameter, hfiber_geom),
275
- e1=mp.Vector3(x=1).drotate(mp.Vector3(z=1), -1 * fiber_angle),
276
- e2=mp.Vector3(y=1).drotate(mp.Vector3(z=1), -1 * fiber_angle),
275
+ e1=mp.Vector3(x=1).rotate(mp.Vector3(z=1), -1 * fiber_angle),
276
+ e2=mp.Vector3(y=1).rotate(mp.Vector3(z=1), -1 * fiber_angle),
277
277
  )
278
278
  )
279
279
 
@@ -512,7 +512,7 @@ def get_port_1D_eigenmode(
512
512
  direction=mp.NO_DIRECTION,
513
513
  where=mp.Volume(center=center_fiber, size=size_fiber),
514
514
  band_num=band_num,
515
- kpoint=mp.Vector3(0, fsrc * 1.45, 0).drotate(
515
+ kpoint=mp.Vector3(0, fsrc * 1.45, 0).rotate(
516
516
  mp.Vector3(z=1), -1 * np.radians(fiber_angle_deg)
517
517
  ), # Hardcoded index for now, pull from simulation eventually
518
518
  frequency=fsrc,
@@ -151,8 +151,8 @@ def get_meep_adjoint_optimizer(
151
151
  Vector3(*cell_size)
152
152
  if cell_size
153
153
  else Vector3(
154
- c.xsize + 2 * sim.boundary_layers[0].thickness,
155
- c.ysize + 2 * sim.boundary_layers[0].thickness,
154
+ c.dxsize + 2 * sim.boundary_layers[0].thickness,
155
+ c.dysize + 2 * sim.boundary_layers[0].thickness,
156
156
  cell_thickness,
157
157
  )
158
158
  )
@@ -13,7 +13,6 @@ from typing import Any
13
13
  import gdsfactory as gf
14
14
  import meep as mp
15
15
  import numpy as np
16
- import pydantic
17
16
  import yaml
18
17
  from gdsfactory import logger
19
18
  from gdsfactory.component import Component
@@ -114,7 +113,6 @@ def parse_port_eigenmode_coeff(
114
113
  return coeff_in, coeff_out
115
114
 
116
115
 
117
- @pydantic.validate_arguments
118
116
  def write_sparameters_meep(
119
117
  component: ComponentSpec,
120
118
  port_source_names: list[str] | None = None,
@@ -349,9 +347,10 @@ def write_sparameters_meep(
349
347
  right=xmargin_right,
350
348
  )
351
349
 
352
- component_ref = component.ref()
350
+ dummy = Component()
351
+ component_ref = dummy << component
353
352
  ports = component_ref.ports
354
- port_names = [port.name for port in list(ports.values())]
353
+ port_names = [port.name for port in ports]
355
354
  port_source_names = port_source_names or port_names
356
355
  port_source_modes = port_source_modes or {key: [0] for key in port_source_names}
357
356
  port_modes = port_modes or [0]
@@ -402,7 +401,6 @@ def write_sparameters_meep(
402
401
  sp = {} # Sparameters dict
403
402
  start = time.time()
404
403
 
405
- @pydantic.validate_arguments
406
404
  def sparameter_calculation(
407
405
  port_source_name: str,
408
406
  component: Component,
@@ -12,9 +12,9 @@ from pprint import pprint
12
12
 
13
13
  import gdsfactory as gf
14
14
  import numpy as np
15
- import pydantic
16
- from gdsfactory import logger, sparameters_path
15
+ from gdsfactory import logger
17
16
  from gdsfactory.component import Component
17
+ from gdsfactory.config import sparameters_path
18
18
  from gdsfactory.pdk import get_layer_stack
19
19
  from gdsfactory.technology import LayerStack
20
20
  from tqdm.auto import tqdm
@@ -33,7 +33,6 @@ core_materials = multiprocessing.cpu_count()
33
33
  temp_dir_default = Path(sparameters_path) / "temp"
34
34
 
35
35
 
36
- @pydantic.validate_arguments
37
36
  def write_sparameters_meep_batch(
38
37
  jobs: list[dict],
39
38
  cores_per_run: int = 2,
@@ -13,7 +13,6 @@ from functools import partial
13
13
  from pathlib import Path
14
14
 
15
15
  import gdsfactory as gf
16
- import pydantic
17
16
  from gdsfactory import logger
18
17
  from gdsfactory.component import Component
19
18
  from gdsfactory.config import GDSDIR_TEMP
@@ -40,7 +39,6 @@ def _python() -> str:
40
39
  return sys.executable
41
40
 
42
41
 
43
- @pydantic.validate_arguments
44
42
  def write_sparameters_meep_mpi(
45
43
  component: ComponentSpec,
46
44
  layer_stack: LayerStack | None = None,
@@ -30,8 +30,8 @@ def get_mesh(
30
30
  z: float | None = None,
31
31
  xsection_bounds=None,
32
32
  wafer_padding: float = 0.0,
33
- wafer_layer: Layer = (99999, 0),
34
- default_characteristic_length=0.5,
33
+ wafer_layer: Layer = (999, 0),
34
+ default_characteristic_length: float = 0.5,
35
35
  background_remeshing_file: Path | None = None,
36
36
  **kwargs,
37
37
  ):
@@ -47,7 +47,7 @@ def test_gmsh_xyz_mesh() -> None:
47
47
  verbosity=5,
48
48
  # port_names=["r_e2", "l_e4"],
49
49
  wafer_padding=2.0,
50
- wafer_layer=(99999, 0),
50
+ wafer_layer=(999, 0),
51
51
  )
52
52
 
53
53
 
@@ -1,3 +1,4 @@
1
+ # type: ignore
1
2
  from __future__ import annotations
2
3
 
3
4
  from collections.abc import Sequence
@@ -261,11 +262,7 @@ def uz_xsection_mesh(
261
262
  )
262
263
 
263
264
  # simulation polygons to u-z coordinates along cross-sectional line
264
- if "z_bounds" in kwargs:
265
- z_bounds = kwargs["z_bounds"]
266
- else:
267
- z_bounds = None
268
-
265
+ z_bounds = kwargs.get("z_bounds", None)
269
266
  bounds_dict = get_uz_bounds_layers(
270
267
  buffered_layer_polygons_dict,
271
268
  xsection_bounds,
@@ -409,7 +406,7 @@ def uz_xsection_mesh(
409
406
  if __name__ == "__main__":
410
407
  from gdsfactory.pdk import get_layer_stack
411
408
 
412
- c = gf.component.Component()
409
+ c = gf.Component()
413
410
 
414
411
  waveguide = c << gf.get_component(gf.components.straight_pin(length=10, taper=None))
415
412
  undercut = c << gf.get_component(
@@ -144,7 +144,7 @@ def xy_xsection_mesh(
144
144
  | {
145
145
  background_tag: LayerLevel(
146
146
  layer=LogicalLayer(
147
- layer=(9999, 0)
147
+ layer=(999, 0)
148
148
  ), # TODO something like LAYERS.BACKGROUND?
149
149
  thickness=(
150
150
  (zmax + background_padding[5]) - (zmin - background_padding[2])
@@ -188,7 +188,7 @@ def xy_xsection_mesh(
188
188
  if __name__ == "__main__":
189
189
  import gdsfactory as gf
190
190
 
191
- c = gf.component.Component()
191
+ c = gf.Component()
192
192
  waveguide = c << gf.get_component(gf.components.straight_pin(length=10, taper=None))
193
193
 
194
194
  from gdsfactory.pdk import get_layer_stack
@@ -197,7 +197,7 @@ def xyz_mesh(
197
197
  background_remeshing_file: .pos file to use as a remeshing field. Overrides resolutions if not None.
198
198
  """
199
199
  if port_names:
200
- mesh_component = component.copy()
200
+ mesh_component = component.dup()
201
201
  mesh_component.add_ports(component.ports)
202
202
  component = get_component_with_net_layers(
203
203
  component=mesh_component,
@@ -251,7 +251,7 @@ def xyz_mesh(
251
251
  | {
252
252
  background_tag: LayerLevel(
253
253
  layer=LogicalLayer(
254
- layer=(9999, 0)
254
+ layer=(999, 0)
255
255
  ), # TODO something like LAYERS.BACKGROUND?
256
256
  thickness=(
257
257
  (zmax + background_padding[5]) - (zmin - background_padding[2])
@@ -320,7 +320,7 @@ if __name__ == "__main__":
320
320
  from gdsfactory.pdk import get_layer_stack
321
321
 
322
322
  # Choose some component
323
- c = gf.component.Component()
323
+ c = gf.Component()
324
324
  waveguide = c << gf.get_component(gf.components.straight(length=40))
325
325
  c.add_ports(waveguide.ports)
326
326
 
@@ -60,7 +60,7 @@ def enclosing(
60
60
  c = gf.Component()
61
61
  c << gf.components.rectangle(size=(w1, w1), layer=layer1, centered=True)
62
62
  r2 = c << gf.components.rectangle(size=(w2, w2), layer=layer2, centered=True)
63
- r2.movex(0.5)
63
+ r2.dmovex(0.5)
64
64
  return c
65
65
 
66
66
 
@@ -386,8 +386,8 @@ if __name__ == "__main__":
386
386
  small_rect.dx += 10
387
387
  small_rect.dy += 10
388
388
  small_rect2 = c << gf.components.rectangle(size=(25, 25), layer=(2, 0))
389
- small_rect2.dymax = 100 - small_rect2.ysize
390
- small_rect2.dxmax = large_rect.dxmax - small_rect2.xsize
389
+ small_rect2.dymax = 100 - small_rect2.dysize
390
+ small_rect2.dxmax = large_rect.dxmax - small_rect2.dxsize
391
391
  # c.write_gds(PATH.test_data / "test_gds_density1.gds")
392
392
  return c
393
393