gplugins 1.2.4__tar.gz → 1.3.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 (254) hide show
  1. {gplugins-1.2.4 → gplugins-1.3.0}/PKG-INFO +9 -10
  2. {gplugins-1.2.4 → gplugins-1.3.0}/README.md +1 -1
  3. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/__init__.py +1 -1
  4. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/common/base_models/component.py +2 -2
  5. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/common/utils/add_simulation_markers.py +6 -4
  6. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/common/utils/convert_sparameters.py +3 -3
  7. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/common/utils/tests/test_get_component_with_new_port_layers.py +3 -3
  8. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/devsim/get_simulation_xsection.py +2 -2
  9. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/elmer/get_capacitance.py +1 -1
  10. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/fdtdz/get_sparameters_fdtdz.py +3 -3
  11. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/femwell/mode_solver.py +8 -4
  12. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/gmeep/get_simulation.py +3 -3
  13. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/gmsh/parse_component.py +1 -1
  14. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/gmsh/parse_gds.py +8 -6
  15. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/gmsh/xy_xsection_mesh.py +15 -9
  16. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/klayout/dataprep/regions.py +16 -8
  17. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/klayout/drc/check_exclusion.py +2 -3
  18. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/klayout/drc/check_inclusion.py +2 -3
  19. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/klayout/drc/check_space.py +1 -1
  20. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/klayout/drc/check_width.py +1 -1
  21. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/klayout/drc/samples/drc_errors.py +1 -2
  22. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/klayout/drc/write_drc.py +1 -1
  23. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/klayout/get_density.py +40 -29
  24. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/klayout/get_netlist.py +8 -5
  25. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/klayout/netlist_graph.py +3 -1
  26. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/klayout/netlist_spice_reader.py +19 -1
  27. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/klayout/tests/test_global_density.py +21 -21
  28. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/lumerical/__init__.py +0 -2
  29. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/lumerical/interconnect.py +37 -21
  30. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/lumerical/tests/test_netlist_get_routes.py +3 -3
  31. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/lumerical/write_sparameters_lumerical.py +3 -4
  32. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/meow/meow_eme.py +2 -2
  33. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/path_length_analysis/path_length_analysis_from_gds.py +10 -8
  34. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/photonic_circuit_models/ring.py +1 -1
  35. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/sax/models.py +1 -1
  36. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/sax/parameter.py +4 -5
  37. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/sentaurus/sprocess.py +3 -3
  38. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/spice/spice_to_yaml.py +3 -3
  39. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/tidy3d/component.py +1 -1
  40. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/tidy3d/modes.py +2 -1
  41. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/tidy3d/tests/test_write_sparameters.py +4 -0
  42. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/tidy3d/types.py +3 -3
  43. gplugins-1.3.0/gplugins/typings.py +6 -0
  44. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/vlsir/tests/test_vlsir.py +3 -3
  45. {gplugins-1.2.4 → gplugins-1.3.0}/pyproject.toml +30 -77
  46. gplugins-1.2.4/gplugins/dagster/Makefile +0 -2
  47. gplugins-1.2.4/gplugins/dagster/workflow.py +0 -56
  48. gplugins-1.2.4/gplugins/spice/tests/__init__.py +0 -0
  49. {gplugins-1.2.4 → gplugins-1.3.0}/LICENSE +0 -0
  50. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/common/__init__.py +0 -0
  51. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/common/base_models/__init__.py +0 -0
  52. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/common/base_models/simulation.py +0 -0
  53. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/common/config.py +0 -0
  54. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/common/types.py +0 -0
  55. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/common/utils/__init__.py +0 -0
  56. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/common/utils/async_helpers.py +0 -0
  57. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/common/utils/cache.py +0 -0
  58. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/common/utils/disable_print.py +0 -0
  59. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/common/utils/get_capacitance.py +0 -0
  60. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/common/utils/get_component_with_local_layers.py +0 -0
  61. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/common/utils/get_component_with_net_layers.py +0 -0
  62. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/common/utils/get_effective_indices.py +0 -0
  63. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/common/utils/get_scattering.py +0 -0
  64. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/common/utils/get_sparameters_path.py +0 -0
  65. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/common/utils/optical_constants.py +0 -0
  66. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/common/utils/parse_layer_stack.py +0 -0
  67. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/common/utils/plot.py +0 -0
  68. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/common/utils/plot_csv.py +0 -0
  69. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/common/utils/port_symmetries.py +0 -0
  70. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/devsim/__init__.py +0 -0
  71. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/devsim/doping.py +0 -0
  72. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/devsim/get_simulation.py +0 -0
  73. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/devsim/get_solver.py +0 -0
  74. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/devsim/test_devsim.py +0 -0
  75. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/elmer/__init__.py +0 -0
  76. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/elmer/electrostatic.sif.j2 +0 -0
  77. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/elmer/tests/test_elmer.py +0 -0
  78. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/fdtdz/__init__.py +0 -0
  79. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/fdtdz/get_epsilon_fdtdz.py +0 -0
  80. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/fdtdz/get_ports_fdtdz.py +0 -0
  81. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/femwell/__init__.py +0 -0
  82. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/femwell/solve_thermal.py +0 -0
  83. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/femwell/test_mode_solver.py +0 -0
  84. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/gfviz/Makefile +0 -0
  85. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/gfviz/__init__.py +0 -0
  86. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/gfviz/b64.py +0 -0
  87. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/gfviz/gfviz.py +0 -0
  88. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/gfviz/netlist.py +0 -0
  89. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/gfviz/serve.py +0 -0
  90. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/gfviz/static/b64.js +0 -0
  91. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/gfviz/static/schemedit.js +0 -0
  92. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/gfviz/static/schemedit.wasm +0 -0
  93. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/gfviz/templates/example.json +0 -0
  94. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/gfviz/templates/index.html +0 -0
  95. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/gmeep/__init__.py +0 -0
  96. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/gmeep/get_material.py +0 -0
  97. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/gmeep/get_meep_geometry.py +0 -0
  98. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/gmeep/get_port_eigenmode.py +0 -0
  99. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/gmeep/get_simulation_grating_farfield.py +0 -0
  100. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/gmeep/get_simulation_grating_fiber.py +0 -0
  101. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/gmeep/meep_adjoint_optimization.py +0 -0
  102. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/gmeep/test_eigenmode.py +0 -0
  103. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/gmeep/test_materials.py +0 -0
  104. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/gmeep/test_sparameterNxN/test_sparameterNxN_crossing.csv +0 -0
  105. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/gmeep/test_sparameterNxN/test_sparameterNxN_straight.csv +0 -0
  106. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/gmeep/test_write_sparameters_meep/test_sparameterNxN_crossing.csv +0 -0
  107. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/gmeep/test_write_sparameters_meep/test_sparameterNxN_straight.csv +0 -0
  108. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/gmeep/test_write_sparameters_meep/test_sparameterNxN_symmetries_straight.csv +0 -0
  109. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/gmeep/test_write_sparameters_meep/test_sparameter_straight_mpi.csv +0 -0
  110. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/gmeep/test_write_sparameters_meep/test_sparameter_straight_mpi_pool.csv +0 -0
  111. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/gmeep/test_write_sparameters_meep/test_sparameters_crossing_symmetric.csv +0 -0
  112. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/gmeep/test_write_sparameters_meep/test_sparameters_straight.csv +0 -0
  113. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/gmeep/test_write_sparameters_meep/test_sparameters_straight_batch.csv +0 -0
  114. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/gmeep/test_write_sparameters_meep/test_sparameters_straight_mpi.csv +0 -0
  115. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/gmeep/test_write_sparameters_meep/test_sparameters_straight_mpi_pool.csv +0 -0
  116. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/gmeep/test_write_sparameters_meep/test_sparameters_straight_symmetric.csv +0 -0
  117. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/gmeep/test_write_sparameters_meep.py +0 -0
  118. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/gmeep/write_sparameters_grating.py +0 -0
  119. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/gmeep/write_sparameters_meep.py +0 -0
  120. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/gmeep/write_sparameters_meep_batch.py +0 -0
  121. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/gmeep/write_sparameters_meep_mpi.py +0 -0
  122. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/gmsh/__init__.py +0 -0
  123. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/gmsh/define_polysurfaces.py +0 -0
  124. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/gmsh/get_mesh.py +0 -0
  125. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/gmsh/tests/test_custom_names.py +0 -0
  126. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/gmsh/tests/test_meshing_2D.py +0 -0
  127. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/gmsh/tests/test_meshing_3D.py +0 -0
  128. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/gmsh/uz_xsection_mesh.py +0 -0
  129. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/gmsh/xyz_mesh.py +0 -0
  130. {gplugins-1.2.4/gplugins/dagster → gplugins-1.3.0/gplugins/klayout}/__init__.py +0 -0
  131. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/klayout/dataprep/__init__.py +0 -0
  132. {gplugins-1.2.4/gplugins/klayout → gplugins-1.3.0/gplugins/klayout/drc}/__init__.py +0 -0
  133. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/klayout/drc/check_duplicated_cells.py +0 -0
  134. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/klayout/drc/count_drc.py +0 -0
  135. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/klayout/plot_nets.py +0 -0
  136. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/klayout/tests/test_dataprep_regions.py +0 -0
  137. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/klayout/tests/test_density.py +0 -0
  138. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/klayout/tests/test_drc_exclusion.py +0 -0
  139. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/klayout/tests/test_drc_inclusion.py +0 -0
  140. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/klayout/tests/test_drc_space.py +0 -0
  141. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/klayout/tests/test_drc_width.py +0 -0
  142. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/klayout/tests/test_netlist_spice_reader.py +0 -0
  143. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/klayout/tests/test_plot_nets.py +0 -0
  144. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/lumerical/README.md +0 -0
  145. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/lumerical/mapping_ubcpdk.yml +0 -0
  146. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/lumerical/read.py +0 -0
  147. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/lumerical/settings.py +0 -0
  148. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/lumerical/tests/test_lumerical_read_sparameters.py +0 -0
  149. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/lumerical/tests/test_netlist.py +0 -0
  150. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/lumerical/write_sparameters_lumerical_components.py +0 -0
  151. {gplugins-1.2.4/gplugins/klayout/drc → gplugins-1.3.0/gplugins/materials}/__init__.py +0 -0
  152. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/materials/inorganic.py +0 -0
  153. {gplugins-1.2.4/gplugins/materials → gplugins-1.3.0/gplugins/materials/optical}/__init__.py +0 -0
  154. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/materials/optical/optical_mat.py +0 -0
  155. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/materials/optical/refractive_index_info.py +0 -0
  156. {gplugins-1.2.4/gplugins/materials/optical → gplugins-1.3.0/gplugins/materials/semiconductor}/__init__.py +0 -0
  157. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/materials/semiconductor/semiconductor_mat.py +0 -0
  158. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/meow/__init__.py +0 -0
  159. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/meow/test_meow_simulation.py +0 -0
  160. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/modes/__init__.py +0 -0
  161. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/modes/coupler.py +0 -0
  162. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/modes/find_coupling_vs_gap.py +0 -0
  163. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/modes/find_mode_dispersion.py +0 -0
  164. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/modes/find_modes.py +0 -0
  165. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/modes/find_modes_cross_section.py +0 -0
  166. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/modes/find_neff_ng_dw_dh.py +0 -0
  167. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/modes/find_neff_vs_width.py +0 -0
  168. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/modes/get_mode_solver_coupler.py +0 -0
  169. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/modes/get_mode_solver_cross_section.py +0 -0
  170. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/modes/get_mode_solver_rib.py +0 -0
  171. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/modes/modes/neff_vs_width_nitride.csv +0 -0
  172. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/modes/modes/neff_vs_width_rib.csv +0 -0
  173. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/modes/modes/neff_vs_width_strip.csv +0 -0
  174. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/modes/neff_convergence_test.py +0 -0
  175. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/modes/neff_vs_width.csv +0 -0
  176. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/modes/overlap.py +0 -0
  177. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/modes/tests/test_dw_dh/test_dw_dh.csv +0 -0
  178. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/modes/tests/test_dw_dh/test_dw_dh.obtained.csv +0 -0
  179. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/modes/tests/test_dw_dh/test_dw_dh_dispersion.csv +0 -0
  180. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/modes/tests/test_dw_dh.py +0 -0
  181. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/modes/tests/test_find_modes.py +0 -0
  182. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/modes/tests/test_find_modes_dispersion.py +0 -0
  183. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/modes/tests/test_neff_vs_width/test_neff_vs_width.csv +0 -0
  184. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/modes/tests/test_neff_vs_width/test_neff_vs_width.obtained.csv +0 -0
  185. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/modes/tests/test_neff_vs_width.py +0 -0
  186. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/modes/types.py +0 -0
  187. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/modes/waveguide.py +0 -0
  188. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/palace/__init__.py +0 -0
  189. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/palace/driven.json +0 -0
  190. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/palace/electrostatic.json +0 -0
  191. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/palace/get_capacitance.py +0 -0
  192. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/palace/get_scattering.py +0 -0
  193. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/palace/tests/test_palace.py +0 -0
  194. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/path_length_analysis/__init__.py +0 -0
  195. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/path_length_analysis/path_length_analysis.py +0 -0
  196. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/path_length_analysis/test_pathlength_extraction.py +0 -0
  197. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/photonic_circuit_models/__init__.py +0 -0
  198. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/photonic_circuit_models/coupler.py +0 -0
  199. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/photonic_circuit_models/fsr.py +0 -0
  200. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/photonic_circuit_models/heater.py +0 -0
  201. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/photonic_circuit_models/mzi.py +0 -0
  202. {gplugins-1.2.4/gplugins/materials/semiconductor → gplugins-1.3.0/gplugins/process}/__init__.py +0 -0
  203. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/process/diffusion.py +0 -0
  204. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/process/implant_tables.py +0 -0
  205. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/process/pysrim.py +0 -0
  206. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/process/silicon.py +0 -0
  207. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/process/skew/antimony_si_skew.csv +0 -0
  208. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/process/skew/arsenic_si_skew.csv +0 -0
  209. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/process/skew/boron_si_skew.csv +0 -0
  210. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/process/skew/phosphorus_si_skew.csv +0 -0
  211. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/sax/__init__.py +0 -0
  212. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/sax/build_model.py +0 -0
  213. {gplugins-1.2.4/gplugins/process → gplugins-1.3.0/gplugins/sax/integrations}/__init__.py +0 -0
  214. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/sax/integrations/femwell_waveguide_model.py +0 -0
  215. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/sax/integrations/meep_FDTD_model.py +0 -0
  216. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/sax/integrations/meow_eme_model.py +0 -0
  217. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/sax/interpolators.py +0 -0
  218. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/sax/mlp.py +0 -0
  219. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/sax/plot_model.py +0 -0
  220. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/sax/read.py +0 -0
  221. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/sax/tests/test_mzi.py +0 -0
  222. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/sax/tests/test_mzi_lattice/test_mzi_lattice.obtained.yml +0 -0
  223. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/sax/tests/test_mzi_lattice/test_mzi_lattice.yml +0 -0
  224. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/sax/tests/test_mzi_lattice.py +0 -0
  225. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/sax/tests/test_parameters.py +0 -0
  226. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/sentaurus/mask_sde.py +0 -0
  227. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/sentaurus/mask_sprocess.py +0 -0
  228. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/sentaurus/sde.py +0 -0
  229. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/sentaurus/sdevice.py +0 -0
  230. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/sentaurus/svisual.py +0 -0
  231. {gplugins-1.2.4/gplugins/sax/integrations → gplugins-1.3.0/gplugins/spice}/__init__.py +0 -0
  232. {gplugins-1.2.4/gplugins/spice → gplugins-1.3.0/gplugins/spice/tests}/__init__.py +0 -0
  233. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/spice/tests/test_interconnect.py +0 -0
  234. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/tidy3d/__init__.py +0 -0
  235. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/tidy3d/get_results.py +0 -0
  236. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/tidy3d/get_simulation_grating_coupler.py +0 -0
  237. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/tidy3d/materials.py +0 -0
  238. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/tidy3d/tests/test_component_modeler.py +0 -0
  239. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/tidy3d/tests/test_materials.py +0 -0
  240. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/tidy3d/tests/test_modes/test_sweep_width.csv +0 -0
  241. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/tidy3d/tests/test_modes/test_sweep_width.obtained.csv +0 -0
  242. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/tidy3d/tests/test_modes_coupler.py +0 -0
  243. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/tidy3d/tests/test_modes_waveguide.py +0 -0
  244. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/tidy3d/tests/test_plot_simulation_grating_coupler.py +0 -0
  245. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/tidy3d/tests/tests_sparameters/sim_ref.yaml +0 -0
  246. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/tidy3d/tests/tests_sparameters/test_write_sparameters.py +0 -0
  247. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/tidy3d/tests/tests_sparameters/test_write_sparameters_grating_coupler.py +0 -0
  248. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/tidy3d/util.py +0 -0
  249. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/tidy3d/write_sparameters_grating_coupler.py +0 -0
  250. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/vlsir/__init__.py +0 -0
  251. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/vlsir/export_netlist.py +0 -0
  252. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/vlsir/tests/resources/pads_correct.cir +0 -0
  253. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/vlsir/tests/resources/pads_correct.scs +0 -0
  254. {gplugins-1.2.4 → gplugins-1.3.0}/gplugins/vlsir/tests/resources/pads_correct.sp +0 -0
