load_base_simulation#
- FdtdSession.load_base_simulation(setup: Callable | str, parametrization: BaseParametrization, params: ndarray | None = None) None#
Setup base simulation from file, function, or script.
When the FDTD CAD is visible, all the
addfdtd/addport/addpoly/setcalls fired by the user’s setup function and bycreate_optimization_structures()would otherwise each force a UI redraw. Those redraws are by far the slowest part of a per- iteration rebuild, so we wrap the whole sequence inredrawoff/redrawonand let Lumerical batch them into a single repaint at the end.- Parameters:
- setup
Union[Callable,str] Either a callable function, .lsf script path, or .fsp project file path.
- parametrization
BaseParametrization Parametrization instance defining the optimization geometry.
- params
Optional[np.ndarray],optional Parameter array for geometry generation (default: None).
- setup