Module Configuration
config
Section titled “config”Global configuration for the module.
Attributes
config.default_kwargs
Section titled “config.default_kwargs”Default keyword arguments used by parametric components and the Tidy3DModel
Examples
Set a default radius for all components that use a radius parameter:
>>> config.default_kwargs["radius"] = 50Set a default Euler fraction only for the parametric.s_bend component:
>>> config.default_kwargs["s_bend"] = {"euler_fraction": 0.5}Set a default run time specification for Tidy3D models:
>>> config.default_kwargs["tidy3d"] = {"run_time": 1.0e-12}config.default_mesh_refinement
Section titled “config.default_mesh_refinement”Default mesh refinement used in Tidy3D grids.
config.default_technology
Section titled “config.default_technology”Default technology for new components.
config.default_time_steppers
Section titled “config.default_time_steppers”Default time steppers for models without a time stepper.
Each value is a TimeStepper instance that is used by default when Model.time_stepper is unset.
The keys are Model names to which the defaults apply.
A key "*" is used as fallback default.
config.grid
Section titled “config.grid”Grid for snapping vertices after transformations. See also
snap_to_grid.
config.tolerance
Section titled “config.tolerance”Tolerance for geometry discretization (e.g. setting the number of straight segments that make up a curve).
config.svg_ports
Section titled “config.svg_ports”Show ports in component SVG representations.
config.svg_port_names
Section titled “config.svg_port_names”Show port names in component SVG representations.
config.svg_labels
Section titled “config.svg_labels”Show labels in component SVG representations.
config.svg_label_scaling
Section titled “config.svg_label_scaling”Label scaling (positive values scale proportionally to
Label.scaling and negative values are used as absolute factors).
config.svg_virtual_connections
Section titled “config.svg_virtual_connections”Show virtual connections in component SVG representations.
config.svg_reference_depth
Section titled “config.svg_reference_depth”Depth of references to display. References below this depth are shown as bounding boxes. A negative value removes the limit.
config.svg_reference_labels
Section titled “config.svg_reference_labels”Show reference labels in component SVG representations.
config.svg_reference_names
Section titled “config.svg_reference_names”Show reference names in component SVG representations.
config.svg_reference_ports
Section titled “config.svg_reference_ports”Show reference ports in component SVG representations.
config.svg_reference_port_names
Section titled “config.svg_reference_port_names”Show reference port names in component SVG representations.
config.use_local_mode_solver
Section titled “config.use_local_mode_solver”Flag controlling the use of Tidy3D’s local ModeSolver instead of the remote one. Local mode solving is only available when tidy3d_extras is installed and subpixel is enabled.
config.compile_circuit_time_steppers
Section titled “config.compile_circuit_time_steppers”Compile circuit time steppers with numba when it is installed (pip install photonforge[numba]) and native time stepping is licensed. Other circuit features are not affected. Kept by tidy3d’s configuration manager as plugins.photonforge.compile_circuit_time_steppers.
config.klayout_executable
Section titled “config.klayout_executable”KLayout executable used by drc_check and lvs_check. When unset, klayout is searched in PATH and in common install locations. Kept by tidy3d’s configuration manager as plugins.photonforge.klayout_executable.
config.calibre_executable
Section titled “config.calibre_executable”Calibre executable used by drc_check. When unset, calibre is searched in PATH, then in $CALIBRE_HOME/bin and $MGC_HOME/bin. Kept by tidy3d’s configuration manager as plugins.photonforge.calibre_executable.
config.default_drc_lvs_engine
Section titled “config.default_drc_lvs_engine”Engine used by drc_check and lvs_check when their engine argument is None: "klayout" or "calibre". Calibre runs DRC only, so lvs_check skips it. When unset, the first engine found is used: KLayout, then Calibre for DRC. Kept by tidy3d’s configuration manager as plugins.photonforge.default_drc_lvs_engine.
Constants
Section titled “Constants”Speed of light in vacuum (in µm/s)