@@ -1,28 +1,26 @@
1
- Metadata-Version: 2.3
1
+ Metadata-Version: 2.4
2
2
  Name: gplugins
3
- Version: 1.2.4
3
+ Version: 1.3.0
4
4
  Summary: gdsfactory plugins
5
5
  Keywords: python
6
6
  Author-email: gdsfactory <contact@gdsfactory.com>
7
- Requires-Python: >=3.10
7
+ Requires-Python: >=3.11
8
8
  Description-Content-Type: text/markdown
9
9
  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.5.3
13
+ License-File: LICENSE
14
+ Requires-Dist: gdsfactory>=9.0.0
14
15
  Requires-Dist: pint
15
16
  Requires-Dist: gdstk
16
17
  Requires-Dist: tqdm
17
18
  Requires-Dist: numpy
18
- Requires-Dist: dagster ; extra == "dagster"
19
- Requires-Dist: dagit ; extra == "dagster"
20
19
  Requires-Dist: pre-commit ; extra == "dev"
21
20
  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: ray ; extra == "dev"
26
24
  Requires-Dist: autograd ; extra == "dev"
27
25
  Requires-Dist: devsim ; extra == "devsim"
28
26
  Requires-Dist: pyvista<=0.43.8 ; extra == "devsim"
@@ -58,14 +56,16 @@ Requires-Dist: towncrier ; extra == "maintainer"
58
56
  Requires-Dist: jax>=0.4.26 ; extra == "meow"
