gplugins 1.1.2__tar.gz → 1.1.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (253) hide show
  1. {gplugins-1.1.2 → gplugins-1.1.4}/PKG-INFO +10 -6
  2. {gplugins-1.1.2 → gplugins-1.1.4}/README.md +2 -2
  3. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/__init__.py +2 -2
  4. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/common/base_models/component.py +1 -0
  5. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/common/utils/async_helpers.py +7 -4
  6. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/common/utils/disable_print.py +1 -1
  7. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/common/utils/get_component_with_local_layers.py +4 -3
  8. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/common/utils/get_component_with_net_layers.py +24 -16
  9. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/common/utils/optical_constants.py +1 -1
  10. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/common/utils/plot.py +1 -1
  11. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/common/utils/tests/test_get_component_with_new_port_layers.py +2 -2
  12. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/elmer/get_capacitance.py +3 -4
  13. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/elmer/tests/test_elmer.py +2 -2
  14. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/fdtdz/get_epsilon_fdtdz.py +3 -3
  15. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/fdtdz/get_ports_fdtdz.py +1 -4
  16. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/fdtdz/get_sparameters_fdtdz.py +0 -1
  17. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/gfviz/netlist.py +1 -1
  18. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/gmeep/get_meep_geometry.py +3 -0
  19. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/gmeep/get_simulation.py +1 -1
  20. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/gmeep/meep_adjoint_optimization.py +1 -1
  21. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/gmeep/test_eigenmode.py +5 -5
  22. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/gmeep/test_materials.py +0 -2
  23. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/gmeep/write_sparameters_meep.py +1 -1
  24. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/gmeep/write_sparameters_meep_batch.py +2 -2
  25. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/gmeep/write_sparameters_meep_mpi.py +1 -1
  26. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/gmsh/get_mesh.py +0 -1
  27. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/gmsh/parse_gds.py +1 -2
  28. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/gmsh/uz_xsection_mesh.py +28 -19
  29. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/gmsh/xyz_mesh.py +24 -20
  30. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/klayout/dataprep/regions.py +1 -1
  31. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/klayout/drc/check_duplicated_cells.py +0 -1
  32. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/klayout/drc/check_exclusion.py +0 -1
  33. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/klayout/drc/check_inclusion.py +0 -1
  34. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/klayout/drc/check_space.py +0 -1
  35. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/klayout/drc/count_drc.py +0 -1
  36. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/klayout/drc/samples/drc_errors.py +1 -1
  37. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/klayout/get_density.py +10 -18
  38. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/klayout/netlist_graph.py +1 -0
  39. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/klayout/plot_nets.py +0 -1
  40. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/klayout/tests/test_density.py +1 -1
  41. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/klayout/tests/test_global_density.py +1 -1
  42. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/klayout/tests/test_plot_nets.py +2 -2
  43. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/lumerical/tests/test_netlist.py +3 -3
  44. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/lumerical/tests/test_netlist_get_routes.py +1 -1
  45. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/lumerical/write_sparameters_lumerical.py +11 -13
  46. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/lumerical/write_sparameters_lumerical_components.py +3 -5
  47. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/materials/optical/optical_mat.py +2 -2
  48. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/materials/optical/refractive_index_info.py +5 -5
  49. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/materials/semiconductor/semiconductor_mat.py +1 -1
  50. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/meow/meow_eme.py +2 -2
  51. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/modes/find_coupling_vs_gap.py +1 -1
  52. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/palace/get_capacitance.py +1 -2
  53. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/palace/get_scattering.py +0 -2
  54. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/path_length_analysis/path_length_analysis.py +7 -13
  55. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/path_length_analysis/path_length_analysis_from_gds.py +40 -28
  56. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/process/diffusion.py +3 -7
  57. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/process/implant_tables.py +3 -7
  58. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/process/pysrim.py +1 -1
  59. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/process/silicon.py +2 -2
  60. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/sax/build_model.py +1 -1
  61. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/sax/models.py +1 -2
  62. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/sax/tests/test_mzi_lattice.py +1 -1
  63. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/sentaurus/mask_sde.py +2 -3
  64. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/sentaurus/mask_sprocess.py +14 -15
  65. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/sentaurus/sde.py +5 -8
  66. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/sentaurus/sdevice.py +15 -16
  67. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/sentaurus/sprocess.py +49 -41
  68. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/sentaurus/svisual.py +9 -10
  69. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/spice/spice_to_yaml.py +17 -31
  70. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/spice/tests/test_interconnect.py +1 -1
  71. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/tidy3d/component.py +9 -18
  72. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/tidy3d/get_results.py +3 -3
  73. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/tidy3d/get_simulation_grating_coupler.py +1 -1
  74. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/tidy3d/modes.py +1 -1
  75. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/tidy3d/tests/test_component_modeler.py +1 -1
  76. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/tidy3d/util.py +3 -6
  77. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/tidy3d/write_sparameters_grating_coupler.py +4 -5
  78. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/vlsir/export_netlist.py +8 -8
  79. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/vlsir/tests/test_vlsir.py +2 -4
  80. {gplugins-1.1.2 → gplugins-1.1.4}/pyproject.toml +42 -21
  81. {gplugins-1.1.2 → gplugins-1.1.4}/LICENSE +0 -0
  82. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/common/__init__.py +0 -0
  83. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/common/base_models/__init__.py +0 -0
  84. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/common/base_models/simulation.py +0 -0
  85. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/common/config.py +0 -0
  86. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/common/types.py +0 -0
  87. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/common/utils/__init__.py +0 -0
  88. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/common/utils/add_simulation_markers.py +0 -0
  89. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/common/utils/cache.py +0 -0
  90. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/common/utils/convert_sparameters.py +0 -0
  91. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/common/utils/get_capacitance.py +0 -0
  92. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/common/utils/get_effective_indices.py +0 -0
  93. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/common/utils/get_scattering.py +0 -0
  94. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/common/utils/get_sparameters_path.py +0 -0
  95. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/common/utils/parse_layer_stack.py +0 -0
  96. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/common/utils/plot_csv.py +0 -0
  97. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/common/utils/port_symmetries.py +0 -0
  98. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/dagster/Makefile +0 -0
  99. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/dagster/__init__.py +0 -0
  100. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/dagster/workflow.py +0 -0
  101. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/devsim/__init__.py +0 -0
  102. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/devsim/doping.py +0 -0
  103. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/devsim/get_simulation.py +0 -0
  104. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/devsim/get_simulation_xsection.py +0 -0
  105. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/devsim/get_solver.py +0 -0
  106. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/devsim/test_devsim.py +0 -0
  107. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/elmer/__init__.py +0 -0
  108. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/elmer/electrostatic.sif.j2 +0 -0
  109. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/fdtdz/__init__.py +0 -0
  110. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/femwell/__init__.py +0 -0
  111. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/femwell/mode_solver.py +0 -0
  112. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/femwell/solve_thermal.py +0 -0
  113. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/femwell/test_mode_solver.py +0 -0
  114. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/gfviz/Makefile +0 -0
  115. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/gfviz/__init__.py +0 -0
  116. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/gfviz/b64.py +0 -0
  117. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/gfviz/gfviz.py +0 -0
  118. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/gfviz/serve.py +0 -0
  119. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/gfviz/static/b64.js +0 -0
  120. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/gfviz/static/schemedit.js +0 -0
  121. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/gfviz/static/schemedit.wasm +0 -0
  122. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/gfviz/templates/example.json +0 -0
  123. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/gfviz/templates/index.html +0 -0
  124. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/gmeep/__init__.py +0 -0
  125. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/gmeep/get_material.py +0 -0
  126. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/gmeep/get_port_eigenmode.py +0 -0
  127. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/gmeep/get_simulation_grating_farfield.py +0 -0
  128. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/gmeep/get_simulation_grating_fiber.py +0 -0
  129. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/gmeep/test_sparameterNxN/test_sparameterNxN_crossing.csv +0 -0
  130. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/gmeep/test_sparameterNxN/test_sparameterNxN_straight.csv +0 -0
  131. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/gmeep/test_write_sparameters_meep/test_sparameterNxN_crossing.csv +0 -0
  132. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/gmeep/test_write_sparameters_meep/test_sparameterNxN_straight.csv +0 -0
  133. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/gmeep/test_write_sparameters_meep/test_sparameterNxN_symmetries_straight.csv +0 -0
  134. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/gmeep/test_write_sparameters_meep/test_sparameter_straight_mpi.csv +0 -0
  135. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/gmeep/test_write_sparameters_meep/test_sparameter_straight_mpi_pool.csv +0 -0
  136. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/gmeep/test_write_sparameters_meep/test_sparameters_crossing_symmetric.csv +0 -0
  137. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/gmeep/test_write_sparameters_meep/test_sparameters_straight.csv +0 -0
  138. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/gmeep/test_write_sparameters_meep/test_sparameters_straight_batch.csv +0 -0
  139. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/gmeep/test_write_sparameters_meep/test_sparameters_straight_mpi.csv +0 -0
  140. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/gmeep/test_write_sparameters_meep/test_sparameters_straight_mpi_pool.csv +0 -0
  141. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/gmeep/test_write_sparameters_meep/test_sparameters_straight_symmetric.csv +0 -0
  142. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/gmeep/test_write_sparameters_meep.py +0 -0
  143. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/gmeep/write_sparameters_grating.py +0 -0
  144. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/gmsh/__init__.py +0 -0
  145. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/gmsh/define_polysurfaces.py +0 -0
  146. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/gmsh/parse_component.py +0 -0
  147. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/gmsh/tests/test_custom_names.py +0 -0
  148. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/gmsh/tests/test_meshing_2D.py +0 -0
  149. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/gmsh/tests/test_meshing_3D.py +0 -0
  150. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/gmsh/xy_xsection_mesh.py +0 -0
  151. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/klayout/__init__.py +0 -0
  152. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/klayout/dataprep/__init__.py +0 -0
  153. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/klayout/drc/__init__.py +0 -0
  154. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/klayout/drc/check_width.py +0 -0
  155. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/klayout/drc/write_drc.py +0 -0
  156. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/klayout/get_netlist.py +0 -0
  157. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/klayout/netlist_spice_reader.py +0 -0
  158. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/klayout/tests/test_dataprep_regions.py +0 -0
  159. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/klayout/tests/test_drc_exclusion.py +0 -0
  160. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/klayout/tests/test_drc_inclusion.py +0 -0
  161. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/klayout/tests/test_drc_space.py +0 -0
  162. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/klayout/tests/test_drc_width.py +0 -0
  163. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/klayout/tests/test_netlist_spice_reader.py +0 -0
  164. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/lumerical/README.md +0 -0
  165. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/lumerical/__init__.py +0 -0
  166. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/lumerical/interconnect.py +0 -0
  167. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/lumerical/mapping_ubcpdk.yml +0 -0
  168. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/lumerical/read.py +0 -0
  169. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/lumerical/settings.py +0 -0
  170. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/lumerical/tests/test_lumerical_read_sparameters.py +0 -0
  171. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/materials/__init__.py +0 -0
  172. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/materials/inorganic.py +0 -0
  173. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/materials/optical/__init__.py +0 -0
  174. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/materials/semiconductor/__init__.py +0 -0
  175. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/meow/__init__.py +0 -0
  176. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/meow/test_meow_simulation.py +0 -0
  177. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/modes/__init__.py +0 -0
  178. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/modes/coupler.py +0 -0
  179. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/modes/find_mode_dispersion.py +0 -0
  180. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/modes/find_modes.py +0 -0
  181. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/modes/find_modes_cross_section.py +0 -0
  182. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/modes/find_neff_ng_dw_dh.py +0 -0
  183. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/modes/find_neff_vs_width.py +0 -0
  184. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/modes/get_mode_solver_coupler.py +0 -0
  185. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/modes/get_mode_solver_cross_section.py +0 -0
  186. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/modes/get_mode_solver_rib.py +0 -0
  187. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/modes/modes/neff_vs_width_nitride.csv +0 -0
  188. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/modes/modes/neff_vs_width_rib.csv +0 -0
  189. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/modes/modes/neff_vs_width_strip.csv +0 -0
  190. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/modes/neff_convergence_test.py +0 -0
  191. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/modes/neff_vs_width.csv +0 -0
  192. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/modes/overlap.py +0 -0
  193. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/modes/tests/test_dw_dh/test_dw_dh.csv +0 -0
  194. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/modes/tests/test_dw_dh/test_dw_dh.obtained.csv +0 -0
  195. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/modes/tests/test_dw_dh/test_dw_dh_dispersion.csv +0 -0
  196. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/modes/tests/test_dw_dh.py +0 -0
  197. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/modes/tests/test_find_modes.py +0 -0
  198. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/modes/tests/test_find_modes_dispersion.py +0 -0
  199. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/modes/tests/test_neff_vs_width/test_neff_vs_width.csv +0 -0
  200. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/modes/tests/test_neff_vs_width/test_neff_vs_width.obtained.csv +0 -0
  201. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/modes/tests/test_neff_vs_width.py +0 -0
  202. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/modes/types.py +0 -0
  203. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/modes/waveguide.py +0 -0
  204. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/palace/__init__.py +0 -0
  205. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/palace/driven.json +0 -0
  206. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/palace/electrostatic.json +0 -0
  207. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/palace/tests/test_palace.py +0 -0
  208. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/path_length_analysis/__init__.py +0 -0
  209. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/path_length_analysis/test_pathlength_extraction.py +0 -0
  210. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/photonic_circuit_models/__init__.py +0 -0
  211. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/photonic_circuit_models/coupler.py +0 -0
  212. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/photonic_circuit_models/fsr.py +0 -0
  213. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/photonic_circuit_models/heater.py +0 -0
  214. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/photonic_circuit_models/mzi.py +0 -0
  215. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/photonic_circuit_models/ring.py +0 -0
  216. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/process/__init__.py +0 -0
  217. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/process/skew/antimony_si_skew.csv +0 -0
  218. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/process/skew/arsenic_si_skew.csv +0 -0
  219. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/process/skew/boron_si_skew.csv +0 -0
  220. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/process/skew/phosphorus_si_skew.csv +0 -0
  221. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/sax/__init__.py +0 -0
  222. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/sax/integrations/__init__.py +0 -0
  223. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/sax/integrations/femwell_waveguide_model.py +0 -0
  224. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/sax/integrations/meep_FDTD_model.py +0 -0
  225. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/sax/integrations/meow_eme_model.py +0 -0
  226. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/sax/interpolators.py +0 -0
  227. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/sax/mlp.py +0 -0
  228. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/sax/parameter.py +0 -0
  229. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/sax/plot_model.py +0 -0
  230. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/sax/read.py +0 -0
  231. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/sax/tests/test_mzi.py +0 -0
  232. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/sax/tests/test_mzi_lattice/test_mzi_lattice.obtained.yml +0 -0
  233. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/sax/tests/test_mzi_lattice/test_mzi_lattice.yml +0 -0
  234. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/sax/tests/test_parameters.py +0 -0
  235. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/spice/__init__.py +0 -0
  236. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/spice/tests/__init__.py +0 -0
  237. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/tidy3d/__init__.py +0 -0
  238. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/tidy3d/materials.py +0 -0
  239. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/tidy3d/tests/test_materials.py +0 -0
  240. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/tidy3d/tests/test_modes/test_sweep_width.csv +0 -0
  241. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/tidy3d/tests/test_modes/test_sweep_width.obtained.csv +0 -0
  242. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/tidy3d/tests/test_modes_coupler.py +0 -0
  243. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/tidy3d/tests/test_modes_waveguide.py +0 -0
  244. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/tidy3d/tests/test_plot_simulation_grating_coupler.py +0 -0
  245. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/tidy3d/tests/test_write_sparameters.py +0 -0
  246. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/tidy3d/tests/tests_sparameters/sim_ref.yaml +0 -0
  247. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/tidy3d/tests/tests_sparameters/test_write_sparameters.py +0 -0
  248. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/tidy3d/tests/tests_sparameters/test_write_sparameters_grating_coupler.py +0 -0
  249. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/tidy3d/types.py +0 -0
  250. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/vlsir/__init__.py +0 -0
  251. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/vlsir/tests/resources/pads_correct.cir +0 -0
  252. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/vlsir/tests/resources/pads_correct.scs +0 -0
  253. {gplugins-1.1.2 → gplugins-1.1.4}/gplugins/vlsir/tests/resources/pads_correct.sp +0 -0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.3
