get_scaling_factor#
- PortFom.get_scaling_factor(fdtd_session: FdtdSession, parametrization, sim_result) ndarray#
Compute a per-wavelength scaling factor for the adjoint gradient (port-based).
For port-based simulations, the scaling factor does not depend on frequency and is therefore uniform across wavelengths.
- Parameters:
- fdtd_session
FdtdSession FDTD session used to query normalization amplitude.
- parametrization
BaseParametrization Current geometry parametrization supplying mesh cell sizes.
- sim_result
BaseResults Simulation result object. The wavelengths are not used here but the parameter is present for a consistent interface with
BaseFom.get_scaling_factor().
- fdtd_session
- Returns:
np.ndarrayArray of scaling factors with shape
(n_wavelengths,), all equal to2 * eps0 * dV.