59
57
  Requires-Dist: jaxlib>=0.4.26 ; extra == "meow"
60
58
  Requires-Dist: flax>=0.8.2 ; extra == "meow"
61
- Requires-Dist: meow-sim~=0.11.0 ; extra == "meow"
59
+ Requires-Dist: meow-sim>=0.11,<0.13 ; extra == "meow"
62
60
  Requires-Dist: tidy3d>=2.7.8,<2.8 ; extra == "meow"
61
+ Requires-Dist: scipy<=1.14.1 ; extra == "meow"
63
62
  Requires-Dist: jax>=0.4.26 ; extra == "sax"
64
63
  Requires-Dist: jaxlib>=0.4.26 ; extra == "sax"
65
64
  Requires-Dist: flax>=0.8.2 ; extra == "sax"
66
65
  Requires-Dist: sax>=0.13.1,<0.15.0 ; extra == "sax"
67
66
  Requires-Dist: scikit-learn ; extra == "sax"
68
67
  Requires-Dist: pyvis<=0.3.1 ; extra == "sax"
68
+ Requires-Dist: ray ; extra == "sax"
69
69
  Requires-Dist: bokeh ; extra == "schematic"
70
70
  Requires-Dist: ipywidgets ; extra == "schematic"
71
71
  Requires-Dist: natsort ; extra == "schematic"
