ProjectConfig#

class lumopt2.core.project_config.ProjectConfig(configurator: Callable | str, filename_suffix: str)#

A class used to modify the base simulation in the Project. ProjectConfig objects will be owned by a SimulationResults object.

Parameters:
configuratorCallable or str

A callable that takes the FDTD object and modifies the simulation, or a string path to a .lsf script file that will be executed. If it’s a callable, it should have the signature:

>>> def my_config_function(fdtd: lumapi.FDTD) -> None:
filename_suffixstr

A string suffix to add to the filenames of saved project files (not optional).

Attributes:
configuratorCallable or str

A callable or string path to an Lumerical .lsf file

filename_suffixstr

A string suffix to add to the filenames of saved project files. Must NOT be an empty string.

Methods

ProjectConfig.apply(sim)

Apply the configuration to fresh copy of the base FDTD simulation.