2
2
  Name: gplugins
3
- Version: 1.1.2
3
+ Version: 1.1.4
4
4
  Summary: gdsfactory plugins
5
5
  Keywords: python
6
6
  Author-email: gdsfactory <contact@gdsfactory.com>
@@ -14,6 +14,7 @@ Requires-Dist: gdsfactory>=8.5.3
14
14
  Requires-Dist: pint
15
15
  Requires-Dist: gdstk
16
16
  Requires-Dist: tqdm
17
+ Requires-Dist: numpy<2
17
18
  Requires-Dist: dagster ; extra == "dagster"
18
19
  Requires-Dist: dagit ; extra == "dagster"
19
20
  Requires-Dist: pre-commit ; extra == "dev"
@@ -34,7 +35,7 @@ Requires-Dist: tidy3d>=2.5.2,<2.8 ; extra == "devsim"
34
35
  Requires-Dist: jupytext ; extra == "docs"
35
36
  Requires-Dist: matplotlib ; extra == "docs"
36
37
  Requires-Dist: jupyter-book~=1.0 ; extra == "docs"
37
- Requires-Dist: pyvista[all,trame]<=0.43.8 ; extra == "docs"
38
+ Requires-Dist: pyvista[all, trame]<=0.43.8 ; extra == "docs"
38
39
  Requires-Dist: femwell~=0.1.11 ; extra == "femwell"
