calculate_fom#

PortFom.calculate_fom(fdtd_session: FdtdSession) float#

Compute the figure of merit using the user-defined function and monitor results.

Parameters:
fdtd_sessionFdtdSession

FDTD session containing the completed simulation results.

Returns:
float

Computed figure of merit value from the user-defined function.

Raises:
TypeError

If the user-defined function signature doesn’t match the number of sim_results.