get_scaling_factor#

BaseFom.get_scaling_factor(fdtd_session: FdtdSession, parametrization, sim_result) ndarray#

Compute and cache a scaling factor for the adjoint gradient.

Parameters:
fdtd_sessionFdtdSession

FDTD session used to query monitor normalization amplitude.

parametrizationBaseParametrization

Current geometry parametrization supplying mesh cell sizes and counts.

sim_resultBaseResults

Simulation result object providing the wavelengths at which the scaling factor is evaluated.

Returns:
np.ndarray

Array of scaling factors, one per wavelength in sim_result.