39
40
  Requires-Dist: meshwell~=1.0.7 ; extra == "femwell"
40
41
  Requires-Dist: jinja2 ; extra == "gfviz"
@@ -52,6 +53,8 @@ Requires-Dist: shapely ; extra == "gmsh"
52
53
  Requires-Dist: meshwell~=1.0.7 ; extra == "gmsh"
53
54
  Requires-Dist: klayout ; extra == "klayout"
54
55
  Requires-Dist: pyvis<=0.3.1 ; extra == "klayout"
56
+ Requires-Dist: vlsir~=6.0 ; extra == "klayout"
57
+ Requires-Dist: vlsirtools~=6.0 ; extra == "klayout"
55
58
  Requires-Dist: jax>=0.4.26 ; extra == "meow"
56
59
  Requires-Dist: jaxlib>=0.4.26 ; extra == "meow"
57
60
  Requires-Dist: flax>=0.8.2 ; extra == "meow"
@@ -60,7 +63,7 @@ Requires-Dist: tidy3d>=2.5.2,<2.8 ; extra == "meow"
60
63
  Requires-Dist: jax>=0.4.26 ; extra == "sax"
61
64
  Requires-Dist: jaxlib>=0.4.26 ; extra == "sax"
62
65
  Requires-Dist: flax>=0.8.2 ; extra == "sax"