@@ -75,7 +75,6 @@ Requires-Dist: numpy ; extra == "tidy3d"
75
75
  Requires-Dist: meshwell~=1.0.7 ; extra == "tidy3d"
76
76
  Requires-Dist: vlsir ; extra == "vlsir"
77
77
  Requires-Dist: vlsirtools ; extra == "vlsir"
78
- Provides-Extra: dagster
79
78
  Provides-Extra: dev
80
79
  Provides-Extra: devsim
81
80
  Provides-Extra: docs
@@ -91,7 +90,7 @@ Provides-Extra: schematic
91
90
  Provides-Extra: tidy3d
92
91
  Provides-Extra: vlsir
93
92
 
94
- # gplugins 1.2.4
93
+ # gplugins 1.3.0
95
94
 
96
95
  [![docs](https://github.com/gdsfactory/gplugins/actions/workflows/pages.yml/badge.svg)](https://gdsfactory.github.io/gplugins/)
97
96
  [![PyPI](https://img.shields.io/pypi/v/gplugins)](https://pypi.org/project/gplugins/)
@@ -1,4 +1,4 @@
1
- # gplugins 1.2.4
1
+ # gplugins 1.3.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.2.4"
3
+ __version__ = "1.3.0"
4
4
 
5
5
  import pathlib
6
6
 
@@ -108,8 +108,8 @@ class LayeredComponentBase(BaseModel):
108
108
  def ports(self) -> tuple[gf.Port, ...]:
109
109
  p = tuple(
110
110
  p.copy_polar(
111
- p.kcl.to_dbu(self.extend_ports + self.pad_xy_inner - self.port_offset),
112
- angle=p.angle,
111
+ self.extend_ports + self.pad_xy_inner - self.port_offset,
112
+ orientation=p.orientation,
113
113
  )
114
114
  for p in self.component.ports
115
115
  )
@@ -91,9 +91,9 @@ def add_simulation_markers(
91
91
  port_source_name = port_source.name
92
92
  warnings.warn(f"Selecting port_source_name={port_source_name!r} instead.")
93
93
 
94
- assert isinstance(
95
- component, Component
96
- ), f"component needs to be a gf.Component, got Type {type(component)}"
94
+ assert isinstance(component, Component), (
95
+ f"component needs to be a gf.Component, got Type {type(component)}"
96
+ )
97
97
 
98
98
  # Add port monitors
99
99
  for port_name in port_names:
@@ -105,7 +105,9 @@ def add_simulation_markers(
105
105
 
106
106
  # Add source
107
107
  port = ref.ports[port_source_name]
108
- port = port.copy_polar(d=port_source_offset / c.kcl.dbu, angle=port.angle)
108
+ port = port.copy_polar(
109
+ d=port_source_offset / c.kcl.dbu, orientation=port.orientation
110
+ )
109
111
  add_pin_rectangle(c, port=port, port_margin=port_margin, layer=layer_source)
110
112
 
111
113
  layer_stack.layers["source"] = LayerLevel(
@@ -46,9 +46,9 @@ def pandas_to_numpy(df: pd.DataFrame, port_map=None) -> np.ndarray:
46
46
  if port_map is None:
47
47
  port_map = {f"o{i}@0": i for i in idxs}
48
48
  rev_port_map = {i: p for p, i in port_map.items()}
49
- assert len(rev_port_map) == len(
50
- port_map
51
- ), "Duplicate port indices found in port_map"
49
+ assert len(rev_port_map) == len(port_map), (
50
+ "Duplicate port indices found in port_map"
51
+ )
52
52
 
53
53
  s_map = {
54
54
  s: tuple(rev_port_map[i] for i in _s_header_to_port_idxs(s)) for s in s_headers
@@ -21,9 +21,9 @@ def test_component_with_new_port_layers() -> None:
21
21
  layernames_after = set(layer_stack.layers.keys())
22
22
 
23
23
  # Check we have two new layers in the LayerStack
24
- assert (
25
- len(layernames_after - layernames_before) == 2
26
- ), "Two new layers should be added to the LayerStack"
24
+ assert len(layernames_after - layernames_before) == 2, (
25
+ "Two new layers should be added to the LayerStack"
26
+ )
27
27
 
28
28
  # Check we have one new layer in Component (all metal3 is removed by these operations)
29
29
  # assert len(new_component.get_layers()) == len(original_component.get_layers()) + 1
@@ -306,7 +306,7 @@ class PINWaveguide(BaseModel):
306
306
  device,
307
307
  "slab",
308
308
  "Acceptors",
309
- f"{self.p_conc:1.3e}*step({-1*self.p_offset / cm:1.3e}-x) + {self.ppp_conc:1.3e}*step({self.xppp / cm:1.3e}-x)",
309
+ f"{self.p_conc:1.3e}*step({-1 * self.p_offset / cm:1.3e}-x) + {self.ppp_conc:1.3e}*step({self.xppp / cm:1.3e}-x)",
310
310
  )
311
311
  model_create.CreateNodeModel(
312
312
  device,
@@ -319,7 +319,7 @@ class PINWaveguide(BaseModel):
319
319
  device,
320
320
  "core",
321
321
  "Acceptors",
322
- f"{self.p_conc:1.1e}*step({-1*self.p_offset / cm:1.6e}-x)",
322
+ f"{self.p_conc:1.1e}*step({-1 * self.p_offset / cm:1.6e}-x)",
323
323
  )
324
324
  model_create.CreateNodeModel(
325
325
  device,
@@ -153,7 +153,7 @@ def _read_elmer_results(
153
153
  field_file_location=simulation_folder
154
154
  / raw_name
155
155
  / "results"
156
- / f'{raw_name}_t0001.{"pvtu" if n_processes > 1 else "vtu"}',
156
+ / f"{raw_name}_t0001.{'pvtu' if n_processes > 1 else 'vtu'}",
157
157
  )
158
158
  ),
159
159
  )
@@ -98,9 +98,9 @@ def get_sparameters_fdtdz(
98
98
 
99
99
  optical_port_names = list(component_ref.get_ports_dict(port_type="optical").keys())
100
100
 
101
- assert isinstance(
102
- component, Component
103
- ), f"component needs to be a gf.Component, got Type {type(component)}"
101
+ assert isinstance(component, Component), (
102
+ f"component needs to be a gf.Component, got Type {type(component)}"
103
+ )
104
104
 
105
105
  component_extended = (
106
106
  gf.components.extension.extend_ports(
@@ -1,4 +1,5 @@
1
1
  import time
2
+ from typing import Any
2
3
 
3
4
  import gdsfactory as gf
4
5
  import numpy as np
@@ -34,20 +35,21 @@ def compute_cross_section_modes(
34
35
  order: int = 1,
35
36
  radius: float = np.inf,
36
37
  wafer_padding: float = 2.0,
37
- **kwargs,
38
+ **kwargs: Any,
38
39
  ) -> Modes:
39
40
  """Calculate effective index of a cross-section.
40
41
 
41
42
  Defines a "straight" component of the cross_section, and calls compute_component_slice_modes.
42
43
 
43
44
  Args:
44
- cross_section:
45
- layer_stack:
45
+ cross_section: gdsfactory cross_section.
46
+ layer_stack: gdsfactory layer_stack.
46
47
  wavelength: in um.
47
48
  num_modes: to compute.
48
49
  order: order of the mesh elements. 1: linear, 2: quadratic.
49
50
  radius: defaults to inf.
50
51
  wafer_padding: in um.
52
+ kwargs: kwargs for compute_component_slice_modes
51
53
 
52
54
  Keyword Args:
53
55
  solver: can be slepc or scipy.
@@ -108,7 +110,7 @@ def compute_component_slice_modes(
108
110
  n_guess: float | None = None,
109
111
  solver: str = "scipy",
110
112
  material_name_to_index: dict[str, float] | None = None,
111
- **kwargs,
113
+ **kwargs: Any,
112
114
  ) -> Modes:
113
115
  """Calculate effective index of component slice.
114
116
 
@@ -124,6 +126,8 @@ def compute_component_slice_modes(
124
126
  metallic_boundaries: if True, will set the boundaries to be metallic.
125
127
  n_guess: initial guess for the effective index.
126
128
  solver: can be slepc or scipy.
129
+ material_name_to_index: dictionary mapping material names to refractive indices.
130
+ kwargs: kwargs for get_mesh
127
131
 
128
132
  Keyword Args:
129
133
  resolutions (Dict): Pairs {"layername": {"resolution": float, "distance": "float}}
@@ -158,9 +158,9 @@ def get_simulation(
158
158
  port_source_name = port_source.name
159
159
  warnings.warn(f"Selecting port_source_name={port_source_name!r} instead.")
160
160
 
161
- assert isinstance(
162
- component, Component
163
- ), f"component needs to be a gf.Component, got Type {type(component)}"
161
+ assert isinstance(component, Component), (
162
+ f"component needs to be a gf.Component, got Type {type(component)}"
163
+ )
164
164
 
165
165
  component_extended = (
166
166
  gf.c.extend_ports(
@@ -88,7 +88,7 @@ def process_buffers(layer_polygons_dict: dict, layer_stack: LayerStack):
88
88
  )
89
89
  extended_layer_polygons_dict[f"{layername}_{poly_ind}_{z}"] = (
90
90
  f"{layername}",
91
- f"{layername}_{poly_ind}_{zs[z_ind+1]}",
91
+ f"{layername}_{poly_ind}_{zs[z_ind + 1]}",
92
92
  polygon.buffer(width_buffer),
93
93
  polygon.buffer(width_buffers[z_ind + 1]),
94
94
  )
@@ -30,14 +30,16 @@ def fuse_polygons(component, layer, round_tol=4, simplify_tol=1e-4, offset_tol=N
30
30
  # TODO: do all polygon processing in KLayout at the gplugins level for speed
31
31
  shapely_polygons = []
32
32
  for klayout_polygon in layer_region.each_merged():
33
- exterior_points = []
33
+ exterior_points = [
34
+ (point.x / 1000, point.y / 1000)
35
+ for point in klayout_polygon.each_point_hull()
36
+ ]
34
37
  interior_points = []
35
- for point in klayout_polygon.each_point_hull():
36
- exterior_points.append((point.x / 1000, point.y / 1000))
37
38
  for hole_index in range(klayout_polygon.holes()):
38
- holes_points = []
39
- for point in klayout_polygon.each_point_hole(hole_index):
40
- holes_points.append((point.x / 1000, point.y / 1000))
39
+ holes_points = [
40
+ (point.x / 1000, point.y / 1000)
41
+ for point in klayout_polygon.each_point_hole(hole_index)
42
+ ]
41
43
  interior_points.append(holes_points)
42
44
 
43
45
  shapely_polygons.append(
@@ -1,6 +1,7 @@
1
1
  from __future__ import annotations
2
2
 
3
3
  from collections import OrderedDict
4
+ from typing import Any
4
5
 
5
6
  import gdsfactory as gf
6
7
  import numpy as np
@@ -77,9 +78,9 @@ def xy_xsection_mesh(
77
78
  gmsh_version: float | None = None,
78
79
  interface_delimiter: str = "___",
79
80
  layer_port_delimiter: str | None = None,
80
- background_remeshing_file=None,
81
+ background_remeshing_file: str | None = None,
81
82
  optimization_flags: tuple[tuple[str, int]] | None = None,
82
- **kwargs,
83
+ **kwargs: Any,
83
84
  ):
84
85
  """Mesh xy cross-section of component at height z.
85
86
 
@@ -90,20 +91,25 @@ def xy_xsection_mesh(
90
91
  layer_physical_map: map layer names to physical names
91
92
  layer_meshbool_map: map layer names to mesh_bool (True: mesh the prisms, False: don't mesh)
92
93
  resolutions (Dict): Pairs {"layername": {"resolution": float, "distance": "float}} to roughly control mesh refinement
93
- mesh_scaling_factor (float): factor multiply mesh geometry by
94
- default_resolution_min (float): gmsh minimal edge length
95
- default_resolution_max (float): gmsh maximal edge length
94
+ default_characteristic_length: default characteristic length for the mesh
96
95
  background_tag (str): name of the background layer to add (default: no background added)
97
96
  background_padding (Tuple): [xleft, ydown, xright, yup] distances to add to the components and to fill with background_tag
98
97
  background_mesh_order (int, float): mesh order to assign to the background
98
+ global_scaling: scaling factor for the mesh
99
+ global_scaling_premesh: scaling factor for the mesh before meshing
100
+ global_2D_algorithm: gmsh 2D algorithm to use
99
101
  filename (str, path): where to save the .msh file
100
- global_meshsize_array: np array [x,y,z,lc] to parametrize the mesh
101
- global_meshsize_interpolant_func: interpolating function for global_meshsize_array
102
- extra_shapes_dict: Optional[OrderedDict] = OrderedDict of {key: geo} with key a label and geo a shapely (Multi)Polygon or (Multi)LineString of extra shapes to override component
102
+ verbosity: verbosity level for gmsh
103
103
  round_tol: during gds --> mesh conversion cleanup, number of decimal points at which to round the gdsfactory/shapely points before introducing to gmsh
104
104
  simplify_tol: during gds --> mesh conversion cleanup, shapely "simplify" tolerance (make it so all points are at least separated by this amount)
105
- atol: tolerance used to establish equivalency between vertices
105
+ n_threads: number of threads to use for mesh generation
106
+ port_names: list of port names to mesh
107
+ gmsh_version: gmsh version to use
108
+ interface_delimiter: delimiter to use for new layers generated for interfaces: "layer{interface_delimiter}interface_name".
106
109
  layer_port_delimiter: Delimiter to use for new layers generated for ports: "layer{delimiter}port_name".
110
+ background_remeshing_file: filename to load background remeshing from.
111
+ optimization_flags: flags for Model.mesh
112
+ kwargs: kwargs for Model.mesh
107
113
  """
108
114
  if port_names:
109
115
  mesh_component = gf.Component()
@@ -1,4 +1,5 @@
1
1
  import uuid
2
+ from typing import Any
2
3
 
3
4
  import gdsfactory as gf
4
5
  import kfactory as kf
@@ -46,6 +47,7 @@ class Region(kdb.Region):
46
47
  return size(self, -offset)
47
48
 
48
49
  def __add__(self, element) -> kdb.Region:
50
+ """Adds an element to the region."""
49
51
  if isinstance(element, float | int):
50
52
  return size(self, element)
51
53
 
@@ -54,7 +56,8 @@ class Region(kdb.Region):
54
56
  else:
55
57
  raise ValueError(f"Cannot add type {type(element)} to region")
56
58
 
57
- def __sub__(self, element) -> kdb.Region | None:
59
+ def __sub__(self, element: float | int | kdb.Region) -> kdb.Region | None:
60
+ """Subtracts an element from the region."""
58
61
  if isinstance(element, float | int):
59
62
  return size(self, -element)
60
63
 
@@ -86,15 +89,17 @@ class RegionCollection:
86
89
 
87
90
  """
88
91
 
89
- def __init__(self, gdspath, cell_name: str | None = None) -> None:
90
- lib = kf.kcell.KCLayout(str(gdspath))
92
+ def __init__(self, gdspath: PathType, cell_name: str | None = None) -> None:
93
+ """Initializes the RegionCollection."""
94
+ lib = kf.KCLayout(str(gdspath))
91
95
  lib.read(filename=str(gdspath))
92
96
  self.layout = lib.cell_by_name(cell_name) if cell_name else lib.top_cell()
93
97
  self.lib = lib
94
- self.regions = {}
98
+ self.regions: dict[tuple[int, int], Region] = {}
95
99
  self.cell = lib[lib.top_cell().cell_index()]
96
100
 
97
101
  def __getitem__(self, layer: tuple[int, int]) -> Region:
102
+ """Gets a layer from the collection."""
98
103
  _assert_is_layer(layer)
99
104
 
100
105
  if layer in self.regions:
@@ -107,11 +112,12 @@ class RegionCollection:
107
112
  return region
108
113
 
109
114
  def __setitem__(self, layer: tuple[int, int], region: Region) -> None:
115
+ """Sets a layer in the collection."""
110
116
  _assert_is_layer(layer)
111
117
  self.regions[layer] = region
112
118
 
113
- def __contains__(self, item) -> bool:
114
- # checks if the layout contains the given layer
119
+ def __contains__(self, item: tuple[int, int]) -> bool:
120
+ """Checks if the layout contains the given layer."""
115
121
  _assert_is_layer(item)
116
122
  layer, datatype = item
117
123
  return self.lib.find_layer(layer, datatype) is not None
@@ -157,7 +163,7 @@ class RegionCollection:
157
163
  uid = str(uuid.uuid4())[:8]
158
164
  cellname += f"_{uid}"
159
165
 
160
- output_lib = kf.kcell.KCLayout("output")
166
+ output_lib = kf.KCLayout("output")
161
167
  c = kf.KCell(cellname, output_lib)
162
168
  if keep_original:
163
169
  c.copy_tree(self.layout)
@@ -169,11 +175,12 @@ class RegionCollection:
169
175
  c.shapes(output_lib.layer(layer[0], layer[1])).insert(region)
170
176
  return c
171
177
 
172
- def show(self, gdspath: PathType = GDSDIR_TEMP / "out.gds", **kwargs) -> None:
178
+ def show(self, gdspath: PathType = GDSDIR_TEMP / "out.gds", **kwargs: Any) -> None:
173
179
  """Show gds in klayout.
174
180
 
175
181
  Args:
176
182
  gdspath: gdspath.
183
+ kwargs: keyword arguments.
177
184
 
178
185
  Keyword Args:
179
186
  keep_original: keep original cell.
@@ -183,6 +190,7 @@ class RegionCollection:
183
190
  gf.show(gdspath)
184
191
 
185
192
  def __delattr__(self, element) -> None:
193
+ """Deletes a layer from the collection."""
186
194
  setattr(self, element, Region())
187
195
 
188
196
 
@@ -18,8 +18,7 @@ def check_exclusion(
18
18
  min_projection: None = None,
19
19
  max_projection: None = None,
20
20
  ) -> int:
21
- """Reads layer from top cell and returns a the area that violates min \
22
- exclusion if 0 no area violates exclusion.
21
+ """Reads layer from top cell and returns a the area that violates min exclusion if 0 no area violates exclusion.
23
22
 
24
23
  Args:
25
24
  gdspath: path to GDS.
@@ -38,7 +37,7 @@ def check_exclusion(
38
37
  gdspath = gf.import_gds(gdspath)
39
38
 
40
39
  layout = gdspath.kcl
41
- cell = gdspath._kdb_cell
40
+ cell = gdspath.kdb_cell
42
41
  a = pya.Region(cell.begin_shapes_rec(layout.layer(layer1[0], layer1[1])))
43
42
  b = pya.Region(cell.begin_shapes_rec(layout.layer(layer2[0], layer2[1])))
44
43
 
@@ -18,8 +18,7 @@ def check_inclusion(
18
18
  min_projection: None = None,
19
19
  max_projection: None = None,
20
20
  ) -> int:
21
- """Reads layer from top cell and returns a the area that violates min \
22
- inclusion if 0 no area violates exclusion.
21
+ """Reads layer from top cell and returns a the area that violates min inclusion if 0 no area violates exclusion.
23
22
 
24
23
  Args:
25
24
  gdspath: path to GDS.
@@ -38,7 +37,7 @@ def check_inclusion(
38
37
  gdspath = gf.import_gds(gdspath)
39
38
 
40
39
  layout = gdspath.kcl
41
- cell = gdspath._kdb_cell
40
+ cell = gdspath.kdb_cell
42
41
  a = pya.Region(cell.begin_shapes_rec(layout.layer(layer_in[0], layer_in[1])))
43
42
  b = pya.Region(cell.begin_shapes_rec(layout.layer(layer_out[0], layer_out[1])))
44
43
 
@@ -51,7 +51,7 @@ def check_space(
51
51
  gdspath = gf.import_gds(gdspath)
52
52
 
53
53
  layout = gdspath.kcl
54
- cell = gdspath._kdb_cell
54
+ cell = gdspath.kdb_cell
55
55
  region = pya.Region(cell.begin_shapes_rec(layout.layer(layer[0], layer[1])))
56
56
 
57
57
  valid_metrics = ["Square", "Euclidean"]
@@ -25,7 +25,7 @@ def check_width(
25
25
  gdspath = gf.import_gds(gdspath)
26
26
 
27
27
  layout = gdspath.kcl
28
- cell = gdspath._kdb_cell
28
+ cell = gdspath.kdb_cell
29
29
  region = pya.Region(cell.begin_shapes_rec(layout.layer(layer[0], layer[1])))
30
30
  # print(region)
31
31
  # print(min_width*1e3)
@@ -46,8 +46,7 @@ def separation(
46
46
  def enclosing(
47
47
  enclosing: float = 0.1, layer1: Layer = (40, 0), layer2: Layer = (41, 0)
48
48
  ) -> Component:
49
- """Layer1 must be enclosed by layer2 by value.
50
- checks if layer1 encloses (is bigger than) layer2 by value.
49
+ """Layer1 must be enclosed by layer2 by value, checks if layer1 encloses (is bigger than) layer2 by value.
51
50
 
52
51
  Args:
53
52
  enclosing: value to enclose layer1 by layer2.
@@ -121,7 +121,7 @@ def check_not_inside(
121
121
  """
122
122
  if size is None:
123
123
  error = f"{layer} not inside {not_inside}"
124
- return f"{layer}.not_inside({not_inside})" f".output({error!r}, {error!r})"
124
+ return f"{layer}.not_inside({not_inside}).output({error!r}, {error!r})"
125
125
  else:
126
126
  error = f"{layer} sized by {size} not inside {not_inside}"
127
127
  script = f"{layer}_sized = {layer}.size({size})\n "