63
- Requires-Dist: sax~=0.13.1 ; extra == "sax"
66
+ Requires-Dist: sax>=0.13.1,<0.15.0 ; extra == "sax"
64
67
  Requires-Dist: scikit-learn ; extra == "sax"
65
68
  Requires-Dist: pyvis<=0.3.1 ; extra == "sax"
66
69
  Requires-Dist: bokeh ; extra == "schematic"
@@ -68,6 +71,7 @@ Requires-Dist: ipywidgets ; extra == "schematic"
68
71
  Requires-Dist: natsort ; extra == "schematic"
69
72
  Requires-Dist: tidy3d>=2.5.2,<2.8 ; extra == "tidy3d"
70
73
  Requires-Dist: meshio ; extra == "tidy3d"
74
+ Requires-Dist: numpy<2 ; extra == "tidy3d"
71
75
  Requires-Dist: meshwell~=1.0.7 ; extra == "tidy3d"
72
76
  Requires-Dist: vlsir~=6.0 ; extra == "vlsir"
73
77
  Requires-Dist: vlsirtools~=6.0 ; extra == "vlsir"
@@ -85,7 +89,7 @@ Provides-Extra: schematic
85
89
  Provides-Extra: tidy3d
86
90
  Provides-Extra: vlsir
87
91
 
88
- # gplugins 1.1.2
92
+ # gplugins 1.1.4
89
93
 
90
94
  [![docs](https://github.com/gdsfactory/gplugins/actions/workflows/pages.yml/badge.svg)](https://gdsfactory.github.io/gplugins/)
91
95
  [![PyPI](https://img.shields.io/pypi/v/gplugins)](https://pypi.org/project/gplugins/)
@@ -109,7 +113,7 @@ gdsfactory plugins:
109
113
  - `mpb` for MPB mode solver.
110
114
  - `elmer` for electrostatic (capacitive) simulations.
111
115
  - `palace` for full-wave driven (S parameter) and electrostatic (capacitive) simulations.
112
- - `vlsir` for parsing GDS-extracted circuit netlists into Spice, Spectre and Xyce Schematic File formats.
116
+ - `vlsir` for parsing GDS-extracted circuit netlists into Cadence Spectre, NgSpice and Xyce Schematic File formats.
113
117
 
114
118
  ## Installation
115
119
 
@@ -1,4 +1,4 @@
1
- # gplugins 1.1.2
1
+ # gplugins 1.1.4
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/)
@@ -22,7 +22,7 @@ gdsfactory plugins:
22
22
  - `mpb` for MPB mode solver.
23
23
  - `elmer` for electrostatic (capacitive) simulations.
24
24
  - `palace` for full-wave driven (S parameter) and electrostatic (capacitive) simulations.
25
- - `vlsir` for parsing GDS-extracted circuit netlists into Spice, Spectre and Xyce Schematic File formats.
25
+ - `vlsir` for parsing GDS-extracted circuit netlists into Cadence Spectre, NgSpice and Xyce Schematic File formats.
26
26
 
27
27
  ## Installation
28
28
 
@@ -1,6 +1,6 @@
1
- """gplugins - gdsfactory plugins"""
1
+ """gplugins - gdsfactory plugins."""
2
2
 
3
- __version__ = "1.1.2"
3
+ __version__ = "1.1.4"
4
4
 
5
5
  import pathlib
6
6
 
@@ -39,6 +39,7 @@ class LayeredComponentBase(BaseModel):
39
39
  slice_stack: tuple[int, int | None] = (0, None)
40
40
 
41
41
  def __hash__(self):
42
+ """Returns a hash of the model dump."""
42
43
  if not hasattr(self, "_hash"):
43
44
  dump = str.encode(self.model_dump_json())
44
45
  self._hash = int(md5(dump).hexdigest()[:15], 16)
@@ -48,7 +48,8 @@ async def execute_and_stream_output(
48
48
  stream_stderr: io.TextIOWrapper | None = sys.stderr,
49
49
  **kwargs,
50
50
  ) -> asyncio.subprocess.Process:
51
- """Run a command asynchronously and stream *stdout* and *stderr* to given IO and a log file
51
+ """Run a command asynchronously and stream *stdout* and *stderr* to given IO and a log file.
52
+
52
53
  in ``log_file_dir / log_file_str``. Uses ``shell=True`` as default unlike ``subprocess.Popen``. Returns an asyncio process.
53
54
 
54
55
  Args:
@@ -59,6 +60,8 @@ async def execute_and_stream_output(
59
60
  log_file_str: Log file name. Will be expanded to ``f'{log_file_str}_out.log'`` and ``f'{log_file_str}_err.log'``.
60
61
  stream_stdout: Stream to write stdout to. Defaults to ``sys.stdout``.
61
62
  stream_stderr: Stream to write stderr to. Defaults to ``sys.stderr``.
63
+ *args: Additional arguments to pass to :func:`~
64
+ **kwargs: Additional keyword arguments to pass to :func:`~
62
65
 
63
66
  ``*args`` and ``**kwargs`` are passed to :func:`~create_subprocess_shell` or :func:`create_subprocess_exec`,
64
67
  which in turn passes them to :class:`subprocess.Popen`.
@@ -102,8 +105,9 @@ async def execute_and_stream_output(
102
105
 
103
106
 
104
107
  def run_async_with_event_loop(coroutine: Coroutine[Any, Any, T] | Awaitable[T]) -> T:
105
- """Run a coroutine within an asyncio event loop, either by adding it to the
106
- existing running event loop or by creating a new event loop. Returns the result.
108
+ """Run a coroutine within an asyncio event loop.
109
+
110
+ Either by adding it to the existing running event loop or by creating a new event loop. Returns the result.
107
111
 
108
112
  Args:
109
113
  coroutine: The coroutine (async function) to be executed.
@@ -120,7 +124,6 @@ def run_async_with_event_loop(coroutine: Coroutine[Any, Any, T] | Awaitable[T])
120
124
 
121
125
  run_async_with_event_loop(main())
122
126
  """
123
-
124
127
  try:
125
128
  loop = asyncio.get_running_loop()
126
129
  try:
@@ -7,7 +7,7 @@ import sys
7
7
 
8
8
 
9
9
  class DisablePrint:
10
- def __init__(self):
10
+ def __init__(self) -> None:
11
11
  self.output = sys.stdout
12
12
 
13
13
  def __enter__(self) -> DisablePrint:
@@ -3,8 +3,9 @@ from dataclasses import dataclass
3
3
 
4
4
  import gdsfactory as gf
5
5
  import gdstk
6
+ from gdsfactory.component import Component
6
7
  from gdsfactory.pdk import get_layer
7
- from gdsfactory.typings import Component, Layer, List
8
+ from gdsfactory.typings import Layer
8
9
  from gdstk import Polygon
9
10
 
10
11
 
@@ -22,13 +23,13 @@ class LocalMapping:
22
23
  new_layer_name: str
23
24
  new_layer_number: Layer
24
25
  old_layer_name: str
25
- domains: List[Polygon]
26
+ domains: list[Polygon]
26
27
 
27
28
 
28
29
  def get_component_with_local_layers(
29
30
  component,
30
31
  layer_stack,
31
- mappings: List[LocalMapping],
32
+ mappings: list[LocalMapping],
32
33
  precision: float = 1e-4,
33
34
  ) -> Component:
34
35
  """Returns a component where polygons within "domains" belonging to "old_layer_name" are remapped to "new_layer_name" (with layer details copied from old_layer), and polygons outside the domain are kept on "old_layer_name".
@@ -1,7 +1,7 @@
1
1
  import copy
2
2
 
3
3
  import gdsfactory as gf
4
- import gdstk
4
+ from gdsfactory.technology import LogicalLayer
5
5
  from gdsfactory.typings import Component, LayerStack
6
6
 
7
7
 
@@ -55,10 +55,9 @@ def get_component_with_net_layers(
55
55
  new_layers_init: initial layer number for the temporary new layers.
56
56
  add_to_layerstack: True by default, but can be set to False to disable parsing of the layerstack.
57
57
  """
58
-
59
- return NotImplementedError(
60
- "Meshing component with net layers not implemented in gdsfactory8 yet."
61
- )
58
+ # return NotImplementedError(
59
+ # "Meshing component with net layers not implemented in gdsfactory8 yet."
60
+ # )
62
61
 
63
62
  # Initialize returned component
64
63
  net_component = component.copy()
@@ -67,17 +66,23 @@ def get_component_with_net_layers(
67
66
  for i, portname in enumerate(port_names):
68
67
  port = component.ports[portname]
69
68
  # Get original port layer polygons, and modify a new component without that layer
70
- polygons = net_component.extract(layers=[port.layer]).get_polygons()
71
- net_component = net_component.remove_layers(layers=[port.layer])
69
+ polygons = (
70
+ net_component.extract(layers=(port.layer,))
71
+ .get_polygons()
72
+ .get(port.layer, [])
73
+ )
74
+ net_component = net_component.remove_layers(layers=(port.layer,))
72
75
  for polygon in polygons:
73
76
  # If polygon belongs to port, create a unique new layer, and add the polygon to it
74
-
75
- if gdstk.inside(
76
- [port.center],
77
- gdstk.offset(gdstk.Polygon(polygon), gf.get_active_pdk().grid_size),
78
- )[0]:
77
+ if polygon.sized(3 * gf.kcl.dbu).inside(port.center):
78
+ # if gdstk.inside(
79
+ # [port.center],
80
+ # gdstk.offset(gdstk.Polygon(polygon), gf.get_active_pdk().grid_size),
81
+ # )[0]:
79
82
  try:
80
- port_layernames = layer_stack.get_layer_to_layername()[port.layer]
83
+ port_layernames = layer_stack.get_layer_to_layername()[
84
+ LogicalLayer(layer=port.layer)
85
+ ]
81
86
  except KeyError as e:
82
87
  raise KeyError(
83
88
  "Make sure your `layer_stack` contains all layers with ports"
@@ -89,10 +94,13 @@ def get_component_with_net_layers(
89
94
  )
90
95
  if add_to_layerstack:
91
96
  new_layer = copy.deepcopy(layer_stack.layers[old_layername])
92
- new_layer.layer = (
93
- new_layers_init[0] + i,
94
- new_layers_init[1] + j,
97
+ new_layer.layer = LogicalLayer(
98
+ layer=(
99
+ new_layers_init[0] + i,
100
+ new_layers_init[1] + j,
101
+ )
95
102
  )
103
+ new_layer.name = f"{old_layername}{delimiter}{portname}"
96
104
  layer_stack.layers[f"{old_layername}{delimiter}{portname}"] = (
97
105
  new_layer
98
106
  )
@@ -30,7 +30,7 @@ def permittivity_imag_from_index(n, k):
30
30
 
31
31
 
32
32
  def D_conductivity_um(n, k, wavelength):
33
- """conductivity as defined by Meep https://meep.readthedocs.io/en/latest/Materials/#conductivity-and-complex
33
+ """Conductivity as defined by Meep https://meep.readthedocs.io/en/latest/Materials/#conductivity-and-complex.
34
34
 
35
35
  Assumes natural units, with lengthscale in microns (see https://meep.readthedocs.io/en/latest/Introduction/#units-in-meep)
36
36
 
@@ -10,7 +10,7 @@ import matplotlib.pyplot as plt
10
10
  import numpy as np
11
11
 
12
12
 
13
- def _check_ports(sp: dict[str, np.ndarray], ports: Sequence[str]):
13
+ def _check_ports(sp: dict[str, np.ndarray], ports: Sequence[str]) -> None:
14
14
  """Ensure ports exist in Sparameters."""
15
15
  for port in ports:
16
16
  if port not in sp:
@@ -11,7 +11,7 @@ layernames_before = set(LAYER_STACK.layers.keys())
11
11
  original_component = straight_heater_metal()
12
12
 
13
13
 
14
- def test_component_with_new_port_layers():
14
+ def test_component_with_new_port_layers() -> None:
15
15
  layer_stack = LAYER_STACK.model_copy()
16
16
  get_component_with_net_layers(
17
17
  component=original_component,
@@ -31,7 +31,7 @@ def test_component_with_new_port_layers():
31
31
  # print(original_component.get_layers())
32
32
 
33
33
 
34
- def test_remove_empty_layer_stack_layers():
34
+ def test_remove_empty_layer_stack_layers() -> None:
35
35
  layer_stack = LAYER_STACK.model_copy()
36
36
  new_component = get_component_with_net_layers(
37
37
  component=original_component,
@@ -40,7 +40,7 @@ def _generate_sif(
40
40
  element_order: int,
41
41
  background_tag: str | None = None,
42
42
  simulator_params: Mapping[str, Any] | None = None,
43
- ):
43
+ ) -> None:
44
44
  # pylint: disable=unused-argument
45
45
  """Generates a sif file for Elmer simulations using Jinja2."""
46
46
  # Have background_tag as first s.t. unaccounted elements use it by default
@@ -61,7 +61,7 @@ def _generate_sif(
61
61
  fp.write(output)
62
62
 
63
63
 
64
- def _elmergrid(simulation_folder: Path, name: str, n_processes: int = 1):
64
+ def _elmergrid(simulation_folder: Path, name: str, n_processes: int = 1) -> None:
65
65
  """Run ElmerGrid for converting gmsh mesh to Elmer format."""
66
66
  elmergrid = shutil.which("ElmerGrid")
67
67
  if elmergrid is None:
@@ -99,7 +99,7 @@ def _elmergrid(simulation_folder: Path, name: str, n_processes: int = 1):
99
99
  )
100
100
 
101
101
 
102
- def _elmersolver(simulation_folder: Path, name: str, n_processes: int = 1):
102
+ def _elmersolver(simulation_folder: Path, name: str, n_processes: int = 1) -> None:
103
103
  """Run simulations with ElmerFEM."""
104
104
  elmersolver_name = (
105
105
  "ElmerSolver" if (no_mpi := n_processes == 1) else "ElmerSolver_mpi"
@@ -193,7 +193,6 @@ def run_capacitive_simulation_elmer(
193
193
 
194
194
  .. _Elmer: https://github.com/ElmerCSC/elmerfem
195
195
  """
196
-
197
196
  if layer_stack is None:
198
197
  layer_stack = LayerStack(
199
198
  layers={
@@ -83,7 +83,7 @@ def get_reasonable_mesh_parameters(c: Component):
83
83
 
84
84
  @pytest.fixture(scope="session")
85
85
  def elmer_capacitance_simulation_basic_results(geometry) -> ElectrostaticResults:
86
- """Run a Elmer capacitance simulation and cache the results"""
86
+ """Run a Elmer capacitance simulation and cache the results."""
87
87
  c = geometry
88
88
  return run_capacitive_simulation_elmer(
89
89
  c,
@@ -100,7 +100,7 @@ def test_elmer_capacitance_simulation_runs(
100
100
 
101
101
 
102
102
  @pytest.mark.parametrize("n_processes", [(1), (2)])
103
- def test_elmer_capacitance_simulation_n_processes(geometry, n_processes):
103
+ def test_elmer_capacitance_simulation_n_processes(geometry, n_processes) -> None:
104
104
  c = geometry
105
105
  run_capacitive_simulation_elmer(
106
106
  c,
@@ -123,7 +123,8 @@ def component_to_epsilon_pjz(
123
123
 
124
124
  def component_to_epsilon_femwell():
125
125
  """TODO: Uses gdsfactory meshing + femwell physical tagging + export to a cartesian\
126
- grid to define the (3, xx, yy, zz) array of permittivity values"""
126
+ grid to define the (3, xx, yy, zz) array of permittivity values.
127
+ """
127
128
  return NotImplementedError
128
129
 
129
130
 
@@ -154,7 +155,6 @@ def plot_epsilon(
154
155
  nm_per_pixel: (int) resolution (default to 1000 for pixel index).
155
156
  figsize: figure size.
156
157
  """
157
-
158
158
  # Checks
159
159
  if (x and y) or (y and z) or (x and z):
160
160
  raise ValueError("Only one of x, y or z must be numeric!")
@@ -207,7 +207,7 @@ def plot_epsilon(
207
207
  return fig
208
208
 
209
209
 
210
- def add_plot_labels(arg0, arg1, arg2, arg3):
210
+ def add_plot_labels(arg0, arg1, arg2, arg3) -> None:
211
211
  plt.xlabel(arg0)
212
212
  plt.ylabel(arg1)
213
213
  plt.title(f"{arg2}{arg3}")
@@ -17,8 +17,7 @@ def get_epsilon_port(
17
17
  port_extent_xy: float = 1,
18
18
  port_offset: int = 0,
19
19
  ):
20
- """
21
- This function extracts a xz or yz slice of the epsilon distribution at the location of the port to mode solve.
20
+ """This function extracts a xz or yz slice of the epsilon distribution at the location of the port to mode solve.
22
21
 
23
22
  Parameters:
24
23
  port (Port): The port object from the component.
@@ -32,7 +31,6 @@ def get_epsilon_port(
32
31
  Returns:
33
32
  port_slice (array): The slice of the epsilon distribution at the location of the port.
34
33
  """
35
-
36
34
  xarray, yarray, zarray = create_physical_grid(
37
35
  xmin, ymin, zmin, epsilon, nm_per_pixel
38
36
  )
@@ -119,7 +117,6 @@ def plot_mode(
119
117
  nm_per_pixel: (int) resolution (default to 1000 for pixel index)
120
118
  figsize: figure size.
121
119
  """
122
-
123
120
  # Create physical grid
124
121
  xarray, yarray, zarray = create_physical_grid(
125
122
  xmin, ymin, zmin, epsilon_port, nm_per_pixel
@@ -91,7 +91,6 @@ def get_sparameters_fdtdz(
91
91
  sp = gz.get_sparameters(c, run=False)
92
92
 
93
93
  """
94
-
95
94
  # Checks from gmeep
96
95
  component_ref = component.ref()
97
96
  component_ref.dx = 0
@@ -293,7 +293,7 @@ def wrap_component_in_netlist(name):
293
293
  }
294
294
 
295
295
 
296
- def _bad_instance(_):
296
+ def _bad_instance(_) -> bool:
297
297
  return False
298
298
 
299
299
 
@@ -44,12 +44,15 @@ def get_meep_geometry_from_component(
44
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
48
  for layername in ordered_layer_stack_keys:
48
49
  layer = layer_stack.layers[layername].layer
49
50
 
50
51
  if layer not in layer_to_polygons:
51
52
  continue
52
53
  polygons = layer_to_polygons[layer]
54
+ print(f"layer: {layer}, polygons: {polygons}")
55
+
53
56
  if layer in layer_to_thickness and layer in layer_to_material:
54
57
  height = layer_to_thickness[layer] if is_3d else mp.inf
55
58
  zmin_um = layer_to_zmin[layer] if is_3d else 0
@@ -270,7 +270,7 @@ def get_simulation(
270
270
 
271
271
  # Add port monitors dict
272
272
  monitors = {}
273
- for port in component_ref:
273
+ for port in component_ref.ports:
274
274
  port_name = port.name
275
275
  angle_rad = np.radians(port.orientation)
276
276
  width = port.width + 2 * port_margin
@@ -137,7 +137,7 @@ def get_meep_adjoint_optimizer(
137
137
  for monitor in monitors.values()
138
138
  ]
139
139
 
140
- c = component.copy()
140
+ c = component.dup()
141
141
  for design_region, design_variable in zip(design_regions, design_variables):
142
142
  sim.geometry.append(
143
143
  Block(design_region.size, design_region.center, material=design_variable)
@@ -1,5 +1,6 @@
1
1
  """Compares the modes of a gdsfactory + MEEP waveguide cross-section vs a
2
- direct MPB calculation."""
2
+ direct MPB calculation.
3
+ """
3
4
 
4
5
  from __future__ import annotations
5
6
 
@@ -21,7 +22,7 @@ def lumerical_parser(E_1D, H_1D, y_1D, z_1D, res=50, z_offset=0.11 * 1e-6):
21
22
 
22
23
  Lumerical data is in 1D arrays, and over a nonregular mesh
23
24
 
24
- Args
25
+ Args:
25
26
  E_1D: E array from Lumerical.
26
27
  H_1D: H array from Lumerical.
27
28
  y_1D: y array from Lumerical.
@@ -114,9 +115,8 @@ def MPB_eigenmode_toDisk() -> None:
114
115
 
115
116
 
116
117
  def compare_mpb_lumerical(plot=False) -> None:
117
- """
118
- WARNING: Segmentation fault occurs if both ms object above and sim object exist in memory at the same time
119
- Instead load results from separate MPB run
118
+ """WARNING: Segmentation fault occurs if both ms object above and sim object exist in memory at the same time
119
+ Instead load results from separate MPB run.
120
120
 
121
121
  Same namespace run does not work
122
122
  # MPB mode
@@ -6,7 +6,6 @@ from gplugins.gmeep.write_sparameters_meep import write_sparameters_meep
6
6
 
7
7
  def test_materials_override() -> None:
8
8
  """Checks that materials are properly overridden if index is provided."""
9
-
10
9
  c = gf.components.straight(length=2)
11
10
 
12
11
  # Default (materials strings)
@@ -34,7 +33,6 @@ def test_materials_override() -> None:
34
33
 
35
34
  def test_materials_override_complex() -> None:
36
35
  """Checks that materials are properly overridden if complex index is provided."""
37
-
38
36
  c = gf.components.straight(length=2)
39
37
 
40
38
  # Default (materials strings)
@@ -251,7 +251,7 @@ def write_sparameters_meep(
251
251
  plot_args: if animate or not run, customization keyword arguments passed to
252
252
  `plot2D()` (i.e. `labels`, `eps_parameters`, `boundary_parameters`, `field_parameters`, etc.)
253
253
 
254
- keyword Args:
254
+ Keyword Args:
255
255
  extend_ports_length: to extend ports beyond the PML (um).
256
256
  zmargin_top: thickness for cladding above core (um).
257
257
  zmargin_bot: thickness for cladding below core (um).
@@ -50,7 +50,7 @@ def write_sparameters_meep_batch(
50
50
  If there are more simulations than cores each batch runs sequentially.
51
51
 
52
52
 
53
- Args
53
+ Args:
54
54
  jobs: list of Dicts containing the simulation settings for each job.
55
55
  for write_sparameters_meep.
56
56
  cores_per_run: number of processors to assign to each component simulation.
@@ -61,7 +61,7 @@ def write_sparameters_meep_batch(
61
61
  layer_stack: contains layer to thickness, zmin and material.
62
62
  Defaults to active pdk.layer_stack.
63
63
 
64
- keyword Args:
64
+ Keyword Args:
65
65
  resolution: in pixels/um (30: for coarse, 100: for fine).
66
66
  port_symmetries: Dict to specify port symmetries, to save number of simulations.
67
67
  dirpath: directory to store Sparameters.
@@ -123,7 +123,7 @@ def write_sparameters_meep_mpi(
123
123
  filepath for sparameters CSV (wavelengths, s11a, o1@0,o2@0, ...)
124
124
  where `a` is the angle in radians and `m` the module.
125
125
 
126
- TODO:
126
+ Todo:
127
127
  write stdout to file, maybe simulation logs too.
128
128
 
129
129
  """
@@ -55,7 +55,6 @@ def get_mesh(
55
55
 
56
56
  TODO! make compatible with new unified plugins interface
57
57
  """
58
-
59
58
  # Add WAFER layer:
60
59
  padded_component = Component()
61
60
  component = gf.get_component(component)
@@ -24,7 +24,6 @@ def round_coordinates(geom, ndigits=4):
24
24
 
25
25
  def fuse_polygons(component, layer, round_tol=4, simplify_tol=1e-4, offset_tol=None):
26
26
  """Take all polygons from a layer, and returns a single (Multi)Polygon shapely object."""
27
-
28
27
  layer_region = layer.get_shapes(component)
29
28
 
30
29
  # Convert polygons to shapely
@@ -37,7 +36,7 @@ def fuse_polygons(component, layer, round_tol=4, simplify_tol=1e-4, offset_tol=N
37
36
  exterior_points.append((point.x / 1000, point.y / 1000))
38
37
  for hole_index in range(klayout_polygon.holes()):
39
38
  holes_points = []
40
- for point in layer_region.each_polygon_hole(hole_index):
39
+ for point in klayout_polygon.each_point_hole(hole_index):
41
40
  holes_points.append((point.x / 1000, point.y / 1000))
42
41
  interior_points.append(holes_points)
43
42